OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.