Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Special character in dtd default attribute

Reply
Thread Tools

Special character in dtd default attribute

 
 
Ajay Goel
Guest
Posts: n/a
 
      07-16-2003
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.
 
Reply With Quote
 
 
 
 
Johannes Koch
Guest
Posts: n/a
 
      07-17-2003
Ajay Goel wrote:
> 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>
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
external DTD with % as default attribute value Sjoerd Mullender XML 2 02-13-2008 08:14 AM
Special character problem in DTD Aray XML 10 12-19-2006 08:31 AM
How to specify DTD to DTD.getDTD for DocumentParser? Ronald Fischer Java 4 03-17-2005 09:37 AM
Removing the dtd name when using print(...) on the dtd generated class Joseph Tilian Java 0 12-21-2004 02:58 PM
Getting default value of an attribute from the DTD file Alexander XML 0 07-11-2004 02:46 PM



Advertisments