This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Regarding the 4 April 2005 draft of XSLT 2.0: Section 2.3 describes aspects of the context I can set at launch time for a transformation, including the initial mode and the initial context node. Section 9.5 says that the initial context node is NOT the context node for global variables unless the node is a document node. Section 9.5 should also address any other launch options that could affect the value of a global variable, such as the initial mode. I definitely cannot say that the draft gives solid assurance about <xsl:apply-templates select="/fully/qualified/path" mode="#current"/> in the content constructor of a global variable. Indeed, the use of the above statement in a global variable seems like a cheesy way to pass in a pseudo- parameter by way of setting the initial mode; it would probably better coding style to have meaning expressed as an actual launch-time parameter and use xsl:choose in each global variable constructor that wants to adjust its value based on launch-time settings. PROPOSED ACTION: if not already decided by the WG, raise an issue, then add verbiage to part 9.5 that states whatever you decided.
I believe that my response to bug 1811 addresses this point. I have reclassified the bug as "minor" (meaning editorial) because I think the intent of the Working Group in this area has always been clear. You're right to point out that passing in an initial mode or initial template is an alternative way of passing in stylesheet parameters, and that some people might feel that using xsl:choose on an explicit parameter is better design practice. I have to say, however, that I've found the use of an initial mode or initial template is a very convenient way of allowing a multi-phase stylesheet to be debugged. I think we should refrain from giving usage advice in this area. I hope you will accept the change described in my response to 1811 as an adequate response to this issue; if not, please reopen the bug. Michael Kay Editor, XSLT 2.0