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: Tue, 14 Oct 2003 00:30:20 +0200

Elliotte,

> However, I don't want to limit XInclude support
> to just the building phase. It should be possible
> to resolve XIncludes on a document in memory.

Agreed, but if you extend your XIncluder class with the possibility of
passing in the Builder, it shouldn't be too difficult to get Builder to
recognise the xinclude:include element and pass itself (or a copy) to
the XIncluder class. Best of both worlds.

> In other words, use an XIncluding NodeFactory.

I wouldn't do it in the NodeFactory, as this functionality is really
orthogonal to instantiating custom Node classes. Instead, let Builder
check the Element returned from finishElement and XInclude if needed
(and desired).

> It's much easier if you can afford to stick
> everything in memory first.

I guess this "optimisation" isn't that important. Builder could however,
collect (in a List) all the include elements discovered in the building
process, and avoid traversing the whole document tree (does XIncluder
support replacing a single include element?).

Hallvard





Archive powered by MHonArc 2.6.24.

Top of Page