DTD Validation and xml

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sainttoff
    New Member
    • Feb 2008
    • 1

    DTD Validation and xml

    Hi all;

    Really hope someone can give us a better solution to this problem than the one I have.


    I have an ipv6 address that has a % sign in it, for example fe80::232:3fff: fe33:44a9%4. I have a dtd file, below is an example of it:

    <!ELEMENT service ((dataId, admin?, iorData*, exe?, launcher?, orbName?, key?)*)>
    <!ELEMENT admin EMPTY>
    <!ATTLIST admin
    name CDATA #REQUIRED
    args CDATA #IMPLIED
    domain ( cfrDomain | adminDomain ) "adminDomai n"
    >


    The validation of this address seems to be done here before its written out to an xml file, but because of the % it gives an error:
    "The entity name must immediately follow the '%' in the parameter entity reference"

    Now there is a way around it by subsituting the % with &#x25; before it goes to the DTD for validation and all works ok.

    Now my question is, is there another way around this with the DTD File, but will also need it to still work with a normal ip address.

    Many Thanks
    Saint
Working...