W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2001

Extension via restriction question

From: Mark Feblowitz <mfeblowitz@frictionless.com>
Date: Mon, 10 Dec 2001 14:53:25 -0500
Message-ID: <4DBDB4044ABED31183C000508BA0E97F024D55CC@fcpostal.frictionless.com>
To: "Xmlschema-Dev (E-mail)" <xmlschema-dev@w3.org>
Is it an accepted practice to extend via restriction? 

What I have in mind is the prospect of placing an "any" with a namespace of
"##other"  (maxOccurs="unbounded") in an element E and then restricting E by
placing additional elements before the any, namespace-prefixing each. 

		<xs:element name="H" type="POHB" minOccurs="0"/>
		<xs:element name="L" type="POLB" minOccurs="0"
maxOccurs="unbounded"/>
		<xs:any namespace="##other" minOccurs="0"
maxOccurs="unbounded"/>
	...

becomes
		<xs:element name="H" type="POHB" minOccurs="0"/>
		<xs:element name="L" type="POLB" minOccurs="0"
maxOccurs="unbounded"/>
		<xs:element name="C" type="POCB" minOccurs="0"
maxOccurs="unbounded"/>
		<xs:any namespace="##other" minOccurs="0"
maxOccurs="unbounded"/>
	...
	
It appears to be a kosher means of restricting, since, in a way, it
constrains the any by defining specifically which of the elements is to be
present. Still, it seems a little shady

Is this deemed a safe practice? Is it one that will be permitted in future
Schema editions? 

Thanks,

Mark
----------------------------------------------------------------------------
----
 
Mark Feblowitz                                   [t] 617.715.7231
Frictionless Commerce Incorporated     [f] 617.495.0188 
XML Architect                                     [e]
mfeblowitz@frictionless.com
400 Technology Square, 9th Floor 
Cambridge, MA 02139 
www.frictionless.com  
 
Received on Monday, 10 December 2001 14:53:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:25 GMT