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: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Does XOM support XPointer within XInclude
  • Date: Sun, 20 Mar 2005 00:29:33 -0500


On Mar 19, 2005, at 5:51 PM, Elliotte Harold wrote:

Andrew Thompson wrote:
A quick question since I'm on my way out the door and I can't check right now:
Does XOM support XPointer with XInclude?

XOM supports XPointers. However it does not support the xpointer scheme, which never made it out of candidate status and has been abandoned by the W3C. It does support the element scheme and bare name XPointers.

In other words, something like this will work, if I have precisely 10 items in head.xml:

<head>
<xi:include href="head.xml" xpointer="element(common/1)"/>
<xi:include href="head.xml" xpointer="element(common/2)"/>
<xi:include href="head.xml" xpointer="element(common/3)"/>
<xi:include href="head.xml" xpointer="element(common/4)"/>
<xi:include href="head.xml" xpointer="element(common/5)"/>
<xi:include href="head.xml" xpointer="element(common/6)"/>
<xi:include href="head.xml" xpointer="element(common/7)"/>
<xi:include href="head.xml" xpointer="element(common/8)"/>
<xi:include href="head.xml" xpointer="element(common/9)"/>
<xi:include href="head.xml" xpointer="element(common/10)"/>
<meta name="Keywords" content="andrew thompson homepage lordpixel"/>
<title>Lord Pixel</title>
</head>

head.xml

<head xmlns="http://www.w3.org/1999/xhtml"; xml:id="common" xml:lang="en">

... 10 <link>, <meta> and <script> items to import

</head>

It's hard to know whether this is even worthwhile. I suppose it means I can keep all of the common stuff in head.xml and edit it once for all of the pages that share it, but if I ever add or remove a line from head.xml I have to go find all of the files that include it and change the number of xi:includes to match.

Is it just me or was the element() scheme completely crippled to avoid letting it compete with the full xpointer() scheme?
Was it just kept so simplistic so as to make sure no one could find an objection to it?

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?

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