On Wed, 27 Jan 2016 14:39:02 +0100 Dirkjan Ochtman <d...@gentoo.org> wrote:
> On Wed, Jan 27, 2016 at 1:09 PM, Michał Górny <mgo...@gentoo.org> wrote: > > Could you post a generated .rng and XML Schema files for comparison? > > They don't have to be perfect conversions, just to see how different > > they are. > > Here's the RNG, generated with dev-python/rnc2rng: > > https://raw.githubusercontent.com/djc/gentoo-data-dtd/metadata-rnc/metadata.rng > > The best way to convert from RELAX NG to XML Schema seems to be with > trang; I downloaded an older binary and a JDK on my laptop, but > couldn't easily get it to run. I don't really have a Gentoo machine on > which I want to install the whole Java shebang, so maybe someone else > can run a quick conversion? Thanks to you and to ulm for the XML Schema conversion. Now my points. First of all, I don't like RELAX-NG Compact at all. It looks like someone tried hard to combine some variation of BNF, DOCTYPE and something else in order to get something that is both readable and compact. And got a result that doesn't meet either criteria. It looks like some terrible mixture of over-verbose descriptive text format with a lot of enigmatic symbols that are not even clear what they apply to. Secondly, RELAX-NG and XML Schema look pretty similar in volume. However, XML Schema looks definitely more readable, robust and XML-ish (and doesn't use camelcase!). Furthermore, as far as I'm aware XML Schema is more widely supported (not sure if that applies to any tools we're considering). Therefore, I'd suggest we just ship properly hand-written XML Schema, with some nice comments. I don't see a reason to ship any RELAX-NG files unless we actually have tools that support only that. -- Best regards, Michał Górny <http://dev.gentoo.org/~mgorny/>
pgpXBZwVlwbd_.pgp
Description: OpenPGP digital signature