Special character in dtd default attribute

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ajay Goel

    Special character in dtd default attribute

    I have a dtd which validates data
    <!ATTLIST Attr1
    OS (Windows | XP ) "Windows"
    country (USA | CAN) "USA"[color=blue]
    >[/color]

    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.
  • Johannes Koch

    #2
    Re: Special character in dtd default attribute

    Ajay Goel wrote:[color=blue]
    > 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"[/color]

    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.)

    Comment

    Working...