<?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>5702</bug_id>
          
          <creation_ts>2008-05-20 16:55:32 +0000</creation_ts>
          <short_desc>[UPD] Deleting a parentless node should be well-defined</short_desc>
          <delta_ts>2011-01-08 20:45:48 +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>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</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="Jonathan Robie">jonathan.robie</reporter>
          <assigned_to name="Andrew Eisenberg">andrew.eisenberg</assigned_to>
          <cc>jim.melton</cc>
          
          <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>20172</commentid>
    <comment_count>0</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2008-05-20 16:55:32 +0000</bug_when>
    <thetext>The following text occurs in the definition of upd:delete: &quot;If $target has no parent, the XDM instance is unchanged. An implementation may (but is not required to) raise a dynamic error if $target had no parent before execution of the query began. [err:XUDY0020].&quot;

For the user, I think it is better if the standard defines what happens if we delete a node that does not have a parent. What barriers are there to doing this?

If there is an insurmountable difficulty with defining this, we need to at least say that it is implementation defined, and needs to be documented.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20176</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2008-05-20 17:12:30 +0000</bug_when>
    <thetext>Section 2.4.2 in fact says (in a Note) that it is &quot;implementation-defined&quot;.

But I fully agree with the comment, there is no reason for the WG to be indecisive on this question. I really don&apos;t care much whether deleting a parentless node is a no-op or an error, but I think the spec should define it one way or the other. Tossing a coin, I would make it a no-op (the only defined behaviour of delete is to detach from the parent, and when the initial state is the same as the desired state, a no-op seems appropriate.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22341</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2008-11-03 16:56:40 +0000</bug_when>
    <thetext>On 16 Sept 08, we decided deleting a node that is already detached is a no-op, not implementation defined, and may not be treated as an error.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>43944</commentid>
    <comment_count>3</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2011-01-08 20:45:48 +0000</bug_when>
    <thetext>I am happy with the resolution.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>