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
|  
Report Content as Inappropriate

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

Martin Honnen-2

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

I have the stylesheet

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:math="http://www.w3.org/2005/xpath-functions/math"
        exclude-result-prefixes="xs math"
        version="3.0">
       
        <xsl:mode streamable="yes" on-no-match="shallow-copy"/>
       
        <xsl:template match="item">
                <item processed="true">
                        <xsl:apply-templates select="@* , node()"/>
                </item>
        </xsl:template>
       
</xsl:stylesheet>

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.
https://www.avast.com/antivirus


------------------------------------------------------------------------------
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!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Loading...