Subject: [xsl] XSLT 3.0: Questions about the Statically-known namespaces and default element/ type namespace for the evaluation context of the target expression of <xsl:evaluate> From: "Dimitre Novatchev dnovatchev@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 13 Feb 2015 04:21:46 -0000 |
Hi, The 2nd bullet of section "10.4.1 Static context for the target expression" (http://www.w3.org/TR/2014/WD-xslt-30-20141002/#evaluate-static-context) of the 2nd Last Call of the W3C "XSLT 3.0" specification says: "b"Statically known namespaces and default element/type namespace: b&if the namespace-context attribute is present, then its value is an expression whose required type is a single node. The expression is evaluated, and the in-scope namespaces of the resulting node are used as the statically known namespaces for the target expression. The binding for the default namespace in the in-scope namespaces is used as the default namespace for elements and types in the target expression. [ERR XTTE3170] It is a type error if the result of evaluating the namespace-context attribute of the xsl:evaluate instruction is anything other than a single node. b&if the namespace-context attribute is absent, then the in-scope namespaces of the xsl:evaluate instruction (with the exception of any binding for the default namespace) are used as the statically known namespaces for the target expression, and the value of the innermost [xsl:]xpath-default-namespace attribute, if any, is used as the default namespace for elements and types in the target expression. Note: XPath 3.0 allows expanded names to be written in a context-independent way using the syntax Q{namespace-uri}local-name" My question is why in the second case described in this section (when the namespace-context attribute is absent), the binding for the default-namespace is derived in a different way, than in the first case? What will happen if the namespace-context attribute is *present* and it selects the <xsl:evaluate> instruction? Will then the rule for deriving the default-namespace binding of the first sub-bullet be used, or will the rule of the 2nd sub-bullet be used? As per the current text it seems that the rule in the first sub-bullet must be used. But this is exactly the same node as in the 2nd sub-bullet and despite this identity, different rules for the default namespace binding must be used. Was this really intended? What default namespace binding will be used in the second case (when the namespace-context attribute is absent), if there is no [xsl:]xpath-default-namespace attribute specified anywhere in the stylesheet? The specification doesn't define this at all. I would greatly appreciate any answer to these questions. -- Cheers, Dimitre Novatchev
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] NMTOKENS problem, Eliot Kimber ekimber | Thread | [xsl] Re: XSLT 3.0: Questions about, Michael Kay mike@xxx |
Re: [xsl] NMTOKENS problem, Craig Sampson craig. | Date | Re: [xsl] XSL 1.0 - sum values take, Kevin Bird kevinbria |
Month |