J
Jesse
Hi all,
my application reads and validate an XML file with a specific DTD. The two
are defined in separate files (no local declaration of the DTD in the XML).
The location of both the XML and the DTD is resolved at runtime. Indeed, due
to various deployment issues, the location of both files cannot be
statically defined. Even the relative path from the XML to its DTD cannot be
ensured.
Is there a way to parameter the DOCTYPE declaration to allow runtime setting
of the path to the DTD ?
For example using environment variables, with something like:
<!DOCTYPE greeting SYSTEM "$PATH_TO_DTD/hello.dtd">
If it exists, this is very likely to be a paser specific feature, toggled
via org.xml.sax.XMLReader setProperty or setFeature. However, I cannot find
anything relevant at
http://www.saxproject.org/apidoc/org/xml/sax/package-summary.html, nor at
http://xerces.apache.org/xerces2-j/features.html or
http://xerces.apache.org/xerces2-j/properties.html.
Indeed, I am using the XERCES SAX parser.
Thanks in advance,
JC.
my application reads and validate an XML file with a specific DTD. The two
are defined in separate files (no local declaration of the DTD in the XML).
The location of both the XML and the DTD is resolved at runtime. Indeed, due
to various deployment issues, the location of both files cannot be
statically defined. Even the relative path from the XML to its DTD cannot be
ensured.
Is there a way to parameter the DOCTYPE declaration to allow runtime setting
of the path to the DTD ?
For example using environment variables, with something like:
<!DOCTYPE greeting SYSTEM "$PATH_TO_DTD/hello.dtd">
If it exists, this is very likely to be a paser specific feature, toggled
via org.xml.sax.XMLReader setProperty or setFeature. However, I cannot find
anything relevant at
http://www.saxproject.org/apidoc/org/xml/sax/package-summary.html, nor at
http://xerces.apache.org/xerces2-j/features.html or
http://xerces.apache.org/xerces2-j/properties.html.
Indeed, I am using the XERCES SAX parser.
Thanks in advance,
JC.