<?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>28628</bug_id>
          
          <creation_ts>2015-05-12 17:29:02 +0000</creation_ts>
          <short_desc>xquery-update-30-xqueryx.xsl drops function annotations</short_desc>
          <delta_ts>2015-05-30 22:06:17 +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>Last Call drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</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="Josh Spiegel">josh.spiegel</reporter>
          <assigned_to name="Jim Melton">jim.melton</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>120272</commentid>
    <comment_count>0</comment_count>
    <who name="Josh Spiegel">josh.spiegel</who>
    <bug_when>2015-05-12 17:29:02 +0000</bug_when>
    <thetext>The XQuery Update conversion from XQueryX to XQuery ignores function annotations.  

See:
http://www.w3.org/2015/02/xquery-update-30/xquery-update-30-xqueryx.xsl

Specifically:

  &lt;!-- Over-ride the template for functionDecl in XQueryX.xsd   --&gt;
  &lt;xsl:template match=&quot;xqx:functionDecl&quot; priority=&quot;100&quot;&gt;
    &lt;xsl:text&gt;declare &lt;/xsl:text&gt;
    &lt;xsl:if test=&quot;@xqx:updatingFunction and @xqx:updatingFunction = &apos;true&apos;&quot;&gt;
       &lt;xsl:text&gt;updating &lt;/xsl:text&gt;
    &lt;/xsl:if&gt;
    &lt;xsl:text&gt;function &lt;/xsl:text&gt;
    ...

This does not account for possible xqx:annotation children of xqx:functionDecl.  Here is the original definition in XQueryX.xsl:

  &lt;xsl:template match=&quot;xqx:functionDecl&quot;&gt;
    &lt;xsl:text&gt;declare&lt;/xsl:text&gt;
    &lt;xsl:apply-templates select=&quot;xqx:annotation&quot;/&gt;
    &lt;xsl:text&gt; function &lt;/xsl:text&gt;
    ...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120368</commentid>
    <comment_count>1</comment_count>
    <who name="John Snelson">john.snelson</who>
    <bug_when>2015-05-19 16:01:07 +0000</bug_when>
    <thetext>Jim&apos;s bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120621</commentid>
    <comment_count>2</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2015-05-30 22:06:17 +0000</bug_when>
    <thetext>I modified the XQueryX stylesheet in XQuery Update Facility 3.0 to fully align with the corresponding stylesheet in XQueryX 3.0 (retaining the test for updatingFunction). 

As a result of this change, I am marking this bug RESOLVED FIXED.  If you agree with the resolution, please mark the bug CLOSED.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>