Skip to Content.
Sympa Menu

xom-interest - RE: [XOM-interest] XInclude

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Hallvard Trætteberg <hal AT idi.ntnu.no>
  • To: "'Elliotte Rusty Harold'" <elharo AT metalab.unc.edu>, <xom-interest AT lists.ibiblio.org>
  • Cc:
  • Subject: RE: [XOM-interest] XInclude
  • Date: Mon, 13 Oct 2003 22:55:26 +0200

Elliotte,

> If you could specify a Builder, then you could
> set the NodeFactory on that Builder, thus neatly
> answering your use-case. However, you could also
> set a number of other options on the Builder
> including:
>
> 1. Setting validation
> 2. Setting a SAX EntityResolver
> 3. Setting a SAX filter
> 4. Setting various features and properties

A very good idea! All this may make sense, I think, so the general
possibility of controlling the Builder when XIncluding seems far better
than just controlling the NodeFactory.

This can also be viewed the other way around: Instead of providing the
Builder when XIncluding, why not provide the XInclude strategy when
Building? In other words, a Builder may be configured to automatically
XInclude upon finding an XInclude element (the Builder would pass (a
copy of) itself to the XIncluder). In most cases (except parse="text")
it should make sense to pass the same (or a copy) Builder. Isn't this
three liner beautiful:

Builder builder = new Builder();
builder.setXInclude(true);
builder.build(uri);

I think it should be possible to do this after completing an element
(after finishElement is called) (isn't the crucial point that XInclude
needs a base URI), it shouldn't matter that sibling elements aren't
finished as long as the parent chain is?

Hallvard





Archive powered by MHonArc 2.6.24.

Top of Page