define combine="interleave"
Posted: Thu Apr 08, 2010 9:12 pm
I think there might be a problem with RelaxNG's combine="interleave" pattern in Oxygen.
I defined a "common" schema that contains element definitions used both in schemas "A" and "B". For schema B, I need to redefine a pattern called "narrow-inclusion" (already defined in "common") by allowing the occurrence of three new elements, but XML documents ONLY allow for those three new elements (as if I had replaced the definition, instead of combining by interleave. Below is an example:
In the "common" schema I did the following:
And in "B" I redefined "narrow-inclusion" and defined new elements C and D below include (not copied here):
But XML documents that use B as a schema only allow for C and D. Any help will be greatly appreciated.
Cheers,
Mariana
I defined a "common" schema that contains element definitions used both in schemas "A" and "B". For schema B, I need to redefine a pattern called "narrow-inclusion" (already defined in "common") by allowing the occurrence of three new elements, but XML documents ONLY allow for those three new elements (as if I had replaced the definition, instead of combining by interleave. Below is an example:
In the "common" schema I did the following:
Code: Select all
<define name="narrow-inclusion">
<zeroOrMore>
<choice>
<ref name="A-element"></ref>
<ref name="B-element"></ref>
</choice>
</zeroOrMore>
</define>
Code: Select all
<include href="common.rng">
<define name="narrow-inclusion">
<zeroOrMore>
<choice>
<ref name="C-element"></ref>
<ref name="D-element"></ref>
</choice>
</zeroOrMore>
</define>
</include>
Cheers,
Mariana