Hi,
IIRC you can't currently do this easily through the standard API
(I can't recall the last time I worked with a DTD :)). Options:
i) add a doctype after you get the document.
ii) Take a look at some code in Pathan which does validation of sub trees
by looking the root node up in the current grammars. You should be able to
use this to validate the document against any grammar you have. If you
take a look at the API for Grammar you should be able to do this anyway.
Gareth
On Thu, 27 May 2004 [EMAIL PROTECTED] wrote:
> Hi,
>
> I would like to validate xml dokuments with always the same DTD.
> The XML file can have a DOCTYPE .. line or not.
> I can not change the XML file.
>
> If I'm getting a XML dokument with a DOCTYPE I'm able to change the DTD to my
> default DTD (I'm using the HandlerBase::resolveEntity) - no problem
>
> But if I'm getting a XML File without DOCTYPE am not able to change the DTD
> because resolveEntity is not called. This is my problem.
>
> How can I force a default DTD
>
> Thanks.
>
> Christian
>
>
>
>
>
> -------------------------------------------------
> This mail sent through IMP: http://horde.org/imp/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
Gareth Reakes, Managing Director Parthenon Computing
+44-1865-811184 http://www.parthcomp.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]