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 23944 - xsl:package/xsl:expose position
Summary: xsl:package/xsl:expose position
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Working drafts
Hardware: All 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: 2013-11-30 11:43 UTC by Tony Graham
Modified: 2014-02-24 16:00 UTC (History)
1 user (show)

See Also:


Attachments

Description Tony Graham 2013-11-30 11:43:01 UTC
See http://www.biglist.com/lists/lists.mulberrytech.com/xsl-list/archives/201311/msg00107.html and following messages in thread.

I find it odd that in the XSLT 3.0 xsl:package [1]
element, the stylesheet comes between the definitions of what the package
needs and what the package provides:

   (xsl:use-package*, (xsl:stylesheet | xsl:transform), xsl:expose*)

If I had a working implementation of xsl:package, the first thing I would
package is an existing 557-line module [2].  To have to jump between the
top and the bottom of the file when packagising it seems like unnecessary
work compared to allowing xsl:expose before the stylesheet.

For a new user of an existing package, having to jump between the top and
bottom of the package when working out what's needed for and what's
provided in the package also seems to me to require unnecessary effort.

[1] http://www.w3.org/TR/xslt-30/#packages
[2] https://github.com/MenteaXML/xslt3testbed/blob/master/xsl/xhtml-tables-fo.xsl
Comment 1 Michael Kay 2014-01-16 17:41:40 UTC
The WG considered two alternatives:

A. (xsl:expose*, xsl:use-package*, (xsl:stylesheet | xsl:transform))

and

B. (xsl:expose | xsl:use-package)*, (xsl:stylesheet | xsl:transform), (xsl:expose | xsl:use-package)*

We were split down the middle as to whether we preferred A or B, but everyone could live with either.
Comment 2 Michael Kay 2014-01-16 17:44:57 UTC
Revision: the above does not quite reflect everyone's view. There was a slight preference for A, and we also considered 

C) (xsl:expose | xsl:use-package)*, (xsl:stylesheet | xsl:transform)

which some people people preferred over B. We are interested in Tony's views on which would be best in his view.
Comment 3 Tony Graham 2014-01-20 21:46:25 UTC
Sorry for the delay; I didn't see the emails for the bug updates and only saw there'd been updates from your meeting minutes.

Option B works for me, since I expect that people will gravitate towards conventions for where to put xsl:use-package and xsl:expose such that most uses would be matched by one of the other patterns anyway -- just like most/many people already put all their xsl:include near the top of their stylesheets just as a matter of good housekeeping -- but I don't want to presuppose what the convention will be.

Without having been able to use xsl:package yet anyway, my expected sequence would have been:

   xsl:use-package*, xsl:expose*, (xsl:stylesheet | xsl:transform)

but that could be because I'm influenced by the current model and/or by too many years of putting 'import' or '#include' statements at the top of files.
Comment 4 Michael Kay 2014-01-28 18:01:54 UTC
The WG decided to go with option B. The editor's draft (draft R) has been updated.