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

[Bug 29604] [XSLT30] Request for clarification of statement in section https://www.w3.org/TR/xslt-30/#stream-examples

From: <bugzilla@jessica.w3.org>
Date: Thu, 12 May 2016 10:15:57 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29604-523-zziNt1oetb@http.www.w3.org/Bugs/Public/>

--- Comment #1 from Michael Kay <mike@saxonica.com> ---
I really have no idea what we were thinking of when we wrote the sentence:

"To compute both the count and the maximum value in a single pass over the
input, it is possible to use two variables."

Perhaps the spec was different when we wrote that, and we failed to notice the
effect of a change.

In fact the way I would recommend computing multiple aggregates is to use a

<xsl:template name="xsl:initial-template" expand-text="yes">
  <xsl:stream href="transactions.xml">
    <xsl:variable name="aggregates" 
      select="map{'count': count(transactions/transaction),

I haven't tested this under Saxon but it ought to work, and I think it would be
a good idea to add the example to the spec.

(We decided to special-case map constructors so that multiple consuming
operands are allowed: they therefore become a convenient way to capture
multiple results during a single scan of the input. This can also be achieved
using xsl:fork or using accumulators, but those mechanisms are much more

You are receiving this mail because:
You are the QA Contact for the bug.
Received on Thursday, 12 May 2016 10:16:00 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 12 May 2016 10:16:00 UTC