[Bug 28350] New: [XSLT30] (possibly editorial) static variables declaration order, unfinished sentence in spec

https://www.w3.org/Bugs/Public/show_bug.cgi?id=28350

            Bug ID: 28350
           Summary: [XSLT30] (possibly editorial) static variables
                    declaration order, unfinished sentence in spec
           Product: XPath / XQuery / XSLT
           Version: Member-only Editors 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

The spec, under 9.7 Static Expressions says:

<quote>
If two static variables satisfying this rule have the same name and are both in
scope, the one that appears most recently in stylesheet tree order; as a
consequence of rules defined elsewhere this will always be consistent with the
declaration having highest import precedence.
</quote>

I think the first sentence is meant to mean something like: "If two static
[...], then the static variable that appears most recently in stylesheet tree
order is in scope." (I am missing a verb and a (prepositional) object in the
sentence, I think).

I'm not 100% sure, but I think it means (among others) that the following is
legal:

<xsl:variable static="yes" name="first" select="'hello'" />
<xsl:variable static="yes" name="first" select="$first || ' world'" />

Because the one most recently declared in tree-order is valid, and the variable
is not in scope of itself, so $first in the expression refers to the previous
declaration, and is legal.

The variable would now hold string "hello world".

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 26 March 2015 22:19:44 UTC