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 22733 - [xslt 3.0] Setting defaults for a module/package
Summary: [xslt 3.0] Setting defaults for a module/package
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Candidate Recommendation
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
Depends on:
Reported: 2013-07-19 09:32 UTC by Michael Kay
Modified: 2014-05-15 14:00 UTC (History)
0 users

See Also:


Description Michael Kay 2013-07-19 09:32:16 UTC
With the spec as currently written, there are some attributes such as default-mode and default-validation that can appear only on xsl:stylesheet, and that affect everything in the stylesheet module. A careful reading of the spec shows that declarations within xsl:override are not part of the stylesheet module and are therefore unaffected by these attributes.

There are other similar attributes such as default-collation and xpath-default-namespace that can appear on any element, including for example xsl:stylesheet, xsl:package, or xsl:override, and that affect all descendants of the element on which the attribute appears.

I suggest generalizing default-mode and default-validation so they behave like the other attributes: that is, they can appear on any element (including literal result elements in the form xsl:default-mode etc). This allows them to be specified at the xsl:package level if the intent is to affect declarations appearing within xsl:override, or at xsl:use-package or xsl:override level if different defaults are wanted depending on which package you are overriding.

This leaves input-type-annotations. This is anomalous because it has to be consistent across all the stylesheet modules in the stylesheet (as currently written, this means it also has to be consistent across packages). I would suggest that we make this a property of a package, and allow it to be defined at the level of xsl:package; if it's defined at xsl:stylesheet level then this must be consistent with the containing xsl:package. As for the semantics, it should behave like xsl:strip-space, affecting all source documents read within the scope of that package. We have an open bug to define exactly what that means, but the issue is the same for strip-space and for stripping of type annotations.
Comment 1 Michael Kay 2013-09-22 21:25:01 UTC
Making default-mode and default-validation inherited attributes was accepted at the New York F2F and has been implemented. The additional question about input-type-annotations remains open, and is related to the issue concerning the scope of xsl:strip-space and xsl:preserve-space declarations.
Comment 2 Michael Kay 2013-09-23 11:57:34 UTC
The remaining changes to allow input-type-annotations to be specified on xsl:package (and to require consistency with any declarations at stylesheet module level) have now been applied.