[Bug 22937] New: [xslt 3.0] Rules for streamable patterns

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

            Bug ID: 22937
           Summary: [xslt 3.0] Rules for streamable patterns
    Classification: Unclassified
           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 motionless patterns in 19.3.10 say:

(a) The expression in the predicate must be motionless.

(b) The predicate must not contain a call on either of the functions position
or last.

Now, the second condition is not complete, because we must also eliminate
indirect calls via named function references or function-lookup().

Also, the second condition is stricter than it needs to be. For example, it
disallows a pattern such as

match="p[. = $special[last()]]"

And perhaps the second condition is redundant?

Certainly the ban on last() appears redundant, because if the expression
contains a call on last() other than one masked as in this example, then it
will not be a motionless expression (last() is free-ranging). But calls to
position() are allowed in a motionless expression. For clarity, it seems best
to ignore the partial redundancy and leave the ban on position() in place.

So I propose to change rule (b) to:

(b) The predicate must not contain any of the following, unless it occurs
within a nested predicate:

(i) A function call to position, last, or function-lookup
(ii) A named function reference that references position, last, or
function-lookup

I would propose to make the meaning of "nested predicate" clear by means of
examples; and then add a Note to say that the ban on last() is redundant.

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

Received on Tuesday, 13 August 2013 11:49:43 UTC