Forums Register Login

DTD NMTOKENS

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
When I was younger I felt like a man trapped inside a woman’s body. Then I was born. My twin is a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1035 times.
Similar Threads
Online resources for XML certification - your opinions needed
transform xml -> xml with xsl(t)
Type ID in DTD
Default processing?
XML-DTD
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 04:49:26.