W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2010

[Bug 11372] New: XSLT 2.1 (11 May 2010), Section 15.3: Merge-source default context

From: <bugzilla@jessica.w3.org>
Date: Mon, 22 Nov 2010 10:08:45 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-11372-523@http.www.w3.org/Bugs/Public/>

           Summary: XSLT 2.1 (11 May 2010), Section 15.3: Merge-source
                    default context
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 3.0
        AssignedTo: mike@saxonica.com
        ReportedBy: oneil@saxonica.com
         QAContact: public-qt-comments@w3.org

In Section 15.3, and the second paragraph we observe 'if the select attribute
is omitted, the default value is ., which selects the context item'. There is a
potential problem here if the merge instruction, say is written in an 
xsl:function, which has no context item passed in, then the xsl:merge-source
context item will be undefined. 

For example, in the following function 's:merge1' we have an xsl:merge
instruction which has a xsl:merge-source, with the select attribute omitted.
For the xsl:merge-key the value of the select is ., this will error as
xsl:merge-source does not have a valid context item:

<xsl:function name="s:merge1">

                <xsl:perform-sort select="doc('europe.xml')/europe/country">    
                    <xsl:sort select="." order="ascending"/>
                <xsl:merge-key select="."/>

                <xsl:value-of select="."/>


Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Monday, 22 November 2010 10:08:50 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:44 UTC