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 29067 - [xslt 3.0] declared-modes should allow reference to a mode from a used package
Summary: [xslt 3.0] declared-modes should allow reference to a mode from a used package
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Last Call drafts
Hardware: PC All
: 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-08-19 19:27 UTC by Michael Kay
Modified: 2015-08-21 19:47 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2015-08-19 19:27:07 UTC
Section 3.5.4.1 states:

<quote>
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 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 these contexts, unless the package contains an explicit xsl:mode declaration for that mode. If the value is no, then this is not an error.
</quote>

A superficial reading suggests that you can't write <xsl:apply-templates mode="M"/> where M is a public mode declared in a used package. That would be nonsense. The description of XTSE3085 a couple of paragraphs later gets it right. 

Change "unless the package contains an explicit xsl:mode declaration for that mode" to "unless the package either contains an explicit xsl:mode declaration for that mode, or contains a mode with the appropriate symbolic name and visibility that is exposed by a used package".
Comment 1 Michael Kay 2015-08-21 18:23:21 UTC
The WG agreed to the proposed change.
Comment 2 Michael Kay 2015-08-21 19:47:01 UTC
The change has been applied