At 10.55 22/12/2003 -0500, Purdy, Edgar M wrote:
Gareth,

My goal is to bypass the DTD validation.  I am going to assume that the
XML string is valid.

You cannot avoid reading the DTD. For instance, you could have a DTD like this


...
<!ENTITY myEntity "hello">
...

and your XML is like

<greeting>&myEntity;</greeting>

In such a case, even if you are not validating the XML, you must have read the DTD to know that myEntity has the value "hello".

If you are sure that you can really avoid reading the DTD, create an EntityResolver, register it with the DOMParser and make him return an empty string when the parser asks for the content of the DTD file.


Alberto




Ed

-----Original Message-----
From: Gareth Reakes [mailto:[EMAIL PROTECTED]
Sent: Monday, December 22, 2003 10:53 AM
To: [EMAIL PROTECTED]
Subject: RE: DTD validation in DOMPrint


Hi, not validating is different from not reading the dtd. You still have to resolve entities etc. So this is correct behaviour.

Cheers,

Gareth



On Mon, 22 Dec 2003, Purdy, Edgar M wrote:

> If I leave the .dtd file in the debug directory, and change the switch
to -v=never, the DOMPrint sample runs completely through to normal
completion.
> If I remove the .dtd file from the directory DomPrint gives a run time
error.
> I wonder if the -v=never is being processed correctly?
>
> Ed
>
> -----Original Message-----
> From: Denny Vrandecic [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 22, 2003 9:45 AM
> To: [EMAIL PROTECTED]
> Subject: Re: DTD validation in DOMPrint
>
>
> You don't need to change the code. Try using the option -v=never
instead.
> Does this help?
>
> > I am experimenting with the DOMPrint sample code.
> >
> > I am making the assumption that the XML string is valid.
> > What changes do I make in the DOMPrint code to bypass the DTD
validation
> sequence????
> >
> > Thanks
> >
> > Ed Purdy
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>

--
Gareth Reakes, Head of Product Development  +44-1865-203192
DecisionSoft Limited                        http://www.decisionsoft.com
XML Development and Services




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to