Hi Alberto,
Thanks für the hint and sorry for answering this late (indulged myself in some
days off =).
catch ( const NetAccessorException& toCatch )
{
char* message = XMLString::transcode ( toCatch.getMessage() );
TRACE ( _T("catched NetAccessorException: %s\n"), message );
XMLString::release(&message);
success = -1;
return success;
}
Simply adding a catch block for NetAccessorExceptions seems to work fine. Is
this really possible? Are the URL-handlers installed by adding the block?
Matthias
-----Original Message-----
From: Alberto Massari [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 20, 2008 2:53 PM
To: [email protected]
Subject: Re: Validating extern DTD on distant server/machine
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
>
>
>