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

XPath transform

From: TAMURA Kent <kent@trl.ibm.co.jp>
Date: Fri, 14 Jan 2000 16:35:26 +0900
Message-Id: <200001140735.QAA11900@ns.trl.ibm.com>
To: w3c-ietf-xmldsig@w3.org

http://www.w3.org/TR/2000/WD-xmldsig-core-20000104#sec-XPath
> The XPath transform applies the W3C XML canonicalization
> [XML-C14N] to the input resource. This ensures all entity
> reference substitutions and attribute normalizations are
> performed in a manner consistent with a validating XML
> processor. Linefeeds are normalized, and CDATA sections are
> eliminated. The types of quotes around attributes are
> normalized, and the order of attributes is defined. Namespace
> attributes are created in descendant elements that use
> namespace definitions. All of these modifications are necessary
> to achieve a consistent interpretation of the XPath expression
> and a consistent output of the XPath transform.

If the XML-C14N is applied to the input before the XPath
processing, the attribute order is not constant in the result
node-set.

The attribute order get unsettled when:
A) An XML processor parses the document, or
B) An XPath processor collects attributes in an element (An
XPath processor may reorder attributes because the attribute
order is implementation-dependent accoding to XPath 1.0
Recommendation)

Applying the XML-C14N might avoid A (if an XML processor does
not used between the XML-C14N and the XPath) and never avoid B.


> The result of the XPath is a string, boolean, number, or
> node-set. If the result of the XPath expression is a string,
> then the string is the output of the XPath transform.

How to calculate a digest value of the result string? That is,
what character encoding is used to convert the result string to
an octet sequence?

-- 
TAMURA Kent @ Tokyo Research Laboratory, IBM
Received on Friday, 14 January 2000 02:36:05 GMT

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