<?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>23644</bug_id>
          
          <creation_ts>2013-10-26 14:47:03 +0000</creation_ts>
          <short_desc>[UPD 3.0] Relax update checks and allow last step of path to be updating</short_desc>
          <delta_ts>2014-07-30 13:55:52 +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 3.0</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</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="Christian Gruen">christian.gruen</reporter>
          <assigned_to name="John Snelson">john.snelson</assigned_to>
          <cc>jim.melton</cc>
    
    <cc>jonathan.robie</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>95395</commentid>
    <comment_count>0</comment_count>
    <who name="Christian Gruen">christian.gruen</who>
    <bug_when>2013-10-26 14:47:03 +0000</bug_when>
    <thetext>The current XQUF spec forbids path expressions to be updating. This in contrast to other iterating expressions, such as FLWOR, which allows the RETURN clause to be simple, vacuous, or updating.

As path and FLWOR expressions have similar semantics, the path semantics could be extended and relaxed to the simple rule that (only) the last step of a path may be updating. The following queries would then be valid:

* //item/(delete node text())

* (1, &lt;x/&gt;) ! (if(. instance of node())
    then insert node text { &apos;X&apos; } into . else ())

The queries can be currently be formulated as follows:

* for $i in //item
  return delete node $i/text()

* for $i in (1, &lt;x/&gt;)
  return if($i instance of node())
    then insert node text { &apos;X&apos; } into $i else ())</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95419</commentid>
    <comment_count>1</comment_count>
    <who name="John Snelson">john.snelson</who>
    <bug_when>2013-10-28 10:15:06 +0000</bug_when>
    <thetext>That functionality might just be better off using the &quot;!&quot; operator.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109576</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2014-07-30 13:55:52 +0000</bug_when>
    <thetext>The Working Group decided not to add this functionality.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>