22. DTD for an Attribute Entity Name

An attribute can be set to the name of an entity declared.

Example 22.1 An Attribute ENTITY Type
<?xml version="1.0" standalone="yes"?>
<!DOCTYPE rootelement [
<!ELEMENT rootelement (childelement1)>
<!ELEMENT childelement (#PCDATA)>
<!ATTLIST childelement
	sampleattribute ENTITY #IMPLIED
<!ENTITY sampleentity SYSTEM "entity reference value">
]>
<rootelement>
	<childelement sampleattribute="sampleentity">
	Child element.
	</childelement>
</rootelement>