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 30144 - [xslt30ts] mode-1701a
Summary: [xslt30ts] mode-1701a
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 Test Suite (show other bugs)
Version: Proposed Recommendation
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Abel Braaksma
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-11 22:19 UTC by Michael Kay
Modified: 2019-02-26 00:17 UTC (History)
1 user (show)

See Also:


Attachments

Description Michael Kay 2017-07-11 22:19:10 UTC
This test expects XTDE0045. I don't think that's correct.

Under the rules in 2.3.3, mode "a" is an eligible mode because (rule #3) it is named in xsl:package/@default-mode
Comment 1 Abel Braaksma 2017-10-09 19:54:53 UTC
We say, in that section:

   If no initial mode is supplied explicitly, then the initial mode is that named in the default-mode attribute of the (explicit or implicit) xsl:package element of the top-level package or in the absence of such an attribute, the unnamed mode. 

And then we say that something is eligible as an initial mode if:

   M is explicitly declared in an xsl:mode declaration within P, and has public or final visibility (either by virtue of its visibility attribute, or by virtue of an xsl:expose declaration). 

But we also say:

   M is named in the default-mode attribute of the (explicit or implicit) xsl:package element of P.

I think this test was written before we wrote up the new rules on "eligible modes", which came after a long discussion where the previous draft required an initial mode to be public.

Not anymore, so I think you are correct. And I believe the discussion at the time allowed this because this would "allow an access point into a stylesheet that is not publicly visible", so this forces the use of a certain initial mode and the user cannot select something else.

So yes, the test is wrong now.
Comment 2 Abel Braaksma 2019-02-26 00:17:40 UTC
While mode-1701a was long fixed, I noticed that mode-1705a had the same issue and incorrectly expected XPDE0045. Fixed that test (default-mode is always eligible as initial mode) and added a variant for the error scenario (mode-1705b) and another variant for scoping of default-mode (it must appear on the root XSLT element to make a mode eligible).

Marking this bug as resolved.