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

[Bug 29805] [XSLT30] Allow xsl:source-document/@use-accumulators to be present when streamable=no

From: <bugzilla@jessica.w3.org>
Date: Thu, 08 Sep 2016 08:34:56 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29805-523-6RGSfBbfRs@http.www.w3.org/Bugs/Public/>

--- Comment #3 from Abel Braaksma <abel.braaksma@xs4all.nl> ---
Perhaps that is the way to go (re: comment#2), but how does that relate to the
following? This example also requires keeping two copies around.

<xsl:variable name="x" select="doc('one.xml')"/>

<xsl:template name="xsl:initial-template">
   <!-- applies accumulators selectively -->
   <xsl:source-document streamable="yes" href='one.xml' use-accumulators="a b
      <!-- copies accumulators, other accumulators are invalid -->
      <xsl:apply-templates select="copy-of(.)" />
   <!-- same document, but all accumulators are applicable -->
   <xsl:apply-templates select="$x" />

<!-- matches only $x? -->
<xsl:template match="x[accumulator-before('foo') = 'test']">
   <xsl:value-of select="accumulator-after('bar')" />

<!-- matches both $x and copy-of?-->
<xsl:template match="x[accumulator-before('a') = 'test']">
   <!-- error on copy-of, succeeds on $x? -->
   <xsl:value-of select="accumulator-after('bar')" />

The above is how the current rules are written up. That is, fn:copy-of() by
default copies the accumulators and disallows other accumulators to apply.

Perhaps we could copy the accumulators of @use-accumulators, but at the same
time allow non-streaming accumulators to apply to all non-streaming nodes?

You are receiving this mail because:
You are the QA Contact for the bug.
Received on Thursday, 8 September 2016 08:35:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:58:02 UTC