XPath 2.0 filter enchancement

Hi, All!

The current XPath 2.0 filter calculates nodes sets using XPath expressions.
However, in some cases it's more simple (and natural) to select nodes sets
using XPointers language instead. I think that we can simply extend the 
XPath 2.0
filter spec to allow this. The only change we need to do is to allow one 
more
child <dsig-xpath:XPointer> of the "dsig-xpath:XPathType" type in
the <dsigTransform> element. The processing rules for this new child are 
exactly
the same as for existing XPath element (of course, the expression is 
evaluated as
XPointer expression).
This change will allow to mix XPath/XPointer expressions and should 
simplify
the XPath transforms in some case.

For example:

  <dsig:Transforms>
    <dsig:Transform Algorithm="http://www.w3.org/2002/06/xmldsig-filter2">
      <dsig-xpath:XPath Filter="intersect"> //ToBeSigned </dsig-xpath:XPath>
      <dsig-xpath:XPointer Filter="subtract"> xpointer(id('foo')) </dsig-xpath:XPath>
      <dsig-xpath:XPath Filter="union"> //ReallyToBeSigned </dsig-xpath:XPath>
    </dsig:Transform>
  </dsig:Transforms>

This change is backward compatible and do not break any existing XPath 2 
filter
implementations.



Aleksey Sanin
XML Security Library <http://www.aleksey.com/xmlsec>

Received on Wednesday, 7 August 2002 16:03:49 UTC