You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by "J. Scott Amort" <js...@telus.net> on 2002/11/29 01:48:25 UTC
Question Regarding Validation
I'm using JAXP 1.2 and the latest Xerces-J (2.2.1). I have:
factory.setValidating(false);
Where factory is my DocumentBuilderFactory. However, the XML file does
have a !DOCTYPE header containing a reference to a DTD, and
standalone=no. The parser seems to try to find this DTD, even though I
don't want it to validate. And when it can't find it, I get a "no
protocol: //somedtd.dtd" error. How can I prevent this?
My application will use XML files generated by another app which
includes a local DTD reference. However, my app may or may not be run
on the same computer as that DTD, so I don't want it to look for it (but
I can't alter how that app writes its XML files). I hope this is
somewhat clear. Thanks for any help.
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: Question Regarding Validation
Posted by "J. Scott Amort" <js...@telus.net>.
On Thu, 2002-11-28 at 16:59, Simon Kitching wrote:
> Hi,
>
> You may find the following email useful:
>
>
> http://xml.apache.org/xerces2-j/features.html
>
> esp.feature
> "http://apache.org/xml/features/nonvalidating/load-external-dtd."
>
> NB: I haven't tried this myself. I use an alternate approach where I
> register an EntityResolver and return an empty DTD.
>
> For some background info, you may find Glenn's comments here useful:
> http://marc.theaimsgroup.com/?l=xerces-j-user&m=103728668825453&w=2
>
> Regards,
>
> Simon
Thanks Simon, I went with your alternate approach actually, and it
worked like a charm. Thanks again.
Scott
>
> On Fri, 2002-11-29 at 13:48, J. Scott Amort wrote:
> > I'm using JAXP 1.2 and the latest Xerces-J (2.2.1). I have:
> >
> > factory.setValidating(false);
> >
> > Where factory is my DocumentBuilderFactory. However, the XML file does
> > have a !DOCTYPE header containing a reference to a DTD, and
> > standalone=no. The parser seems to try to find this DTD, even though I
> > don't want it to validate. And when it can't find it, I get a "no
> > protocol: //somedtd.dtd" error. How can I prevent this?
> >
> > My application will use XML files generated by another app which
> > includes a local DTD reference. However, my app may or may not be run
> > on the same computer as that DTD, so I don't want it to look for it (but
> > I can't alter how that app writes its XML files). I hope this is
> > somewhat clear. Thanks for any help.
> >
> > Scott
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-j-user-help@xml.apache.org
--
J. Scott Amort <js...@telus.net>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: Question Regarding Validation
Posted by Simon Kitching <si...@ecnetwork.co.nz>.
Hi,
You may find the following email useful:
http://xml.apache.org/xerces2-j/features.html
esp.feature
"http://apache.org/xml/features/nonvalidating/load-external-dtd."
NB: I haven't tried this myself. I use an alternate approach where I
register an EntityResolver and return an empty DTD.
For some background info, you may find Glenn's comments here useful:
http://marc.theaimsgroup.com/?l=xerces-j-user&m=103728668825453&w=2
Regards,
Simon
On Fri, 2002-11-29 at 13:48, J. Scott Amort wrote:
> I'm using JAXP 1.2 and the latest Xerces-J (2.2.1). I have:
>
> factory.setValidating(false);
>
> Where factory is my DocumentBuilderFactory. However, the XML file does
> have a !DOCTYPE header containing a reference to a DTD, and
> standalone=no. The parser seems to try to find this DTD, even though I
> don't want it to validate. And when it can't find it, I get a "no
> protocol: //somedtd.dtd" error. How can I prevent this?
>
> My application will use XML files generated by another app which
> includes a local DTD reference. However, my app may or may not be run
> on the same computer as that DTD, so I don't want it to look for it (but
> I can't alter how that app writes its XML files). I hope this is
> somewhat clear. Thanks for any help.
>
> Scott
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
--
Simon Kitching <si...@ecnetwork.co.nz>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org