W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2016

[Bug 29983] New: [XSLT30] Scanning expressions and function calls

From: <bugzilla@jessica.w3.org>
Date: Sun, 06 Nov 2016 09:45:27 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29983-523@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29983

            Bug ID: 29983
           Summary: [XSLT30] Scanning expressions and function calls
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          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
  Target Milestone: ---

This issue is a reality check. I found myself writing:

f:someDeepDescent(foo)/bar

I believed it was allowed and guaranteed streamable, because it is essentially
a scanning expression. The lh-side of "/" returns a crawling expression, the
rh-side does a name-test for each child. 

It is a scanning expression in my mental model, but now I think this is wrong.
A scanning expression is only a scanning expression if it can be rewritten,
i.e.:

a//b/c

can be rewritten as (not entirely correctly so, but to get the gist):

descendent-or-self::c[parent::b[ancestor-or-self::a]]

Since everything inside [...] is motionless, this works.

My mental model was: take any crawling expression and add a striding or
crawling expression, result is a crawling expression.

The function above is assessed as crawling expression. However, it cannot be
rewritten trivially, so it does not qualify as a scanning expression.
Conclusion: *not* guaranteed streamable.

I think the rules catch this correctly, I just spent a lot of time finding this
out and wondering if my assessment is correct.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Sunday, 6 November 2016 09:45:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:58:03 UTC