[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: Issue: <anyNameExcept> and <anyNsNameExcept> rather than<difference>
James Clark wrote: > I would therefore propose the following (relative to the current spec): > > 1) Drop <not> Agreed. > 2) Drop <difference> Agreed. > 3) Add <except> as an optional child of <nsName> and <anyName>; <except> has > one or more name classes as children. Thus Agreed. > <anyName> > <except> > <name>foo</name> > <name>bar</name> > </except> > </anyName> .. > <anyName> > <except> > <nsName/> > <nsName ns=""/> > </except> > </anyName> .. > <nsName> > <except> > <name>foo</name> > <name>bar</name> > </except> > </nsName> I think that this syntax is very natural. > As with Murata-san's proposal the grammar for name classes can prohibit > silly things that are almost certainly mistakes like: > > <anyName> > <except> > <anyName/> > </except> > </anyName> I would like to probihitm them. case 1: <anyName> <nsName> or <name> only. Case 2: <nsName> <name> only. > 4) Allow <data> to contain an optional <except> element; in this context the > <except> element would contain one or more patterns. I like consistent use of the keyword <except>. > <attribute name="version"> > <data type="decimal"> > <except> > <value>1.0</value> > </except> > </data> > </attribute> > > or > > <attribute name="base"> > <data type="QName"> > <except> > <value type="QName">double</value> > <value type="QName">float</value> > <value type="QName">boolean</value> > <value type="QName">string</value> > </except> > </data> > </attribute> > > or > > <attribute name="foo"> > <data type="string"> > <param name="maxLength">42</param> > <except> > <data type="decimal"/> > </except> > </data> > </attribute> > The key and keyRef attributes should probably be prohibited inside <except> > inside <data>. We can discuss further exactly what would be allowed inside > <except> inside <data>: certainly elements and attributes should not be. Your last example have <data type="decimal"/>. However, <value> might be already good enough for V1 of RELAX NG. Cheers, Makoto
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC