[Bug 28453] New: [XT30] [xsl:]default-mode, declared-modes and the initial mode

https://www.w3.org/Bugs/Public/show_bug.cgi?id=28453

            Bug ID: 28453
           Summary: [XT30] [xsl:]default-mode, declared-modes and the
                    initial mode
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 3.0
          Assignee: mike@saxonica.com
          Reporter: abel.braaksma@xs4all.nl
        QA Contact: public-qt-comments@w3.org

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'.".

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 9 April 2015 13:15:12 UTC