Should <xsl:apply-templates select="@* , node()"/> be streamable?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Should <xsl:apply-templates select="@* , node()"/> be streamable?

Martin Honnen-2

I have a question on the streamability assessment I get with Saxon EE for <xsl:apply-templates select="@* , node()"/>.

I have the stylesheet

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl=""
        exclude-result-prefixes="xs math"
        <xsl:mode streamable="yes" on-no-match="shallow-copy"/>
        <xsl:template match="item">
                <item processed="true">
                        <xsl:apply-templates select="@* , node()"/>

and Saxon rejects that as not streamable, however with the explication

Description:   * There is more than one potentially consuming operand:
{@attribute()} and {( element() | text() | comment() |
processing-instruction() )}, both on line 12

Is @* a consuming operand? Is there some rewrite of "node()" to
"element() | text() | comment() | processing-instruction()" that then
causes the problem? Should <xsl:apply-templates select="@* , node()"/>
be streamable?

Exselt runs the stylesheet fine and outputs the analysis
[Streaming]  12,  5: xsl:apply-templates is Motionless and Grounded

Saxon compiles and runs the XSLT fine when I change the single
apply-templates to

                        <xsl:apply-templates select="@*"/>
                        <xsl:apply-templates select="node()"/>

Diese E-Mail wurde von Avast Antivirus-Software auf Viren gepr├╝ft.

Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!;130105516;z
saxon-help mailing list archived at
[hidden email]