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 29256 - accept-041c - error XTSE3080
Summary: accept-041c - error XTSE3080
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: 2015-11-02 16:53 UTC by Michael Kay
Modified: 2016-02-20 14:52 UTC (History)
1 user (show)

See Also:


Attachments

Description Michael Kay 2015-11-02 16:53:47 UTC
Should this test raise XTSE3080 (and -043c, -045c, -047c likewise)?

Section 3.5.3.3 says (just below the definition of error 3060):

A package is executable if and only if it contains no component whose visibility is abstract. A package that is not executable is not a stylesheet, and therefore cannot be nominated as the stylesheet to be used when initiating a transformation.

This statement has no associated error code.

The definition of XTSE3080 is in 3.5.3.5, and reads:

[ERR XTSE3080] It is a static error if a top-level package (as distinct from a library package) contains symbolic references referring to components whose visibility is abstract.

Note that XTSE3080 suggests it's only an error if there is a reference to the abstract component, whereas the statement in 3.5.3.3 suggests it's an error whether or not the component is referenced.

Leaving this as a test suite bug for the moment, but we may need some clarification in the spec.
Comment 1 Abel Braaksma 2015-11-03 00:33:07 UTC
I remember looking this up recently and thought to recollect that we decided (in Prague?) that abstract components can exists *as long as they are not invoked*.

Then I found the section on xsl:accept and "absent", which seems to be a feature to explicitly say that you do not expect to give an implementation for such components, if they are referenced, it is then a dynamic error 

(this is a nuisance to do if you have abstracts of all kinds, which requires at least five xsl:accept just to be able to run whenever you reference such package)

I'm not sure for the rationale behind this. It seems to make more sense to allow abstract components to exist, just with a default implementation of xs:error / fn:error. Unless we want to give library builders the tools to write "interface-style" code, where it is required to implement the whole interface (abstract components) (where "absent" is a kind of implementation), regardless of whether the code is referenced/used etc.

With large packages where many components are defined as abstract, this can become quite a pain.
Comment 2 Michael Kay 2015-11-20 18:16:26 UTC
I'm converting this to a spec bug as I think it needs technical discussion.
Comment 3 Michael Kay 2016-01-14 17:49:16 UTC
We decided it should be an error to have abstract components whether or not they are referenced.

The wider topic of the usability of xsl:accept will be raised as a separate issue.
Comment 4 Michael Kay 2016-02-19 14:37:23 UTC
The necessary clarification has been added to the spec.
Comment 5 Abel Braaksma 2016-02-20 14:52:35 UTC
(In reply to Michael Kay from comment #3)
> The wider topic of the usability of xsl:accept will be raised as a separate
> issue.
For reference, that is Bug 29478.