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 24438 - [XSLT 3.0] Order of children within xsl:stylesheet
Summary: [XSLT 3.0] Order of children within xsl:stylesheet
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: 2014-01-29 11:17 UTC by Michael Kay
Modified: 2014-02-12 14:02 UTC (History)
1 user (show)

See Also:


Attachments

Description Michael Kay 2014-01-29 11:17:10 UTC
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.
Comment 1 Michael Kay 2014-01-30 17:56:14 UTC
We might also like to rethink whether we really want to allow xsl:use-package as a child of xsl:stylesheet at all.
Comment 2 C. M. Sperberg-McQueen 2014-02-10 16:35:13 UTC
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.)
Comment 3 Michael Kay 2014-02-11 21:23:02 UTC
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.
Comment 4 C. M. Sperberg-McQueen 2014-02-12 14:02:05 UTC
The WG reviewed the changes described in comment 3 and expressed its content.