Hi, I would like to know what is NMTOKEN as given by the XML 1.0 specification.
Leverager of our synergies
Joined: Aug 26, 2000
as given by the XML 1.0 specification NMTOKEN is  Nmtoken ::= (NameChar)+ Where NameChar is defined as NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender "letter, " "digit" et al are references to corresponding Unicode definitions, I suppose. So basically "NMTOKEN" consists of letters, digits, and . - _ : characters.
Joined: Nov 22, 2008
NMTOKEN's are used to describe attribute type declarations. I quote Norman Walsh from his article "A Technical Introduction to XML ": "Name token attributes are a restricted form of string attribute. In general, an NMTOKEN attribute must consist of a single word [Section 1.5, production 7], but there are no additional constraints on the word, it doesn't have to match another attribute or declaration." Vinayak
Joined: Mar 06, 2001
as indicated , you w'd want to consider NMTOKEN as against PCDATA when you are sure that the attribute value needs to be a single word and not many words. <person age="10"/> if age is declared as type CDATA, it can take any value. But when declared as NMTOKEN you can atleast be sure that it can't be "hello world". But it can be "hello" for sure. But then if you are lookign for strong data typing, you w'd probably go for schemas. Am not aware of any other advantages of NMTOKEN Others can probably comment on that.