This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28628 - xquery-update-30-xqueryx.xsl drops function annotations
Summary: xquery-update-30-xqueryx.xsl drops function annotations
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Update 3.0 (show other bugs)
Version: Last Call drafts
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Jim Melton
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-12 17:29 UTC by Josh Spiegel
Modified: 2015-05-30 22:06 UTC (History)
0 users

See Also:


Attachments

Description Josh Spiegel 2015-05-12 17:29:02 UTC
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:

  <!-- Over-ride the template for functionDecl in XQueryX.xsd   -->
  <xsl:template match="xqx:functionDecl" priority="100">
    <xsl:text>declare </xsl:text>
    <xsl:if test="@xqx:updatingFunction and @xqx:updatingFunction = 'true'">
       <xsl:text>updating </xsl:text>
    </xsl:if>
    <xsl:text>function </xsl:text>
    ...

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

  <xsl:template match="xqx:functionDecl">
    <xsl:text>declare</xsl:text>
    <xsl:apply-templates select="xqx:annotation"/>
    <xsl:text> function </xsl:text>
    ...
Comment 1 John Snelson 2015-05-19 16:01:07 UTC
Jim's bug.
Comment 2 Jim Melton 2015-05-30 22:06:17 UTC
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.