You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Lumir Vanek <va...@valachnet.cz> on 2005/08/12 10:49:52 UTC

Accessing external DTD over network

Hi,

I have XML, that contain link to external DTD:
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" 
"http://www.w3.org/TR/SVG/DTD/svg10.dtd"> 

While opening it using Xerces-C 2.6, I get error:
An exception occurred! Type:NetAccessorException, Message:Could not open 
file: http://www.w3.org/TR/SVG/DTD/svg10.dtd

When I try open this URL in browser, it works. What is wrong ?

Thanks,
Lumir Vanek

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: Accessing external DTD over network

Posted by Alberto Massari <am...@datadirect.com>.
Hi,
opening that URL using telnet I get this document:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>301 Moved Permanently</TITLE>
</HEAD><BODY>
<H1>Moved Permanently</H1>
The document has moved
<A HREF="http://www.w3.org/TR/SVG10/DTD/svg10.dtd">here</A>.<P>
</BODY></HTML>

The socket-based NetAccessors don't handle redirects, so either you 
use the http://www.w3.org/TR/SVG10/DTD/svg10.dtd URL or you try the 
more capable libWWW NetAccessor.

Alberto
At 10.49 12/08/2005 +0200, Lumir Vanek wrote:
>Hi,
>
>I have XML, that contain link to external DTD:
><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" 
>"http://www.w3.org/TR/SVG/DTD/svg10.dtd">
>While opening it using Xerces-C 2.6, I get error:
>An exception occurred! Type:NetAccessorException, Message:Could not 
>open file: http://www.w3.org/TR/SVG/DTD/svg10.dtd
>
>When I try open this URL in browser, it works. What is wrong ?
>
>Thanks,
>Lumir Vanek
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>For additional commands, e-mail: c-dev-help@xerces.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org