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 4313 - [UPD] applyUpdates should delete empty text nodes
Summary: [UPD] applyUpdates should delete empty text nodes
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Update Facility (show other bugs)
Version: Working drafts
Hardware: PC Windows XP
: 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-02-09 00:24 UTC by Don Chamberlin
Modified: 2007-02-13 18:56 UTC (History)
0 users

See Also:


Attachments

Description Don Chamberlin 2007-02-09 00:24:07 UTC
In Update Section 3.2.2, upd:applyUpdates, Rule 3 specifies some post-processing of text nodes after all the update primitives on the PUL have beeen applied. Here is what it says:

"If, as a result of the above steps, the children property of some node contains adjacent text nodes, these adjacent text nodes are merged into a single node."

The reason for this rule is to avoid violating the Data Model constraint that prohibits adjacent text nodes among the children of any node (Data Model Section 6 Rule 2). BUT the above rules does not go far enough, because there is another Data Model constraint that prohibits empty text nodes among the children of any node (Data Model Section 6 Rule 3). Therefore, we need to add one more processing step to upd:applyUpdates Rule 3: "If the children property of some node contains an empty text node, that empty text node is removed from the children property."

This change will make our update semantics consistent with the semantics of element constructors (XQuery Section 3.7.1.3 Rule 3), which also merges adjacent text nodes and deletes empty text nodes among the children of a constructed element.

Regards,
--Don Chamberlin
Comment 1 Don Chamberlin 2007-02-13 18:56:00 UTC
Don,
Thanks for this comment. The working group agrees with your suggestion and will implement it in the next working draft of the update specification. 
Regards,
Don Chamberlin (for the Query Working Group)