- From: <bugzilla@jessica.w3.org>
- Date: Fri, 02 Sep 2016 15:44:45 +0000
- To: public-qt-comments@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29803
Bug ID: 29803
Summary: [XSLT30] We accidentally lost the ability to use
accumulators on streamed nodes in the initial match
selection, and other remnants of removing @streamable
from xsl:global-context-item
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 bug applies to section 18.2.2, Applicability of Accumulators.
After we dropped @streamable from xsl:global-context-item (GCI) as a resolution
to bug 29696, we lost the ability to declaratively specify what accumulators
apply to a given input tree from a the initial match selection (IMS).
In the previous situation, if the GCI == IMS, the @use-accumulators applied to
both. We dropped this, so we lost the ability to specify what accumulators
should or should not be calculated on streamed IMS's.
There are some ways we can fix this:
1) Add @use-accumulators as an attribute to xsl:stylesheet/transform/package,
only to apply to the containing package (similar to the scope of its
accumulators).
Advantages: simple to add, not so disruptive
Disadvantages: it requires access to its child elements (i.e., it is a forward
declaration), which we do not allow otherwise
2) Add a declaration xsl:initial-match-selection with @streamable and
@use-accumulators. The semantics would be that *if* the IMS contains one or
more streamed nodes, these accumulators are applicable. It is ignored for
non-streamed nodes, or if @streamable="no" (similar to xsl:merge-source).
Advantages: clear to the end user what its meaning is, fixes the use-case and
makes it programmable with shadow attributes.
Disadvantages: it is a new declaration and we rather not add new stuff in CR
3) Leave the status-quo as is, but specify the default: either #all, or #none.
Advantages: no new syntax needed
Disadvantages: leaves the implementation-defined behavior in place if a user
wants to specify something different.
4) Do nothing
Advantages: nothing to change
Disadvantages: makes using streamable accumulators highly
implementation-dependent with potentially big interoperability issues
5) Require that implementations provide a @use-accumulators type of
functionality, which we can by describing this under 2.3.2. Priming a
stylesheet.
Advantages: it makes this feature testable and, while API dependent, a reliable
part of any implementation that supports the streaming feature, which improves
interoperability.
Disadvantages: user can only set this by the API
-------------------------------------
Some other observations (editorial):
Under 18.2.2 the following paragraph should be dropped:
"When a streamed node is supplied as the global context item, the set of
accumulators applicable to the document containing the global context item can
be declared using the use-accumulators attribute of the xsl:global-context-item
declaration. (Note that this is only useful when the global context item is
also present in the initial match selection, since references to a streamable
global context item per se are always motionless.)"
Also under 18.2.2, remove xsl:global-context-item:
"The accumulator is declared as being applicable to the tree in question, using
the use-accumulators attribute on xsl:source-document, xsl:merge-source, or
xsl:global-context-item; or"
--
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Friday, 2 September 2016 15:44:53 UTC