commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tal Dayan" <...@zapta.com>
Subject RE: [digester] using non URL'ed DTD's
Date Wed, 14 Nov 2001 07:01:10 GMT
Thanks. This works. The DTD file is now recognized and I can see printout of
exceptions if the
XML document does not match the DTD.

Now, how do I abort the parsing and throw an exception if the validation
(using the DTD) fails ? Currently the parsing just continues as usual so
when the parsing ends, the application does not know if the XML document was
valid or not.

And next step, how can I check if the public ID of the DTD in the XML
document was the expected one (for which we set a local resolver using the
register() method) ?

Thanks,

Tal

> -----Original Message-----
> From: Louis Tribble [mailto:louis.tribble@webgain.com]
> Sent: Tuesday, November 13, 2001 8:19 PM
> To: Jakarta Commons Developers List
> Subject: Re: [digester] using non URL'ed DTD's
>
>
> > We are still not able to use a DTD for validation because our
> DTD file has a
> > path that
> > is not acceptable by Digester and/or the underlying XML parser
> (the URL is
> > 'file://d:/a/b/c.dtd' but the Windows drive letter 'd:' confuses
> > everything).
>
> >From RFC 1738:
> > A file URL takes the form:
> >
> >    file://<host>/<path>
> >
> > <snip>
> > As a special case, <host> can be the string "localhost" or the
> empty string; this
> > is interpreted as `the machine from which the URL is being interpreted'.
>
> With two slashes, "d:" is a host name. With three slashes, the
> URL should be interpreted
> correctly. By the grace of many URL parsers, one slash sometimes
> works too.
>
> Louis Tribble
>
>
> --
> To unsubscribe, e-mail:
> <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:commons-dev-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message