xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Peter Murray-Rust <pm286 AT cam.ac.uk>
- To: Elliotte Rusty Harold <elharo AT ibiblio.org>
- Cc: XOM API for Processing XML with Java <xom-interest AT lists.ibiblio.org>
- Subject: Re: [XOM-interest] Problem: Base URI for XInclude
- Date: Mon, 7 Mar 2011 15:33:15 +0000
On Mon, Mar 7, 2011 at 3:15 PM, Elliotte Rusty Harold
<elharo AT ibiblio.org>wrote:
> On Mon, Mar 7, 2011 at 6:57 AM, Peter Murray-Rust <pm286 AT cam.ac.uk> wrote:
>
> >
> > The root of the document is created from an InputStream rather than a
> file
> > and I'm guessing that this is the problem. If so, is there a workaround
> or
> > can XOM/XInclude not be used with streams? OTOH if it's just my learning
> > curve please suggest other fixes.
> >
>
> You're going to need to tell the Builder where the base URI is. I.e
> use the method
>
> public Document build(InputStream in, String baseURI)
>
> rather than simply
>
> public Document build(InputStream in)
>
>
Thanks,
I am trying to work out why it worked with DTD/ENTITYs and not with XInclude
- presumably because the filename of the DTD was regarded as a baseURI or
similar? The XML files starts:
<!DOCTYPE template SYSTEM
"src/main/resources/org/xmlcml/cml/converters/compchem/compchem.dtd" [...
which is relative to the working directory (".") So
"src/main/resources/org/xmlcml/cml/converters/compchem" should act as a
BaseURI...
> --
> Elliotte Rusty Harold
> elharo AT ibiblio.org
>
--
Peter Murray-Rust
Reader in Molecular Informatics
Unilever Centre, Dep. Of Chemistry
University of Cambridge
CB2 1EW, UK
+44-1223-763069
-
[XOM-interest] Problem: Base URI for XInclude,
Peter Murray-Rust, 03/07/2011
-
Re: [XOM-interest] Problem: Base URI for XInclude,
Elliotte Rusty Harold, 03/07/2011
-
Re: [XOM-interest] Problem: Base URI for XInclude,
Peter Murray-Rust, 03/07/2011
-
Re: [XOM-interest] Problem: Base URI for XInclude,
Elliotte Rusty Harold, 03/07/2011
-
Re: [XOM-interest] Problem: Base URI for XInclude,
Peter Murray-Rust, 03/07/2011
-
Re: [XOM-interest] Problem: Base URI for XInclude,
Elliotte Rusty Harold, 03/07/2011
-
Re: [XOM-interest] Problem: Base URI for XInclude,
Fred Vos, 03/07/2011
- Re: [XOM-interest] Problem: Base URI for XInclude, Peter Murray-Rust, 03/07/2011
-
Re: [XOM-interest] Problem: Base URI for XInclude,
Fred Vos, 03/07/2011
-
Re: [XOM-interest] Problem: Base URI for XInclude,
Elliotte Rusty Harold, 03/07/2011
-
Re: [XOM-interest] Problem: Base URI for XInclude,
Peter Murray-Rust, 03/07/2011
-
Re: [XOM-interest] Problem: Base URI for XInclude,
Elliotte Rusty Harold, 03/07/2011
-
Re: [XOM-interest] Problem: Base URI for XInclude,
Peter Murray-Rust, 03/07/2011
-
Re: [XOM-interest] Problem: Base URI for XInclude,
Elliotte Rusty Harold, 03/07/2011
Archive powered by MHonArc 2.6.24.