DTD Attribute Types - NMTOKEN

An NMTOKEN (name token) is any mixture of Name characters. It cannot contain whitespace (although leading or trailing whitespace will be trimmed/ignored).

While Names have restrictions on the initial character (the first character of a Name cannot include digits, diacritics, the full stop and the hyphen), the NMTOKEN doesn't have these restrictions.

Syntax:

Example:

Valid XML - The following XML document would be valid, as it conforms to the above DTD:

Invalid XML - The following XML document would be invalid because the value of the first attribute contains internal whitespace: