This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
In 5.3.4 we have a list of instructions that clear the current template rule: xsl:for-each, xsl:for-each-group, xsl:analyze-string, xsl:iterate, xsl:stream, xsl:merge The current template rule is used by xsl:apply-imports and xsl:next-match; it doesn't make sense to use these instructions if the context item has changed, so the list above is supposed to include all instructions that execute contained instructions with a new context item. xsl:copy with a select attribute also sets a new context item, so this should be in the list. But for compatibility with 1.0/2.0, this applies only when there is a select attribute.
In addition, xsl:call-template should probably clear the current template rule if the called template has <xsl:context-item use="absent"/> See also the Note in 6.8 These rules ensure that when xsl:apply-imports or xsl:next-match is called, the context item is the same as when the current template rule was invoked.
Note also that in 5.3.4 the initial setting for the current template rule as currently described is nonsense: If a named template is supplied as the entry point to the transformation, then absent; otherwise the initial named template This should read: If apply-templates invocation is used (see 2.3.3), then while processing each item in the *initial match selection*, the *current template rule* is initially set to the template rule chosen to process that item. Otherwise, absent.
The changes have been applied to the spec.