RE: Element containing a list of IDs

Are you sure that you want a list of ID's instead of a list of IDREF's.  If you are using ID's, then you are declaring a set of ID's that all point to the same element and can not appear as an ID
anywhere else in the document.  If IDREF's, then each member in the set is a reference to an ID that appears elsewhere in the document.

If you mean IDREF's, then you can just restrict the build-in IDREF's type:

<xsd:element name="endids">
	<xsd:simpleType>
		<xsd:restriction base="xsd:IDREFS">
			<xsd:length value="6"/>
		</xsd:restriction>
	</xsd:simpleType>
</xsd:element>

The length would mean that you always want endids to contain exactly 6 elements.  If you want to say at most 6 elements, then use maxLength.  If you don't care to constrain the number of elements,
then all you need to do is:

<xsd:element name="endids" type="xsd:IDREFS"/>

Received on Thursday, 21 December 2000 15:10:50 UTC