Re: [gentoo-dev] New schema language for metadata validation?

2016-01-27 Thread Ulrich Mueller
> On Wed, 27 Jan 2016, Michał Górny wrote: > Do we use the variant anywhere? If not, I suggest we > drop it since it's completely unclear to me and only pollutes the > schema. +1 Here is the commit (from 2003) that had introduced the packages element:

Re: [gentoo-dev] New schema language for metadata validation?

2016-01-27 Thread Dirkjan Ochtman
On Wed, Jan 27, 2016 at 4:43 PM, Michał Górny wrote: > Yes, that part makes some sense. Except that it immediately follows > braces which makes me think it applies only to the thing in the braces. > Furthermore, the use of {} vs () seems pretty much random, and the & > is

Re: [gentoo-dev] New schema language for metadata validation?

2016-01-27 Thread Ulrich Mueller
> On Wed, 27 Jan 2016, Michał Górny wrote: > 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

Re: [gentoo-dev] New schema language for metadata validation?

2016-01-27 Thread Michał Górny
On Tue, 26 Jan 2016 20:52:09 +0100 Dirkjan Ochtman wrote: > TL;DR: I think we should switch from DTD to RELAX NG (compact syntax, > ideally) for our XML validation needs. It is more expressive and more > readable. Oh, one more thing. Do we use the variant anywhere? If not, I

Re: [gentoo-dev] New schema language for metadata validation?

2016-01-27 Thread Dirkjan Ochtman
On Wed, Jan 27, 2016 at 4:20 PM, Michał Górny wrote: > 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

Re: [gentoo-dev] New schema language for metadata validation?

2016-01-27 Thread Michał Górny
On Wed, 27 Jan 2016 16:28:13 +0100 Dirkjan Ochtman wrote: > On Wed, Jan 27, 2016 at 4:20 PM, Michał Górny wrote: > > 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

Re: [gentoo-dev] New schema language for metadata validation?

2016-01-27 Thread Michael Orlitzky
On 01/27/2016 10:28 AM, Dirkjan Ochtman wrote: > >> 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. > > I'd be curious what Michael, Ulrich,

Re: [gentoo-dev] New schema language for metadata validation?

2016-01-27 Thread Michał Górny
On Tue, 26 Jan 2016 20:52:09 +0100 Dirkjan Ochtman wrote: > All, > > TL;DR: I think we should switch from DTD to RELAX NG (compact syntax, > ideally) for our XML validation needs. It is more expressive and more > readable. > > Most people who know anything about XML stuff know

Re: [gentoo-dev] New schema language for metadata validation?

2016-01-27 Thread Dirkjan Ochtman
On Tue, Jan 26, 2016 at 9:52 PM, Michael Orlitzky wrote: > I would appreciate examples of some common tasks like validating > projects.xml, but since we don't have those now, it's not critical. > This used to be kinda straightforward with xmllint, > > $ xmllint --valid --noout

Re: [gentoo-dev] New schema language for metadata validation?

2016-01-27 Thread Brian Dolbec
On Wed, 27 Jan 2016 14:39:02 +0100 Dirkjan Ochtman wrote: > On Wed, Jan 27, 2016 at 1:09 PM, Michał Górny > 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

Re: [gentoo-dev] New schema language for metadata validation?

2016-01-27 Thread Michael Orlitzky
On 01/27/2016 04:22 AM, Dirkjan Ochtman wrote: > On Tue, Jan 26, 2016 at 9:52 PM, Michael Orlitzky wrote: >> I would appreciate examples of some common tasks like validating >> projects.xml, but since we don't have those now, it's not critical. >> This used to be kinda

Re: [gentoo-dev] New schema language for metadata validation?

2016-01-27 Thread Dirkjan Ochtman
On Wed, Jan 27, 2016 at 1:09 PM, Michał Górny 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:

Re: [gentoo-dev] New schema language for metadata validation?

2016-01-27 Thread Dirkjan Ochtman
On Wed, Jan 27, 2016 at 3:21 PM, Michael Orlitzky wrote: >> But libxml2 does not seem to support it; that is, substituting the >> DOCTYPE for an xml-model processing instruction and then using xmllint >> --valid does not do the right thing (it complains there's no DOCTYPE). > >

Re: [gentoo-dev] New schema language for metadata validation?

2016-01-27 Thread Ulrich Mueller
> On Wed, 27 Jan 2016, Dirkjan Ochtman wrote: > 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

Re: [gentoo-dev] New schema language for metadata validation?

2016-01-27 Thread Michał Górny
On Wed, 27 Jan 2016 14:39:02 +0100 Dirkjan Ochtman wrote: > On Wed, Jan 27, 2016 at 1:09 PM, Michał Górny 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

Re: [gentoo-dev] New schema language for metadata validation?

2016-01-26 Thread Michael Orlitzky
On 01/26/2016 02:52 PM, Dirkjan Ochtman wrote: > All, > > TL;DR: I think we should switch from DTD to RELAX NG (compact syntax, > ideally) for our XML validation needs. It is more expressive and more > readable. > A great idea. > What other stuff would need to be updated? > I would