You are kind of out of luck. The problem is that internal subset stuff has
to override external subset stuff. So if we allowed you to have internal
subset, this wouldn't work, since you'd overwrite it every time. Or we'd
have to make a complete copy of everything and put it back each time. About
the only thing you could do would be to keep the dummy file and DTD in
memory, and do a pre-parse each time of the dummy file, to cause the DTD
info to be reloaded. Then parse the target file with the reuseValidator flag
set.

--------------
Dean Roddey
Software Geek Extraordinaire
Portal, Inc
[EMAIL PROTECTED]



-----Original Message-----
From: Mary Huang [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 12:54 PM
To: [EMAIL PROTECTED]
Subject: Re: validation with arbitrary DTD


Dean,

Thanks for the information. Right now, the files to be parsed do not have
any internal subset, so your suggestion will work. However, if internal
subsets were to come into the picture, what would I resort to then?

Thanks in advance,

Mary Huang

----- Original Message -----
From: "Dean Roddey" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 30, 2001 1:15 PM
Subject: RE: validation with arbitrary DTD


> Do a parse of a dummy file which uses the DTD you want. On subsequent
parses
> on that same parser instance, set the 'reuseValidator' flag to true. This
> will cause it to reuse the contents already in the validator (i.e. the DTD
> that it parsed the last time.)
>
> Note that this will NOT work if the files to be parsed have any internal
> subset!
>
> --------------
> Dean Roddey
> Software Geek Extraordinaire
> Portal, Inc
> [EMAIL PROTECTED]
>
>
>
> -----Original Message-----
> From: Mary Huang [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 30, 2001 8:31 AM
> To: [EMAIL PROTECTED]
> Subject: validation with arbitrary DTD
>
>
> Hi,
>
> My application uses the DOM parser to parse an XML file which does not
> mention a DTD to validate against. I would like the parser to use an
> arbitrary DTD for validation. What's the best way to do this? I have
looked
> at EntityResolver but am not sure how to use it. Is EntityResolver the
only
> way to do this, or is there an alternate method? Any help will be much
> appreciated.
>
> Thanks in advance,
>
> Mary Huang
>
>
> ---------------------------------------------------------------------
> 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]

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

Reply via email to