[Bug 26330] New: The semantics for the applies-to attribute on accumulators prevents use with non-document initial context items

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

[Bug 26330] New: The semantics for the applies-to attribute on accumulators prevents use with non-document initial context items

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

            Bug ID: 26330
           Summary: The semantics for the applies-to attribute on
                    accumulators prevents use with non-document initial
                    context items
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 3.0
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]

The initial context item for a stylesheet transformation can be set to
something other than a document node. However, the current definition of
accumulators is such that it only applies to nodes that are rooted in a
document node:

Section 18.2.1:
"An accumulator is applicable to a particular document if the pattern supplied
in the applies-to attribute matches the first element node in the document
(typically the outermost element, though the definition allows for document
nodes that have more than one element child). The default value for the
applies-to attribute is applies-to="*", which ensures that the accumulator is
applicable to every document."

I think this definition has two issues:
1) instead of speaking of document nodes, it should (probably) speak of initial
context items.
2) the current default pattern is "*", but this does not trigger the
accumulator for patterns that are not an element and that, potentially, precede
the first element in a document. Perhaps a default pattern of "node()" makes
more sense.

This bug-entry is somewhat related to Bug 26328.

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

Reply | Threaded
Open this post in threaded view
|

[Bug 26330] [XSLT30] The semantics for the applies-to attribute on accumulators prevents use with non-document initial context items

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

Michael Kay <[hidden email]> changed:

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

--- Comment #1 from Michael Kay <[hidden email]> ---
We resolved as follows:

(a) the @applies-to attribute should be a pattern, which must be motionless if
the accumulator is streamable

(b) accumulator rules are only tested/applied for nodes within a subtree rooted
at a node that matches the applies-to pattern. This node can be of any node
kind.

(c) accumulator-before and accumulator-after are available on any node, whether
or not the tree contains a node that matches applies-to. (If no node anywhere
in the tree matches the applies-to pattern, the value will always be the
initial value.)

(d) the new-value in an accumulator rule can be computed using a sequence
constructor as an alternative to an xpath expression

(e) the new-value attribute is renamed "select"

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

Reply | Threaded
Open this post in threaded view
|

[Bug 26330] [XSLT30] The semantics for the applies-to attribute on accumulators prevents use with non-document initial context items

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=26330

--- Comment #2 from Michael Kay <[hidden email]> ---
*** Bug 26471 has been marked as a duplicate of this bug. ***

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

Reply | Threaded
Open this post in threaded view
|

[Bug 26330] [XSLT30] The semantics for the applies-to attribute on accumulators prevents use with non-document initial context items

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=26330

Michael Kay <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED

--- Comment #3 from Michael Kay <[hidden email]> ---
The changes have been applied.

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