Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: Dirkjan Ochtman <djc@g.o>
Cc: Gentoo Development <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] New schema language for metadata validation?
Date: Wed, 27 Jan 2016 15:43:23
Message-Id: 20160127164300.0b502cab.mgorny@gentoo.org
In Reply to: Re: [gentoo-dev] New schema language for metadata validation? by Dirkjan Ochtman
1 On Wed, 27 Jan 2016 16:28:13 +0100
2 Dirkjan Ochtman <djc@g.o> wrote:
3
4 > On Wed, Jan 27, 2016 at 4:20 PM, Michał Górny <mgorny@g.o> wrote:
5 > > First of all, I don't like RELAX-NG Compact at all. It looks like
6 > > someone tried hard to combine some variation of BNF, DOCTYPE
7 > > and something else in order to get something that is both readable
8 > > and compact. And got a result that doesn't meet either criteria.
9 > > It looks like some terrible mixture of over-verbose descriptive text
10 > > format with a lot of enigmatic symbols that are not even clear what
11 > > they apply to.
12 >
13 > Wow, that's surprising to me! I found that a lot of the compact syntax
14 > made immediate sense to me as I was already familiar with what ?*+
15 > mean from EBNF and regular expressions. For me, it's mostly how much
16 > less verbose it is than a full XML syntax that makes it easier to
17 > comprehend and manipulate.
18
19 Yes, that part makes some sense. Except that it immediately follows
20 braces which makes me think it applies only to the thing in the braces.
21 Furthermore, the use of {} vs () seems pretty much random, and the &
22 is completely unclear what it could mean (I'm not reading the docs
23 here!). I look at it and I wonder if that forces some ordering or not,
24 if it supports interspersing or not. And finally, the fact that '*'
25 follows closing brace on the other end of file does not help
26 readability.
27
28 > > Secondly, RELAX-NG and XML Schema look pretty similar in volume.
29 > > However, XML Schema looks definitely more readable, robust and XML-ish
30 > > (and doesn't use camelcase!). Furthermore, as far as I'm aware XML
31 > > Schema is more widely supported (not sure if that applies to any tools
32 > > we're considering).
33 >
34 > I agree that XML Schema is probably more widely supported, though it'd
35 > be hard to assess by how much. On other hand, I find XML Schema much
36 > less readable; and it feels like "more XML-ish" is just because it
37 > uses namespaces a lot more, and is more commonly used? Indeed, to me
38 > the fact that RELAX NG is less XML-ish is a positive aspect.
39
40 When you use XML, use XML. If you don't want XML, don't use XML. Don't
41 try to make non-XML out of XML.
42
43 --
44 Best regards,
45 Michał Górny
46 <http://dev.gentoo.org/~mgorny/>

Replies

Subject Author
Re: [gentoo-dev] New schema language for metadata validation? Dirkjan Ochtman <djc@g.o>