I am converting Microsoft's Office Open XML Schemas from XML Schema format
to Relax NG compact syntax, for them to use in the proposed ISO standard.
The XSD would still be the normative one. (It is an external spec to ISO,
so no control there.)
Their schema makes use of almost everything nasty in XML Schemas :-)
I have a few problems I need to resolve. The first one I'd like advice on
comes down to this:
* What is the best way to specify, in RELAX NG, that the local element
being defined substitutes for a pattern in imported schema?
<xs:element name="xxx" substitionGroup="elsewhere:something" />
I know about combining definitions within a grammar. But what about
included grammars with other namespaces?
I see two possible approaches (are there more?) but I am not convinced
either are legal:
1) Move all that kind of substitutionGroup definition inside the relevant
rng:include element,
<rng:include href="elsewhere.rng"
ns="http://...elsewhere..." >
<rng:define name="something" combine="choice">
<rng:element name="xxx" ns="original" />
</rng:define>
</rng:include>
2) Don't do any rearrangement, but just try to extend the pattern from
the other namespace.
<rng:define name="something" combine="choice"
ns="http://...elsewhere..." >
<rng:element name="xxx" ns="original" />
</rng:define>
Now I am sure that second one is wrong. I think the @ns only affects the
element names inside its scope, and doesn't resolve patterns to different
namespaces.
And it is made more complicated by the fact that the elements being added
in the substitution group have a type belonging to the original
substitution head.
Any ideas?
Rick Jelliffe
-- DSDL members discussion list To unsubscribe, please send a message with the command "unsubscribe" to dsdl-discuss-request@dsdl.org (mailto:dsdl-discuss-request@dsdl.org?Subject=unsubscribe)Received on Wed Aug 16 18:46:14 2006
This archive was generated by hypermail 2.1.8 : Wed Aug 16 2006 - 21:13:05 UTC