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 29773 - [xsl30ts] mode-1702
Summary: [xsl30ts] mode-1702
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 Test Suite (show other bugs)
Version: Candidate 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: 2016-08-17 10:32 UTC by Michael Kay
Modified: 2016-11-21 16:12 UTC (History)
1 user (show)

See Also:


Attachments

Description Michael Kay 2016-08-17 10:32:27 UTC
Test mode-1702 has the declaration

<xsl:mode visibility="public"/>

This violates the rule in 6.6.1 (last row of table):

If the mode is unnamed, that is, if the name attribute is absent, then the visibility attribute if present must have the value private.
Comment 1 Abel Braaksma 2016-09-01 15:56:46 UTC
While fixing this, I am wondering: the xsl:package has @default-mode="a", but the invocation does not specify a default mode. Does that suggest that the invocation default is "a" if it is not specified? Or is that an API issue, and is the consensus that if the test does not specify a mode, that it should default to #unnamed? (or: alternatively, default to the @default-mode attribute, which is what we currently do, failing this test).
Comment 2 Abel Braaksma 2016-09-02 15:08:29 UTC
(In reply to Abel Braaksma from comment #1)
> While fixing this, I am wondering: the xsl:package has @default-mode="a",
> but the invocation does not specify a default mode. Does that suggest that
> the invocation default is "a" if it is not specified? Or is that an API
> issue, and is the consensus that if the test does not specify a mode, that
> it should default to #unnamed? (or: alternatively, default to the
> @default-mode attribute, which is what we currently do, failing this test).
Found it in the spec, we say:

"The design of the API for invoking a transformation should provide some means for users to designate the unnamed mode as the initial mode in cases where it is not the default mode."

Which makes this an API matter. I'll check and/or update what we say about this in the test documentation.
Comment 3 Abel Braaksma 2016-11-05 13:49:35 UTC
Given the current discussion on mode invocations I think it is wise to explicitly state in the test, in cases of ambiguity (as is the case here) that the intent is to invoke through the default unnamed mode.

Fixed it accordingly. The original bug was already fixed provisionally (but without log entry it seems).
Comment 4 Michael Kay 2016-11-21 14:40:55 UTC
If the intent is to invoke the unnamed mode, then the expected results are wrong. The stylesheet contains one template rule, with no mode attribute. That template rule is therefore in the default mode, which is "a". The expected results assume that this template rule is invoked, but the template rule is not applicable to the unnamed mode.
Comment 5 Michael Kay 2016-11-21 16:12:27 UTC
I have changed the test so that the template rule specifies mode="#unnamed".