This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
We say, about the initial mode: > [Definition: The initial mode, if specified, must either be the unnamed mode, > or a mode that is explicitly named either in an xsl:mode declaration, or in > the mode attribute of an xsl:template declaration within the stylesheet. If > an initial mode is supplied, then in searching for the template rule that > best matches the items in the initial match selection, the processor > considers only those rules that apply to the initial mode. If no initial mode > is supplied, then the mode used is that named in the default-mode attribute > of the (explicit or implicit) xsl:package element of the top-level package or > in the absence of such an attribute, the unnamed mode.] However, this means that if you have a default-mode attribute that does not exist explicitly, and you specify that mode explicitly as initial mode, that it would be an error. I don't think that is desirable. I propose to add after "or in the mode attribute of an xsl:template declaration" something like ", or in an [xsl:]default-mode attribute". And we say, about the default-mode: > The value must either be an EQName, or the token #unnamed which refers to > the unnamed mode. It is not necessary for the referenced mode to be > explicitly declared in an xsl:mode declaration. But this is no longer true for packages with an implicit or explicit declared-modes="yes" in packages. I propose to add something like ", unless declared-modes='yes'.".
I agree. Proposal: (A). Change the definition of initial mode to say: [Definition: The initial mode, if specified, must either be the unnamed mode, > or a mode that is explicitly named either in an xsl:mode declaration, or in > the mode attribute of an xsl:template declaration within the stylesheet, or in the *default-mode* attribute of an xsl:stylesheet or xsl:package element. (B) I propose adding to 3.5.4.1: The declared-modes attribute of xsl:package determines whether or not modes that are referenced within the package must be explicitly declared. If the value is yes (the default), then it is an error to use a mode name in the mode attribute of xsl:template or xsl:apply-templates, or in the [xsl]:default-mode attribute of any element, or to use the unnamed mode explicitly or implicitly in those contexts, unless the package contains an explicit xsl:mode declaration for that mode. (C) I propose changing the sentence "It is not necessary for the referenced mode to be > explicitly declared in an xsl:mode declaration." to a note, adding the qualifier "unless the attribute declared-modes="yes" is present".
The changes were agreed and have been applied. For avoidance of doubt, I changed the Note in (c) to say It is not necessary for the referenced mode to be explicitly declared in an <elcode>xsl:mode</elcode> declaration, unless this is mandated by the <code>declared-modes</code> attribute (which defaults to <code>yes</code> on an <elcode>xsl:package</elcode> element).
As discussed by the latest telcon, I was tasked to review these changes. I have now done so and see no ambiguities in the proposed texts. Closing this bug as CLOSED - FIXED.