[xml] External Entity loading?



I just noticed a wierdness.  DTDs are loaded in the same directory as thier
corresponding XML file, but external entities seem to only work in the current
working directory:

Head of my xml file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dictionary SYSTEM "dictionary.dtd" [
        <!ENTITY nasreq SYSTEM "nasreq.xml">
        <!ENTITY mobileipv4 SYSTEM "mobileipv4.xml">
        <!ENTITY sunping SYSTEM "sunping.xml">
]>

xmllint called from a random directory :

   chaos[chaos]: linux$ xmllint -noout -valid /etc/aaa/exampleClient/dictionary/dictionary.xml
   error: failed to load external entity "nasreq.xml"
   error: failed to load external entity "mobileipv4.xml"
   error: failed to load external entity "sunping.xml"
   /etc/aaa/exampleClient/dictionary/dictionary.xml:632: validity error: Element dictionary content doesn't 
follow the Dtd
   Expecting (base , application*), got (base CDATA CDATA CDATA)
   </dictionary>
               ^


xmllint called from the same working directory as the xml file:

   chaos[chaos]: dictionary$ xmllint -noout -valid /etc/aaa/exampleClient/dictionary/dictionary.xml
   chaos[chaos]: dictionary$ 

   [ no output ]


Ideas?  Time for me to upgrade?  (xmllib2.so.2.3.8)

-Dave




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]