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 Bill Klein <bi...@orbit.org> on 2001/03/10 16:29:09 UTC

Downloading of DTDs

Hi all,

When I feed an XML file into the Xerces DOM parser, am I right in
thinking that it downloads all the DTDs referred to in the XML file?

Is there a way to stop this if I don't need validation? I have tried
using setValidationScheme( DOMParser::Val_Never ); but it doesn't
seem to help.

Failing that, if I know which DTDs will be needed and make them
available locally, can I point Xerces to where they are and tell it
to use them?

Many thanks!

-Bill

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


Re: Downloading of DTDs

Posted by Dean Roddey <dr...@charmedquark.com>.
You can't make it ignore them. The reason being that DTDs are more than
validation mechanisms. They provide definitions of entities, default
attributes, id attributes, idref attributes, notations, etc... So they can
have a lot of influence on the document even if validation is not enabled.

You can bring them locally and use the redirection mechanism (entity
resolver) to redirect the parser to somewhere besides the literal system id.
See the Redirect sample program.

--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"I'm not sure how I feel about ambivalence"


----- Original Message -----
From: "Bill Klein" <bi...@orbit.org>
To: <xe...@xml.apache.org>
Sent: Saturday, March 10, 2001 7:29 AM
Subject: Downloading of DTDs


> Hi all,
>
> When I feed an XML file into the Xerces DOM parser, am I right in
> thinking that it downloads all the DTDs referred to in the XML file?
>
> Is there a way to stop this if I don't need validation? I have tried
> using setValidationScheme( DOMParser::Val_Never ); but it doesn't
> seem to help.
>
> Failing that, if I know which DTDs will be needed and make them
> available locally, can I point Xerces to where they are and tell it
> to use them?
>
> Many thanks!
>
> -Bill
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>


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