28. DTD for a Single Attribute Starting with a Number, Period, or Dash

An NMTOKEN attribute can only take proper XML names with the exception that names can start with numbers, periods or dashes. Values cannot include white space. The NMTOKEN attribute type can be used to ensure that an attribute valued includes no white space.

Example 28.1 An NMTOKEN Attribute Type
<?xml version="1.0" standalone="yes"?>
<!DOCTYPE rootelement [
<!ELEMENT rootelement (childelement)>
<!ELEMENT childelement (#PCDATA*)>
<!ATTLIST childelement
	sampleattributenmtoken NMTOKEN #IMPLIED>
]>
<rootelement>
	<childelement sampleattributenmtoken="1">Value</childelement>
</rootelement>