W3C home > Mailing lists > Public > w3c-ietf-xmldsig@w3.org > January to March 2002

RE: New XPath Filter Transform

From: John Boyer <JBoyer@PureEdge.com>
Date: Thu, 14 Mar 2002 11:07:42 -0800
Message-ID: <7874BFCCD289A645B5CE3935769F0B5232845C@tigger.PureEdge.com>
To: "TAMURA Kent" <kent@trl.ibm.co.jp>, <w3c-ietf-xmldsig@w3.org>, "merlin" <merlin@baltimore.ie>, <reagle@w3.org>


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 [mailto:kent@trl.ibm.co.jp]
Sent: Tuesday, March 12, 2002 6:05 PM
To: John Boyer; w3c-ietf-xmldsig@w3.org
Subject: Re: New XPath Filter Transform



> I read the context part, and I think it is correct; I just
misunderstood
> 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
input
> 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 GMT

This archive was generated by hypermail 2.2.0 + w3c-0.29 : Thursday, 13 January 2005 12:10:14 GMT