Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Does XOM support XPointer within XInclude

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Andrew Thompson <lordpixel AT mac.com>
  • To: Elliotte Harold <elharo AT metalab.unc.edu>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Does XOM support XPointer within XInclude
  • Date: Sun, 20 Mar 2005 21:55:57 -0500


On Mar 20, 2005, at 9:50 AM, Elliotte Harold wrote:

Andrew Thompson wrote:

There's really no way to specify any kind of wildcard or range is there?
Wow. This seriously limits what you can do with XInclude doesn't it? Is there anything on the horizon that has anything like the power of the xpointer() scheme? Are you fundamentally opposed to implementing some sort of xpath support for use with XInclude?

Not fundamentally opposed. However, doing so is quite tricky, so barring funding it's not going to happen tomorrow. (i.e. if someone wanted to pay me to add this, I could put it in. It's just not on the top of my TODO list.) The most likely scenario is implementing the xpath scheme rather than the xpointer scheme. At least the xpath scheme doesn't introduce two new node types to deal with.

Well, I certainly understand where you're coming from there. Does an actual xpath() scheme exist? I didn't find it when I was looking for different schemes last night.

For your immediate use, I'd suggest adding IDs to the elements you wish to include.

Yes, that's what I did. It's marginally better because it means I can include 15 or so items in head.xml and import only those relevant to each HTML file. Of course, then I had to adjust my stylesheet to strip out all the xml:ids

By the way - if you want I can email you the code for my command line XIncluder.
I'm always surprised that more XML APIs tools don't come with useful command line tools for basic tasks (though as it turns out this task is somewhat less basic than I imagined!).

What I now have will generate XHTML 1.0 that will pass the W3Cs validator, which may be of use to people.
I can place this code in the public domain or assign copyright to you if you want to use it as the basis for an XInclude command line tool in XOM. Just let me know.

AndyT (lordpixel - the cat who walks through walls)
A little bigger on the inside

(see you later space cowboy ...)





Archive powered by MHonArc 2.6.24.

Top of Page