• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DTD NMTOKENS

 
Tito Ortiz
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
okay NMTOKENS are starting to bug me. mainly cause i've found conflicting info about what they consist of in regards to tabs, carriage returns, more than one space etc.
for example on the zvon.org tutorial example 10;
http://www.zvon.org/xxl/DTDTutorial/Output/example10.html
they show xml files with tabs, carriage returns referencing a DTD that define NMTOKENS as the attribute type. So i think okay i can use these as much as I want.
then i try it in xml spy and i get validation errors about that specific attribute when i have the extra whitespace, etc.
I read my oreilly "xml in a nutshell" and on page 41(NMTOKENS) they just say that NMTOKENS contain one or more XML name tokens separated by a whitespace. with no mention of tabs, CRs, etc.
So what's the deal?!?!? Which way is right and if they are both right and it's all inclusive then why does my xml spy report a validation error. I know I'm typing in the same stuff as in the tutorial. Hopefully someone can point me towards the light.
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Tito,
'XML in a nutshell' somehow defines whitespace on page 17 as such - "XML names may not contain whitespace of any kind, whether a space, a carriage return, a line feed, or a nonbreaking space."
However, it's not clear here whether a whitespace can hold multiple whitespaces ;-). If not then it seems you have no conflict, otherwise you do have.
Cheers,
Dan
 
Mapraputa Is
Leverager of our synergies
Sheriff
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question was discussed here: http://www.coderanch.com/t/124898/XML/NMTOKENS-supports-seperation-tabs-CRs
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic