19. DTD for a Required Attribute Value

If an attribute does not have a default value but requires a value to be assigned the #REQUIRED keyword may be used.

Example 19.1 An example of a required attribute value:
<?xml version="1.0" standalone="yes"?>
<!DOCTYPE rootelement [
<!ELEMENT rootelement (childelement)>
<!ELEMENT childelement (#PCDATA)>
<!ATTLIST childelement
sampleattribute CDATA #REQUIRED>
]>
<rootelement>
	<childelement sampleattribute="A required value assigned.">
		Child element.
	</childelement>
<rootelement>