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 28240 - [XSLT30] conflicting text in the section on default modes and suggestion to allow #current
Summary: [XSLT30] conflicting text in the section on default modes and suggestion to a...
Status: CLOSED WORKSFORME
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Member-only Editors Drafts
Hardware: PC Windows NT
: P2 normal
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: 2015-03-19 12:48 UTC by Abel Braaksma
Modified: 2015-10-29 09:50 UTC (History)
0 users

See Also:


Attachments

Description Abel Braaksma 2015-03-19 12:48:54 UTC
The introduction text on default modes (3.8.2 The [xsl:]default-mode Attribute) contains a conflicting statement, in the introduction, the value #default is allowed, but then the text says in the second para:

<quote>
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.
</quote>

In other words, the "must" in this sentence seems to remove the ability to use #default as mode name.

Also, I think it will make sense to extend the above sentence with something like "[...], regardless of the setting of xsl:package/@declared-modes".

In addition, I was wondering if it makes sense to allow #current, which will have the same meaning as using <xsl:apply-templates mode="#current"/> and is a shortcut for a common programming style where inside an xsl:template, one typically wants to stay within the current mode, unless you specify otherwise.
Comment 1 Abel Braaksma 2015-04-10 16:36:01 UTC
> in the introduction, the value #default is allowed

My mistake, the text refers to the mode attribute of xsl:template/apply-templates:

> "When the mode attribute of these elements is omitted, or when it contains 
> the value #default, [...]"

Leaving the bug open for possible inclusion of #current here.
Comment 2 Abel Braaksma 2015-04-16 17:13:25 UTC
Today the WG discussed the inclusion of #current in @default-mode and decided not to add this feature, therefore I am resolving this bug as WORKSFORME.