xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Elliotte Harold <elharo AT metalab.unc.edu>
- To: pduffin AT volantis.com
- Cc: xom-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] XIncluder entity resolution
- Date: Mon, 18 Aug 2008 08:23:12 -0700
Paul Duffin wrote:
Basically, I have a number of documents that include boilerplate and
common fragments. These fragments are stored in an Ivy / Maven
repository and extracted automatically as part of the build. At the
moment the xi:include href attribute has to point directly to the
fragments and that makes the document dependent on the build and
repository structure. What I would like to do is use some well known
pseudo URLs, e.g. template:/copyright.xml and have the build use an
XMLCatalog to map that to the actual artifact extracted from ivy.
Your use case is common and reasonable. However I strongly reocmmend using standard http or file URLs for this, not inventing a new scheme.
I have had a look at the XIncluder source and can see that there is no
way to do that, as it constructs and accesses the URL directly. So the
questions I have are:
1) Is this something that other people would find useful ?
Yes.
2) Is this something you (ERH) would like to see in the XIncluder ?
Yes.
3) If so how do you think it should be done ?
XML Catalog support is on my TODO list but barring serious interest (that is, funding) it's liable to take some time (possibly years) till I get around to it.
I do think the XIncluder is the wrong place to put this though. It needs to slip in at a lower layer in the Builder class. Maybe a subclass of Builder or just an extra method on Builder to supply a catalog or list of catalogs?
Possibly you could hack something together quickly simply by passing in a properly configured XMLReader to the Builder. That would probably work for including XML documents. However text documents are loaded directly without passing through the builder so that would need some work inside XIncluder to truly enable.
--
Elliotte Rusty Harold elharo AT metalab.unc.edu
Refactoring HTML Just Published!
http://www.amazon.com/exec/obidos/ISBN=0321503635/ref=nosim/cafeaulaitA
-
[XOM-interest] XIncluder entity resolution,
Paul Duffin, 08/18/2008
- Re: [XOM-interest] XIncluder entity resolution, Elliotte Harold, 08/18/2008
Archive powered by MHonArc 2.6.24.