27. DTD for an Attribute Referencing Multiple Elements by ID

The IDREFS attribute type holds the values of multiple ID attributes of some other elements within a document. White space is used to seperate each id reference.

Example 27.1 An IDREFS Attribute Type
<?xml version="1.0" standalone="yes"?>
<!DOCTYPE rootelement [
<!ELEMENT rootelement (childelement)>
<!ELEMENT childelement (#PCDATA*)>
<!ATTLIST childelement
	sampleattributeid ID #REQUIRED>
	sampleattributerefids IDREFS #IMPLIED>
]>
<rootelement>
	<childelement sampleattributeid="1">Child element.</childelement>
	<childelement sampleattributeid="2"> Child element.</childelement>
	<childelement sampleattributeid="3" sampleattribute2refids="1 2">
		Child element.
	</childelement>	
</rootelement>