W3C home > Mailing lists > Public > w3c-ietf-xmldsig@w3.org > April to June 2000

RE: XPath Serialization

From: John Boyer <jboyer@PureEdge.com>
Date: Thu, 25 May 2000 10:29:10 -0700
To: "TAMURA Kent" <kent@trl.ibm.co.jp>, "IETF/W3C XML-DSig WG" <w3c-ietf-xmldsig@w3.org>
Hi TAMURA-san,

Actually, you didn't misunderstand.  The intent of URI="#something" is to
render the element identified as 'something' plus all of its descendants, as
well as their namespace and attribute nodes.  However, the corresponding
XPath that creates the proper node-set is a little harder because we are
using absence from the node-set to indicate omission from the output.  I
have not found a way in XPath to constrain the evaluation to the nodes at or
below the identified element without losing the namespace and attribute
nodes.  I would like to say something like:


but there is no such axis.  Further, there are syntactic limitations on
where the subexpression (//. | //@* | //namespace::*), which means all nodes
at or below the context node, can be placed.  For example, the following
appears to be illegal:

id("something")/(//. | //@* | //namespace::*)

The only way I've come up with so far of doing this is to scan every node of
the parse tree looking for nodes with ancestry (or self) that includes the
identified element.  The resulting expression is quite inefficient, but it
does the job:

(//. | //@* |
//namespace::*)[count(ancestor-or-self::*)=count(id("something") |

John Boyer
Software Development Manager
PureEdge Solutions Inc. (formerly UWI.Com)
Creating Binding E-Commerce

-----Original Message-----
From: w3c-ietf-xmldsig-request@w3.org
[mailto:w3c-ietf-xmldsig-request@w3.org]On Behalf Of TAMURA Kent
Sent: Thursday, May 25, 2000 1:02 AM
Subject: Re: XPath Serialization

In message "XPath Serialization"
    on 00/05/23, "John Boyer" <jboyer@PureEdge.com> writes:
> 5) There was some confusion about how to process the node-set.  I fixed
> by commenting that nodes are not processed more than once.  As part of the
> processing of an element E, its namespace declarations, attributes, and
> descendants are processed, so they are not visited again when E is
> processing.

I misunderstood as all descendants were rendered ;-)

XPath serialization is used to serialize an element pointed
"#id-name" (in 4.3.3 the third paragraph.)  So, the following
dsig:Reference element digests only '<purchase xmlns=""></purchase>'.
Is this right?

  <purchase id="ORDER1">

  <dsig:Signature xmlns:dsig="...">
  <dsig:Reference URI="#ORDER1">
    <dsig:DigestMethod ..../>

TAMURA Kent @ Tokyo Research Laboratory, IBM
Received on Thursday, 25 May 2000 13:29:05 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:21:33 UTC