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 7358 - [XSLT] Typographical errors in section 9.8 of XSLT 2.0
Summary: [XSLT] Typographical errors in section 9.8 of XSLT 2.0
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 2.0 (show other bugs)
Version: Recommendation
Hardware: PC Windows XP
: P5 trivial
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-18 01:58 UTC by Henry Zongaro
Modified: 2010-07-27 20:33 UTC (History)
1 user (show)

See Also:


Attachments

Description Henry Zongaro 2009-08-18 01:58:07 UTC
1) In the fourth example in section 9.8 of XSLT 2.0,[1] entitled "Example: Circularity involving Variables and Keys," the following stylesheet function appears:

<xsl:function name="my:f">
  <xsl:param name="arg1"/>
  <xsl:sequence select="key('k', $arg1)"/>
</xsl:function>

If a reference to the key function has only two arguments, the reference returns nodes in the same document as the context node.  However, the context item is initially undefined in a stylesheet function, so it's implementation dependent whether this example will result in an error because of the circularity or because the context item is undefined.

The example could either be modified to eliminate the stylesheet function, or a second argument to the stylesheet function could be added to use as the $top argument in the reference to the key function.

2) In the final example of section 9.8, there is a quotation mark missing in the xsl:variable declaration:

<xsl:variable name="x" select="my:f(1)/>

should be

<xsl:variable name="x" select="my:f(1)"/>

[1] http://www.w3.org/TR/xslt20/#circularity
Comment 1 Michael Kay 2009-11-13 15:51:42 UTC
Resolved at the WG telcon on 12 Nov 2009 to reclassify this as editorial, and to fix it along the lines suggested by the originator. Erratum XT.E40 will be issued to incorporate this fix (drafted).