Gentoo Archives: gentoo-dev

From: Dirkjan Ochtman <djc@g.o>
To: "Michał Górny" <mgorny@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:29:10
Message-Id: CAKmKYaAS+KGPQPAOVAggeND_GQbzqVP3-mp_66=JFBW3k7GOfA@mail.gmail.com
In Reply to: Re: [gentoo-dev] New schema language for metadata validation? by "Michał Górny"
1 On Wed, Jan 27, 2016 at 4:20 PM, Michał Górny <mgorny@g.o> wrote:
2 > First of all, I don't like RELAX-NG Compact at all. It looks like
3 > someone tried hard to combine some variation of BNF, DOCTYPE
4 > and something else in order to get something that is both readable
5 > and compact. And got a result that doesn't meet either criteria.
6 > It looks like some terrible mixture of over-verbose descriptive text
7 > format with a lot of enigmatic symbols that are not even clear what
8 > they apply to.
9
10 Wow, that's surprising to me! I found that a lot of the compact syntax
11 made immediate sense to me as I was already familiar with what ?*+
12 mean from EBNF and regular expressions. For me, it's mostly how much
13 less verbose it is than a full XML syntax that makes it easier to
14 comprehend and manipulate.
15
16 > Secondly, RELAX-NG and XML Schema look pretty similar in volume.
17 > However, XML Schema looks definitely more readable, robust and XML-ish
18 > (and doesn't use camelcase!). Furthermore, as far as I'm aware XML
19 > Schema is more widely supported (not sure if that applies to any tools
20 > we're considering).
21
22 I agree that XML Schema is probably more widely supported, though it'd
23 be hard to assess by how much. On other hand, I find XML Schema much
24 less readable; and it feels like "more XML-ish" is just because it
25 uses namespaces a lot more, and is more commonly used? Indeed, to me
26 the fact that RELAX NG is less XML-ish is a positive aspect.
27
28 > Therefore, I'd suggest we just ship properly hand-written XML Schema,
29 > with some nice comments. I don't see a reason to ship any RELAX-NG
30 > files unless we actually have tools that support only that.
31
32 I'd be curious what Michael, Ulrich, and others think.
33
34 Cheers,
35
36 Dirkjan

Replies