- From: <bugzilla@jessica.w3.org>
- Date: Wed, 05 Feb 2014 20:28:26 +0000
- To: public-qt-comments@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=24529 Bug ID: 24529 Summary: Missing explicit default values for uses of xsl:context-item/@use Product: XPath / XQuery / XSLT Version: Last Call drafts Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P2 Component: XSLT 3.0 Assignee: mike@saxonica.com Reporter: abel.braaksma@xs4all.nl QA Contact: public-qt-comments@w3.org Under 6.7 Declaring the Context Item (http://www.w3.org/TR/xslt-30/#declaring-context-item) the syntax for xsl:context-item defines the use attribute as optional attribute with one of three values, required, optional, prohibited. Under the second paragraph of 6.7.1 the text says "When the xsl:context-item element appears as a child of xsl:mode, the only permitted value for the use attribute is required" but doesn't mention what happens when the use attribute is omitted when xsl:context-item is used as child of xsl:mode (error? default to required?). For other uses, as in a child of xsl:template, there is no mention either of what the default value for this attribute should be. Indirectly, from the first example at the bottom of 6.7.1 we can deduct that the default is "required". Under 6.7.2, third paragraph, the text says (in the middle): "If the containing xsl:template element has no name attribute then the only permitted value is required." same applies here as for the xsl:context-item under xsl:mode. It is not trivial to deduct what the default should be. My guess is that the default for a template with a name attribute should be "optional" and the default for xsl:mode or an xsl:template without a name attribute should be "required". Or alternatively, not specifying the use attribute other than when the default is allowed to be "optional" (as that same third paragraph describes), is an error. Note also the line under 6.7.1 (last line before example): "If there is no xsl:context-item element for an xsl:mode that specifies initial="yes", this is equivalent to specifying <xsl:context-item as="item()"/>" It's probably better that we be more explicit here, i.e., give the use attribute as well. -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Wednesday, 5 February 2014 20:28:28 UTC