- From: <bugzilla@jessica.w3.org>
- Date: Mon, 22 Nov 2010 10:08:45 +0000
- To: public-qt-comments@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=11372
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:merge>
<xsl:merge-source>
<xsl:merge-input>
<xsl:perform-sort select="doc('europe.xml')/europe/country">
<xsl:sort select="." order="ascending"/>
</xsl:perform-sort>
<xsl:merge-key select="."/>
</xsl:merge-input>
</xsl:merge-source>
<xsl:merge-action>
<out>
<xsl:value-of select="."/>
</out>
</xsl:merge-action>
</xsl:merge>
</xsl:function>
...
--
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