<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>4313</bug_id>
          
          <creation_ts>2007-02-09 00:24:07 +0000</creation_ts>
          <short_desc>[UPD] applyUpdates should delete empty text nodes</short_desc>
          <delta_ts>2007-02-13 18:56:23 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Update Facility</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Don Chamberlin">chamberl</reporter>
          <assigned_to name="Andrew Eisenberg">andrew.eisenberg</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>13938</commentid>
    <comment_count>0</comment_count>
    <who name="Don Chamberlin">chamberl</who>
    <bug_when>2007-02-09 00:24:07 +0000</bug_when>
    <thetext>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:

&quot;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.&quot;

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: &quot;If the children property of some node contains an empty text node, that empty text node is removed from the children property.&quot;

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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13979</commentid>
    <comment_count>1</comment_count>
    <who name="Don Chamberlin">chamberl</who>
    <bug_when>2007-02-13 18:56:00 +0000</bug_when>
    <thetext>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)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>