Hi Matthias,
try adding a try/catch for NetAccessorException to have more
informations about the failure. I guess the error could be caused by the
HTTP redirecting the client to a different location; in this case you
should use the final address, or install an entity resolver to have the
possibility to fetch the DTD from file system or by the web server using
WinInet functions.
Alberto
Matthias Hopfer wrote:
Hi there,
I'm using xerces-c 2.8.0 without any problems under winxp and vc6.0.
Recently i tried to validate external DTDs which really works fine
unless the path to the DTD-file is stored on a distant server or on a
different machine. The options needed for external validation are set
properly ( ...setValidationScheme ( XercesDOMParser::Val_Always ) and
...setLoadExternalDTD ( true ) ).
For example:
<!-- -->
<!DOCTYPE message SYSTEM "http://webserver/sample.dtd">
<!-- -->
Will catch an unknown exception during parsing, while
<!-- -->
<!DOCTYPE message SYSTEM "sample.dtd">
<!-- -->
Works fine (assuming that for 1st case the server is running and
accessible and 2nd case the sample.dtd is found in the app's directory).
Is there anything i do wrong or missing?
Thanks in advance,
Matthias