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 29811 - [XSLT30] 9.6 Static Variables and Parameters
Summary: [XSLT30] 9.6 Static Variables and Parameters
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL: https://www.w3.org/XML/Group/qtspecs/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-05 13:18 UTC by Tim Mills
Modified: 2016-09-08 19:45 UTC (History)
1 user (show)

See Also:


Attachments

Description Tim Mills 2016-09-05 13:18:48 UTC
The text reads

''When the attribute static="yes" is specified, the xsl:variable or xsl:param element must have empty content. In the case of xsl:variable the select attribute must be present to define the value of the variable.''

When the select attribute should be present but is absent, what is error should be reported?
Comment 1 Abel Braaksma 2016-09-05 15:05:58 UTC
I'd guess this one (section 2.2)

[ERR XTSE0010] It is a static error if an XSLT-defined element is used in a context where it is not permitted, if a required attribute is omitted, or if the content of the element does not correspond to the content that is allowed for the element.
Comment 2 Tim Mills 2016-09-05 15:21:31 UTC
Thanks - that will do.  

It would be nice if the specification stated it explicitly in the referenced text.
Comment 3 Michael Kay 2016-09-05 16:28:25 UTC
I think there are a large number of static error conditions that are covered by the general error codes such as XTSE0010 and XTSE0020, and it's best to have a general rules describing these rather than be too fine-grained about it.

Interoperability of error codes for static errors has never been a high priority, and we don't want to be over-prescriptive for example by forcing processors to check multiple static constraints in a specific order. Nor do we want to inhibit intelligent diagnostics: for example if an attribute name is misspelled, we don't want to require a processor to report that a required attribute is missing, and a disallowed attribute is present, with two different error codes.
Comment 4 Michael Kay 2016-09-08 19:45:03 UTC
Resolved with an action to add a reference to the error code, which I have added.