[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: comments relax-ng 0.9
Hi,
I have a few points of concern regarding the
Relax-NG 0.9 specifications:
1. Some operations seem not to conserve
semantics. For example, given the pattern
<define name="example">
<element name="firstName"><text/></element> <element name="lastName"><text/></element> </define> When we insert this pattern into some contexts, the
intended semantics could be destroyed:
<choice>
<ref name="example"> </choice> matches only with instances that have either a
firstName or a lastName.
<interleave>
<ref name="example> </interleave> looses the intended order of elements. This is even
true when the pattern is defined with a <group> clause.
While all the above operations are completely
correct in terms of pattern substitution, they could
prove dangerous. Schema authors may with this pattern intuitively associate similar semantics as given by <element name="name">
<element name="firstName"><text/></element> <element name="lastName"><text/></element> </element> Here the definition of a sequence of child elements
has the implicit meaning of an ordered sequence, a
meaning that could be associated with the above pattern definition by analogy. To my opinion, schema validators should give a
warning when such a pattern is referenced in a way as
shown in the examples above. 2. global="true"
I think this functionality is required, especially
when referencing an external pattern with
<externalRef href="chameleon.rng" ns="http://www.example.org"/>
The global attribute would allow to cast also the
attributes of such a "chameleon" pattern into the
specified namespace. Maybe the name of the attribute should be revised though, for example, something like "parentNs". 3. Cross references
I think, in this point Relax-NG falls back behind
XML Schema. The ability to define multi-field keys
and key references is, for example, required when we want to serialize databases into XML. 4. Brilliant. Love it!
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC