W3C home > Mailing lists > Public > w3c-ietf-xmldsig@w3.org > October to December 1999

RE: Comments for Transform

From: John Boyer <jboyer@uwi.com>
Date: Tue, 7 Dec 1999 10:23:47 -0800
To: "TAMURA Kent" <kent@trl.ibm.co.jp>, <w3c-ietf-xmldsig@w3.org>
Cc: "Dave Solo" <dsolo@alum.mit.edu>

I think a node-set MUST be well-formed.
Yes, the draft RECOMMENDs that a node-set is well-formed.  So,
you must define canonical form of a non well-formed node-set
more strictly.  Note that a node-set is an unordered collection
of nodes (not only elements).  The order of nodes depends on
XPath implementations.  The draft does not explain how to print
attribute nodes not in elements.

A node-set need not be well-formed XML, and the spec does in fact clearly
describe what to do about *all* node sets, including those that do not
result in a well-formed XML document.  Indeed, one cannot even assert that
the node-set does not result in a well-formed XML document until one imposes
an order on the 'unordered' node-set.

Step #3 states that the node-set will be interpreted in document order,
which is clearly defined in the XPath specification [1].

[1] http://www.w3.org/TR/xpath#dt-document-order

I think a node-set MUST be a well-formed XML or a character
TAMURA Kent @ Tokyo Research Laboratory, IBM

A node-set is not a character sequence [2].  A node-set is a set of nodes,
which can include elements, attributes, text nodes, and so forth.  A
node-set can be any subset of the nodes of a parse tree. Up to now, we (both
of us and a few other WG members) have incorrectly been treating an XPath
like X::text() as giving the text of X, where in fact the text must be
obtained using string(X::text()) [3]. Once it is a string, it is not a
node-set any more.

Although this has little to do with the issues you've raised, it seems that
you may be interested in knowing that I will soon be sending a small change
to the editors to cover XPaths that do not result in a node-set. Note that
an Xpath evaluation can result in a node set, boolean, number or string [2].
If the result is not a node-set, then none of the output document processing
rules are applied (the result of the XPath function that generated the
string is the output document).

[2] http://www.w3.org/TR/xpath#section-Introduction
[3] http://www.w3.org/TR/xpath#section-String-Functions

John Boyer
Software Development Manager
UWI.Com -- The Internet Forms Company
Received on Tuesday, 7 December 1999 13:26:01 UTC

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