You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by George Tsai <GT...@scient.com> on 2000/07/12 00:05:58 UTC

ignore DTD in XML document and provide an DTD at runtime

Hi, All,

I had XML files created by XML applications on Windows. Those documents has
declaration like:

<!DOCTYPE DOC PUBLIC "-//myDoc//My Doc V1.0//EN" "file:///C:/appl/mydoc.dtd"
[ <!ENTITY % revision "Rev 2">]>

The problem is when I process those files in a UNIX server, xerces1.1.1
complains mydoc.dtd not found for obvious reason.

How can I ignore the DTD System Id, and even better, to provide a local DTD
when xerces is running?

Thanks

George Tsai

Re: ignore DTD in XML document and provide an DTD at runtime

Posted by Lisa Retief <li...@exinet.co.za>.
You need to implement your own org.xml.sax.EntityResolver.

George Tsai wrote:

> Hi, All,
>
> I had XML files created by XML applications on Windows. Those documents
has
> declaration like:
>
> <!DOCTYPE DOC PUBLIC "-//myDoc//My Doc V1.0//EN"
"file:///C:/appl/mydoc.dtd"
> [ <!ENTITY % revision "Rev 2">]>
>
> The problem is when I process those files in a UNIX server, xerces1.1.1
> complains mydoc.dtd not found for obvious reason.
>
> How can I ignore the DTD System Id, and even better, to provide a local
DTD
> when xerces is running?
>
> Thanks
>
> George Tsai
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
>
>