Special character in dtd default attribute

A

Ajay Goel

I have a dtd which validates data
<!ATTLIST Attr1
OS (Windows | XP ) "Windows"
country (USA | CAN) "USA"
I need to add a special charater "slash" in one of the default values,
say OS (Windows | XP | 2000/NT) "Windows"

How do I do this? I tried creating entity but I couldn't create entity
for unparsed data.
 
J

Johannes Koch

Ajay said:
I have a dtd which validates data
<!ATTLIST Attr1
OS (Windows | XP ) "Windows"
country (USA | CAN) "USA"


I need to add a special charater "slash" in one of the default values,
say OS (Windows | XP | 2000/NT) "Windows"

You can't; the values of the enumeration must meet the production rule
for Nmtoken:

[59] Enumeration ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')'
<http://www.w3.org/TR/REC-xml.html#NT-Enumeration>

[7] Nmtoken ::= (NameChar)+
<http://www.w3.org/TR/REC-xml.html#NT-Nmtoken>

[4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar
| Extender
<http://www.w3.org/TR/REC-xml.html#NT-NameChar>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top