[Bug 29507] New: [xslt30] A problem case for streamed grouping

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

            Bug ID: 29507
           Summary: [xslt30] A problem case for streamed grouping
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 3.0
          Assignee: mike@saxonica.com
          Reporter: mike@saxonica.com
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

I'm having difficulty with this test case:

  <xsl:template name="g-008" use-when="true() or $RUN">
    <out>
      <xsl:stream href="../docs/books.xml">
        <xsl:fork>
          <xsl:for-each-group select="($extra, /BOOKLIST/BOOKS/ITEM)"
group-by="@CAT">
            <CAT ID="{current-grouping-key()}">
              <xsl:copy-of select="current-group()/PRICE"/>
            </CAT>
          </xsl:for-each-group>
        </xsl:fork>
      </xsl:stream>
    </out>
  </xsl:template>

It seems to be guaranteed-streamable according to the spec, but in practice
streaming it is very difficult.

The problem is that current-group()/PRICE needs sorting into document order,
because there is no guarantee that current-group() is already in document
order, which is because it is not known whether the nodes in $extra will come
before or after the nodes in /BOOKLIST/BOOKS/ITEM in document order.

Now arguably, we know that the subset of nodes in current-group()/PRICE which
are streamed nodes will be in document order relative to each other, so one
could devise a strategy that takes this into account. But this is pretty hard
to achieve.

I'd prefer to make this one non-streamable, but I'm not sure of the best way of
changing the rules to make it so.

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

Received on Friday, 26 February 2016 11:52:09 UTC