Closed neolithos closed 6 years ago
I'll have a look, thanks for the report!
This is a note for myself:
<define name="anything">
<zeroOrMore>
<choice>
<element>
<anyName/>
<ref name="anything"/>
</element>
<attribute>
<anyName/>
</attribute>
<text/>
</choice>
</zeroOrMore>
</define>
<define name="foreign-elements">
<zeroOrMore>
<element>
<anyName>
<except>
<nsName ns=""/>
<nsName ns="urn:speedata.de:2009/publisher/en"/>
<nsName ns="urn:speedata:2009/publisher/functions/en"/>
</except>
</anyName>
<ref name="anything"/>
</element>
</zeroOrMore>
</define>
<define name="foreign-attributes">
<zeroOrMore>
<attribute>
<anyName>
<except>
<nsName ns=""/>
<nsName ns="urn:speedata.de:2009/publisher/en"/>
<nsName ns="urn:speedata:2009/publisher/functions/en"/>
</except>
</anyName>
</attribute>
</zeroOrMore>
</define>
<define name="foreign-nodes">
<zeroOrMore>
<choice>
<ref name="foreign-attributes"/>
<ref name="foreign-elements"/>
</choice>
</zeroOrMore>
</define>
and then use
<element name="....">
<interleave>
<group>
....
</group>
<ref name="foreign-nodes" />
</interleave>
</element>
to add the rules.
See Eric's book at http://books.xmlschemata.org/relaxng/relax-CHP-11-SECT-4.html
Implemented in version 3.1.16
I did not find any combination possibilities, like "customer specific report includes a master report".
The layout file is xml, so it easy to do this with a little pre processing.
So, it would be nice, if the schema and speedata publisher silently ignores such tags in the root node.