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 28205 - [XSLT30] error handling for shadow attributes and/or static expressions
Summary: [XSLT30] error handling for shadow attributes and/or static expressions
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Member-only Editors Drafts
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:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-12 13:09 UTC by Abel Braaksma
Modified: 2015-10-29 09:50 UTC (History)
0 users

See Also:


Attachments

Description Abel Braaksma 2015-03-12 13:09:41 UTC
The section on shadow attributes (attributes starting with an underscore), 3.14.2 Shadow Attributes, does not define any error conditions.

The related section on Static Expressions doesn't define any either.

While it seems logical to raise typical XPath expression errors, it is unclear whether the raised errors should be dynamic errors or static errors. It makes sense to make them static errors, but most expressions have defined dynamic errors that would now occur in a static context (this is also true for expressions in xsl:use-when, a section that does not define error conditions either).
Comment 1 Michael Kay 2015-03-12 15:35:21 UTC
There's a statement in 2.11

A dynamic error may also be signaled during the static analysis phase if the error occurs during evaluation of a static expression.

But I agree it's easily missed; and the "may" is unnecessarily indecisive.
Comment 2 Michael Kay 2015-03-13 08:35:49 UTC
Thw WG agreed that it would be appropriate to add clarification here. I have added a paragraph to the section on static expressions to indicate that both static and dynamic errors in a static expression result in the transformation failing with a static error.
Comment 3 Michael Kay 2015-03-13 08:46:01 UTC
As suggested by the WG, I have also added a note concerning errors in "shadowed" attributes (where @x and @_x are both present), to the effect:

The statement that the non-shadow attribute is ignored extends to error detection: it is not an error if the non-shadow attribute has an invalid value. However, this is not reflected in the schema for XSLT stylesheets, so validation using this schema may report errors in such cases.