RE: New XPath Filter Transform

Hi Kent and Merlin,

Generally, I like intersection and subtraction as features.  Three
things bother me though:

1) The first is naming.  An XPath 'include' filter should include the
nodes specified by the XPath expression.  An XPath 'exclude' filter
should exclude the nodes specified by the XPath expression.  I don't
agree with the assertion tha tthis is non-intuitive.  

If we had more appropriate names like 'intersect' and 'subtract',
respectively, I think the resulting markup would more clearly
communicate what happens, particularly with nodes selected by the XPath
but not in the input.

2) More importantly, I think the problem is more complicated than what
has been alluded to so far.  In the interest of speed, the XPath
expressions in include and exclude filters specify subtree roots, not
individual nodes.  The input is a set of nodes, not a set of subtree
roots, so the XPath expression would have to be evaluated, then expanded
to include all nodes in each subtree before the set intersection or
subtraction could be performed against the input.

To me, this is less intuitive than what is in the current specification
because we are not intersecting and subtracting the input nodes with the
nodes selected by the XPath.  We are intersecting and subtracting the
input nodes with a nodes-set formed by subtree expansion of nodes
selected by the XPath.

3) Exclude is not currently defined as set subtraction.  It is defined
in exactly the same way that include is defined.  So, whether using
include or exclude, I am not able to convince myself that your version
of set replacement will be as fast as what is currently specified.  I
absolutely need ways of making the features currently specified to be as
fast as possible.

So, why don't we add 'intersect' and 'subtract' to the currently
specified filter?

John Boyer

-----Original Message-----
From: TAMURA Kent []
Sent: Tuesday, March 12, 2002 6:05 PM
To: John Boyer;
Subject: Re: New XPath Filter Transform

> I read the context part, and I think it is correct; I just
> the application of the resulting subtrees. I think that include should
> be specified as set intersection, as exclude is set subtraction. Set
> replacement would, I think, be non-intuitive and, in my opinion, bad.
> We can get set replacement behaviour using set intersection and an
> nodeset from URI #xpointer(/).

I agree with Merlin.  intersection and subtraction seems better.

TAMURA Kent @ Tokyo Research Laboratory, IBM

Received on Thursday, 14 March 2002 14:08:24 UTC