|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XHTML m12n XSD
This would seem to be a place where you could use substitution groups or the any construct.
Basically, in the schema that defines block, you would do something like:
<!-- this element can't be instantiated but provides a placeholder for
other schemas to nominate elements that fit here -->
<xsd:element name="blockExtra" abstract="true" type="urType"/>
<xsd:element name="block">
<xsd:sequence>
<!-- add a reference to the abstract element whereever
you will allow foreign elements to appear -->
<xsd:element ref="blockExtra" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:element>
In schema Z:
<!-- this element can appear anywhere blockForeignElement appears -->
<xsd:element name="foo" substitutionGroup="blockns:blockExtra">
...
</xsd:element>
A significant limitation is that you can't have one element appear in multiple substitution groups were you could add the same element to multiple internal entities (See
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2000AprJun/0140.html and a side issue of LC-96 in http://www.w3.org/2000/05/12-xmlschema-lcissues.xml).
If your only desire is to say that any element from a different namespace can appear at that location, you could just use the <xsd:any/> construct.
<xsd:element name="block">
<xsd:sequence>
<!-- add a reference to the abstract element whereever
you will allow foreign elements to appear -->
<xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
</xsd:sequence>
</xsd:element>
The syntax may be a little off, but I think the concepts are right.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








