Hi all,

I have a very strange problem using SAX (Xerces 1.4.2, JSDK 1.3, RedHat
7) and external DTDs. 

I wrote a small Java program (ValidateXML) which performs validating
parsing. 

I have a file test.xml which references a test.dtd
<!DOCTYPE root_node SYSTEM "test.dtd">

When I call "java ValidateXML test.xml" and all files are in one
directory everything goes right.
But if the test.xml and the DTD are both in an other directory the
parser can't find the DTD when I call "java ValidateXML ../test.xml".
If I change the reference to the DTD everything works well again:
<!DOCTYPE root_node SYSTEM "../test.dtd">

This confuses me, because I don't understand why the path to the DTD is
not relative to the test.xml, but relative to the directory from where
the parser was executed.

Unfortunaltely I can't use http references or absolute paths. I tried
the protocol file, but I couldn't handle relative paths with it.

Thank you very much for your help.

        .\\artin Schmidt

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to