Name

xsd:NMTOKEN — XML 1.0 name token (NMTOKEN)

Synopsis

<xsd:simpleType name="NMTOKEN” id="NMTOKEN">
 <xsd:restriction base="xsd:token">
 <xsd:pattern value="\c+"/>
 </xsd:restriction>
</xsd:simpleType>

Derived from

xsd:token

Primary

xsd:string

Known subtypes

xsd:NMTOKENS

Data parameters (facets)

enumeration, length, maxLength, minLength, pattern

Description

The lexical and value spaces of xsd:NMTOKEN are the set of XML 1.0 name tokens, tokens composed of characters, digits, period, colons, hyphens, and the characters defined by Unicode, such as “combining” or “extender.”

Restrictions

This type is usually called a token.

Example

Valid values include Snoopy, CMS, 1950-10-04, and 0836217462.

Invalid values include brought classical music to the Peanuts strip (spaces are forbidden) and bold,brash (commas are forbidden).

Get RELAX NG now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.