29. DTD for Multiple Attributes Starting with a Number, Period, or Dash

NMTOKENS are used for attribute values that require to be separated by white space. An NMTOKEN attribute value can only take proper XML names with the exception that names can start with numbers, periods or dashes. Values cannot include white space. The NMTOKENS attribute type can be used to ensure that attribute values do not include white space.

Example 29.1 An NMTOKENS Attribute Type
<?xml version="1.0" standalone="yes"?>
<!DOCTYPE rootelement [
<!ELEMENT rootelement (childelement)>
<!ELEMENT childelement (#PCDATA*)>
<!ATTLIST childelement
	sampleattributenmtokens NMTOKENS #IMPLIED>
		sampleattributenmtokens="attributevalue1 attributevalue2">
		Child element.