- From: <bugzilla@jessica.w3.org>
- Date: Wed, 30 Apr 2014 15:19:48 +0000
- To: public-qt-comments@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25517 Bug ID: 25517 Summary: [xslt 3.0] xsl:mode @typed=strict|lax Product: XPath / XQuery / XSLT Version: Working drafts Hardware: PC OS: All Status: NEW Severity: normal Priority: P2 Component: XSLT 3.0 Assignee: mike@saxonica.com Reporter: mike@saxonica.com QA Contact: public-qt-comments@w3.org The rules for xsl:mode/@typed say: The value strict is equivalent to yes, with the additional provision that within the match pattern of every template rule in this mode, any NameTest used as an AbbrevForwardStep (with no preceding "@") in the ForwardStepP of the first StepExprP of a RelativePathExprP is interpreted as match="schema-element(product)", while match="product/code" is interpreted as match="schema-element(product)/code". The value lax is equivalent to strict, except that the interpretation of a NameTest as a SchemaElementTest occurs only if it matches the name of a global element declaration in the in-scope schema declarations. Several problems here: (a) there's an abrupt lurch into specification by example; it's clearly not intended that EVERY Nametest is to be interpreted as schema-element(product)! (b) patterns now allow the child axis to be written explicitly, we should recognize this case also. (c) a NameTest can be a wild card, but this doesn't convert to a schema-element test. Suggested replacement rule: The value strict is equivalent to yes, with the additional provision that in certain contexts within the match pattern, a bare element name E is interpreted as schema-element(E), meaning that it will only match an element that has been validated against the declaration of element E in the schema. Specifically, in any RelativePathExprP within the pattern, if the first StepExprP satisfies the following conditions: 1. the principal node kind of the axis used in the axis step is Element (that is, the axis is not the attribute or namespace axis) 2. the NodeTest used in the axis step is an EQName then the EQName used as the NodeTest in this axis step (say E) is replaced by a SchemaElementTest using the same EQName (in this case schema-element(E)). The value lax is equivalent to strict, except that the substitution of a SchemaElementTest only takes place if there is a global element declaration in the schema with a matching name. -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Wednesday, 30 April 2014 15:19:54 UTC