This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 4171 - [UPD] Merging adjacent text nodes and node identity
Summary: [UPD] Merging adjacent text nodes and node identity
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Update Facility (show other bugs)
Version: Working drafts
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-09 18:32 UTC by John Snelson
Modified: 2007-02-07 09:50 UTC (History)
1 user (show)

See Also:


Attachments

Description John Snelson 2007-01-09 18:32:20 UTC
What happens to node identity when adjacent text nodes are merged? What about variable references that point to one of the original text nodes - do they need to be identified and updated?
Comment 1 Andrew Eisenberg 2007-01-10 22:33:07 UTC
We've tackled this once is bug 2983. In section 3.2.2 upd:applyUpdates, Semantics, bullet 3, we now say,

"If, as a net result of the above steps, the children property of some node contains adjacent text nodes, these adjacent text nodes are merged into a single text node. The string-value of the resulting text node is the concatenated string-values of the adjacent text nodes, with no intervening space added. The nodeid of the resulting text node is implementation-dependent."

In my opinion, this is a somewhat loose statement. One implementation might create a new text node, with new identity, as a result of the merge, and the disconnect the original text nodes from their parent node. Another implementation might add the content of the second text node to the first text node, and then disconnect the second text node from its parent node.
Comment 2 Daniel Engovatov 2007-02-07 01:19:35 UTC
We have reviewed this issue: comment #1 answers the question stated in the bug description.  No further changes are necessary.