Special character in dtd default attribute

Discussion in 'XML' started by Ajay Goel, Jul 16, 2003.

  1. Ajay Goel

    Ajay Goel Guest

    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.
     
    Ajay Goel, Jul 16, 2003
    #1
    1. Advertising

  2. 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.)
     
    Johannes Koch, Jul 17, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joseph Tilian
    Replies:
    0
    Views:
    360
    Joseph Tilian
    Dec 21, 2004
  2. Ronald Fischer
    Replies:
    4
    Views:
    1,772
    Ronald Fischer
    Mar 17, 2005
  3. Alexander
    Replies:
    0
    Views:
    320
    Alexander
    Jul 11, 2004
  4. Aray
    Replies:
    10
    Views:
    937
  5. Sjoerd Mullender
    Replies:
    2
    Views:
    345
    Sjoerd Mullender
    Feb 13, 2008
Loading...

Share This Page