[Bug 27075] New: [xslt3.0ts] Streamability of void path expressions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 27075] New: [xslt3.0ts] Streamability of void path expressions

Bugzilla from bugzilla@jessica.w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27075

            Bug ID: 27075
           Summary: [xslt3.0ts] Streamability of void path expressions
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 3.0 Test Suite
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]

A number of the new Posture+Sweep tests use void path expressions, for example
A030 uses

<xpath>descendant::document-node()/attribute()</xpath>

Rule 3 for streamability of axis steps (19.8.7.7) says:

If the statically-inferred context item type is such that the axis will always
be empty (for example, applying the child axis to a text node or the parent
axis to a document node), or if the NodeTest is one that can never select nodes
on the chosen axis (for example, selecting attribute nodes on the child axis),
then the sweep is motionless and the posture is grounded (because the
expression is statically known to return an empty sequence);

In this example both axis steps fall under this rule, so they are both
Grounded+Motionless, and therefore (under the rules for path expressions in
19.8.7.6) the path expression as a whole is Grounded+Motionless. The expected
result of the test case is given as Climbing+Consuming.

There are other tests where only one of the axis steps is void under this rule,
for example

<xpath>descendant-or-self::foo/namespace::attribute()</xpath>

In this case I believe the spec gives the result as Grounded+Consuming, which
is reasonable enough. Saxon is smarter, and computes the result as
Grounded+Motionless, because it has already worked out that the entire path
expression is void. The expected result in the test case, however, is
Climbing+Consuming.

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

Reply | Threaded
Open this post in threaded view
|

[Bug 27075] [xslt3.0ts] Streamability of void path expressions

Bugzilla from bugzilla@jessica.w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27075

Abel Braaksma <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #1 from Abel Braaksma <[hidden email]> ---
> descendant::document-node()/attribute()

This appears to be an error in _base-expressions.xml where the
descendant::document-node() step expression is classified as able to return
document nodes, which obviously it can't:

<production node-type="document">descendant::document-node()</production>


> descendant-or-self::foo/namespace::attribute()

In _base-expressions.xml there appeared to be copy and paste error:

<production node-type="attribute">namespace::attribute()</production>
<production node-type="attribute">namespace::attribute(*)</production>
<production node-type="attribute">namespace::attribute(ex:foo)</production>
<production
node-type="attribute">namespace::attribute(Q{http://example.com}foo)</production>

these productions should all be classified as node-type "empty", because they
can never select anything.

I fixed the base expressions and reran the generator and the first is now
"grounded, motionless" and the second is "grounded, consuming" as per the spec.

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

Reply | Threaded
Open this post in threaded view
|

[Bug 27075] [xslt3.0ts] Streamability of void path expressions

Bugzilla from bugzilla@jessica.w3.org
In reply to this post by Bugzilla from bugzilla@jessica.w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27075

Abel Braaksma <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Abel Braaksma <[hidden email]> ---
Fixed in repository.

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