<?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>4540</bug_id>
          
          <creation_ts>2007-05-04 23:38:36 +0000</creation_ts>
          <short_desc>[UPD] Section 2.4.5 Transform: simplifying syntax</short_desc>
          <delta_ts>2007-07-26 22:09:40 +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="Michael Rys">mrys</reporter>
          <assigned_to name="Andrew Eisenberg">andrew.eisenberg</assigned_to>
          <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>15016</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Rys">mrys</who>
    <bug_when>2007-05-04 23:38:36 +0000</bug_when>
    <thetext>Functional
why do we need copy? &quot;transform $&quot; is like &quot;for $&quot; unambiguous.

The following looks closer to FLWR:

transform $je := $e 
modify do delete $je/salary
return $je

And we would like to have the syntax changed in this way.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15085</commentid>
    <comment_count>1</comment_count>
    <who name="Don Chamberlin">chamberl</who>
    <bug_when>2007-05-14 04:29:58 +0000</bug_when>
    <thetext>The keyword &quot;copy&quot; was introduced for a reason. The &quot;:=&quot; operator normally does not make a copy. Instead, if there are nodes on the RHS, the variable on the LHS is bound to references to these nodes. The variable can then be used, for example, to navigate to the parents of these nodes. In contrast, the COPY clause of a transform also uses the &quot;:=&quot; operator but it makes an actual copy of the nodes on the RHS. The keyword is helpful to emphasize this distinction.
--Don C.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15380</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2007-06-12 16:15:11 +0000</bug_when>
    <thetext>What about something like this?

      copy $je := $e
      transform do delete $je/salary
      return $je

That maintains the semantics of &quot;copy&quot;, and puts the transformation keyword where the transforms occur.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15728</commentid>
    <comment_count>3</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2007-06-29 14:42:38 +0000</bug_when>
    <thetext>In today&apos;s face-to-face meeting, we adopted the following syntax as our resolution of this issue:

TransformExpr ::= &quot;copy&quot; &quot;$&quot; VarName &quot;:=&quot; ExprSingle (&quot;,&quot; &quot;$&quot; VarName &quot;:=&quot; 
ExprSingle)* &quot;modify&quot; ExprSingle &quot;return&quot; ExprSingle

Jonathan</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15938</commentid>
    <comment_count>4</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2007-07-26 22:09:27 +0000</bug_when>
    <thetext>Jonathan intended to mark this bug FIXED, then CLOSED</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>