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

XPath 2.0 filter enchancement

From: Aleksey Sanin <aleksey@aleksey.com>
Date: Wed, 07 Aug 2002 13:02:04 -0700
Message-ID: <3D517CBC.8090906@aleksey.com>
To: w3c-ietf-xmldsig@w3.org

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 GMT

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