You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Craig R. McClanahan" <cr...@apache.org> on 2001/11/14 03:55:30 UTC

RE: [digester] using non URL'ed DTD's


On Tue, 13 Nov 2001, Tal Dayan wrote:

> Date: Tue, 13 Nov 2001 18:59:30 -0800
> From: Tal Dayan <ta...@zapta.com>
> Reply-To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> Subject: RE: [digester] using non URL'ed  DTD's
>
> Hello,
>
> 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).

Digester couldn't care less, as long as the JDK doesn't throw
MalformedURLException.  If your parser chokes on this, it's time to get a
better parser :-).  Or, figure out what your parser *will* accept for
Windows-based file paths.  That's up to whatever parser you are using, not
Digester.

> Actually, this is a more general issue in cases where the DTD
> can not be referred to by a URL (e.g., when it is taken directly from a data
> base).
>
> My suggestion is to add another registration method that accepts a Reader
> instead of the URL. This way the DTD can be retrieved from file, in memory
> cache buffer, etc.
>

Both JAXP/1.1 and Xerces 1.4.3 work for me, on both Windows and Unix.

> Thanks,
>
> Tal
>

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: [digester] using non URL'ed DTD's

Posted by Tal Dayan <ta...@zapta.com>.
Any objection from the maintainers of Digester for adding a register(...,
InputStream) method ?

Internally, the digester converts anyway the URL to an InputStream. This
will allow to accept a DTD from any source (memory, database, etc) and not
just a URL'ed resource. This is supported anyway by the underlying parsers.

I may provide the code if needed.

Tal

> -----Original Message-----
> From: craigmcc@localhost [mailto:craigmcc@localhost]On Behalf Of Craig
> R. McClanahan
> Sent: Tuesday, November 13, 2001 6:56 PM
> To: Jakarta Commons Developers List
> Subject: RE: [digester] using non URL'ed DTD's
>
>
>
>
> On Tue, 13 Nov 2001, Tal Dayan wrote:
>
> > Date: Tue, 13 Nov 2001 18:59:30 -0800
> > From: Tal Dayan <ta...@zapta.com>
> > Reply-To: Jakarta Commons Developers List
> <co...@jakarta.apache.org>
> > To: Jakarta Commons Developers List <co...@jakarta.apache.org>
> > Subject: RE: [digester] using non URL'ed  DTD's
> >
> > Hello,
> >
> > 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).
>
> Digester couldn't care less, as long as the JDK doesn't throw
> MalformedURLException.  If your parser chokes on this, it's time to get a
> better parser :-).  Or, figure out what your parser *will* accept for
> Windows-based file paths.  That's up to whatever parser you are using, not
> Digester.
>
> > Actually, this is a more general issue in cases where the DTD
> > can not be referred to by a URL (e.g., when it is taken
> directly from a data
> > base).
> >
> > My suggestion is to add another registration method that
> accepts a Reader
> > instead of the URL. This way the DTD can be retrieved from
> file, in memory
> > cache buffer, etc.
> >
>
> Both JAXP/1.1 and Xerces 1.4.3 work for me, on both Windows and Unix.
>
> > Thanks,
> >
> > Tal
> >
>
> Craig
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>