[www-xpath-comments] <none>

I recently asked a question about whether omission of comment nodes from a
node-set implied that the surrounding text nodes should be merged in
accordance with the data model.  In [1], James Clark indicated that the spec
said nothing of the behavior of node-sets under mutation and that our group
(xml-dsig) should define the most appropriate behavior for our application.

I have since worked through the thought process necessary to determine that
1) it is not appropriate for us to choose, and 2) the answer is no.

Since the question took some time for me to figure out, and since my answer
contradicts one of the spec editors, it seems appropriate to publish a
clarification erratum.

It is INCORRECT to assert that the omission of comment nodes from a node-set
means that the text nodes surrounding such comment nodes should be merged.
Reason: The node-set is simply a set of pointers to an underlying parse tree
representing the data model over which location steps operate. If the
node-set result of an XPath is an element named foo, we do not expect all of
foo's descendants to be deleted from the parse tree because they aren't in
the node-set. Instead, many processing algorithms will use the node-set's
result to process its children (e.g. see xsl:template and
xsl:apply-templates).

Thanks,
John Boyer
PureEdge Solutions Inc.

     John Boyer
      Development Team Leader,
      Distributed Processing and XML
      PureEdge Solutions Inc.
      Creating Binding E-Commerce
      v: 250-479-8334, ext. 143  f: 250-479-3772
      1-888-517-2675   http://www.PureEdge.com

Received on Thursday, 14 September 2000 20:16:50 UTC