W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2002

Restriction of SEQUENCE of ANY

From: by way of <lpjcoyle@ihc.com>
Date: Wed, 27 Mar 2002 17:09:19 -0700
Message-Id: <5.1.0.14.1.20020327170916.0604a410@localhost>
To: W3C XML Schema Comments list <www-xml-schema-comments@w3.org>
Please add this to 1.1, it is so much easier than using substitution 
groups!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Schema now allows one to do sequence of ANY, and restrict ANY to a 
namespace.   I would love the ability to restrict ANY to a certain type and 
subtypes of that type.  Is there a reason not to do this??

<complexType name="basetype">
	<sequence>
		<any restriction="myType" maxOccurs="unbounded"/>
	</sequence>
</complexType>

This would allow only a sequence of elements of type "myType" or 
restrictions of "myType",  And would allow the following!!!


<complexType name="newtype">
	<complexContent>
		<restriction base="basetype">
			<sequence>
				<element name="e1" type="myTypeRestriction1"/>
				<element name="e2" type="myTypeRestriction2"/>
				<element name="e3" type="myTypeRestriction3"/>
			</sequence>
		</restriction>
	</complexContent>
</complexType>

thank you,

Joseph Coyle, MD
Medical Informatics
Intermountain Health Care
Received on Wednesday, 27 March 2002 20:19:58 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:15:33 UTC