[Bug 29120] [xslt 3.0] last() in a streamable xsl:merge

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

--- Comment #7 from Michael Kay <mike@saxonica.com> ---
I don't think the effect of position() can be achieved using accumulators,
because a call to position() within xsl:merge-action represents the number of
groups that have been processed, which can only be determined in relation to
the number of distinct merge keys across all the documents; accumulators can
only depend on a single source document.

For evaluation of the merge key, we already decided in the resolution of bug
#28762 to use a singleton focus in the case where it is streamable, and I
propose we stick with that decision. (However, the resolution of 28762
currently appears in section 15.1 and it probably deserves a mention in 15.5).

For the focus within xsl:merge-action I propose to change bullet 3 of 15.7 from

"The context size is the number of groups, that is, the number of distinct sets
of merge key values."

to:

"The context size is as follows:

* If any of the xsl:merge-source elements within the xsl:merge instruction
specifies streamable="yes" (explicitly or implicitly), then *absent*.
   Note: this means that within the xsl:merge-action of a streamable xsl:merge,
calling last() throws error XPDY0002

* Otherwise, the number of groups, that is, the number of distinct sets of
merge key values."

This currently contradicts the statement in XPath 2.1.2: "If any component in
the focus is defined, all components of the focus are defined." I propose to
raise a separate issue on that.

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

Received on Thursday, 22 October 2015 11:46:38 UTC