[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: XHTML m12n XSD

  • From: "Arnold, Curt" <Curt.Arnold@h...>
  • To: "'xml-dev@x...'" <xml-dev@x...>
  • Date: Thu, 04 Jan 2001 15:54:53 -0700

xsd abstract element
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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.