This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The syntax for xsl:stylesheet says that xsl:use-package must come first if it appears at all. The prose additionally says: If there are xsl:use-package elements, these must come before any other elements. If there are xsl:import elements, these must come after any xsl:use-package elements but before any other elements. But we removed the requirement for xsl:import to come first from the grammar and we intended to remove it from the prose (see J.1 item 9(f)). Given our decision on bug #23944, we should reconsider the rule that xsl:stylesheet/xsl:use-package must come first. Also note, these changes to the rules on ordering need to be reflected in the schema for XSLT 3.0 stylesheet modules.
We might also like to rethink whether we really want to allow xsl:use-package as a child of xsl:stylesheet at all.
After some discussion of this in Prague, the WG decided to adopt the proposal implicit in comment 1, and forbid use-package as a child of stylesheet, the rationale being that if a stylesheet author is willing and able to modify the stylesheet module to use a use-package element, the module can also be modified to use a package element. (This also simplifies the treatment of the interaction of import and use-package.)
The change has been implemented. Note that it interacts with bug #24310. No change was needed to the schema for XSLT because it did not allow use-package anyway. A perhaps unanticipated consequence of the change is that the transformation of a "bare" stylesheet into a package now applies to any stylesheet, without requiring that it contain a use-package element.
The WG reviewed the changes described in comment 3 and expressed its content.