Usando para cada grupo para XSLT de alto desempenho
Eu tenho uma folha de estilo XSLT (1.0). Funciona sem problemas. Eu quero fazer isso para 2.0. Eu quero usarxsl:for-each-group
(e torná-lo com alto desempenho). É possível? Como? Por favor explique.
Eu tenho muitos lugares como
<xsl:if test="test condition">
<xsl:for-each select="wo:tent">
<width aidwidth='{/wo:document/styles [@wo:name=current()/@wo:style-name]/@wo:width}'
</xsl:for-each>
</xsl:if>
ADICIONADO
<xsl:template match="wo:country">
<xsl:for-each select="@*">
<xsl:copy/>
</xsl:for-each>
<xsl:variable name="states" select="wo:pages[@xil:style = "topstates" or @xil:style = "toppage-title"]"/>
<xsl:variable name="provinces" select="wo:pages[@xil:style = "topprovinces"]"/>
<xsl:choose>
<xsl:when test="$states">
<xsl:apply-templates select="$states[2]/preceding-sibling::*"/>
<xsl:apply-templates select="$states[2]" mode="states">
<xsl:with-param name="states" select="$states[position() != 0]"/>
</xsl:apply-templates>
</xsl:when>
<xsl:when test="$provinces">
<xsl:apply-templates select="$provinces[2]/preceding-sibling::*"/>
<xsl:apply-templates select="$provinces[2]" mode="provinces">
<xsl:with-param name="provinces" select="$provinces[position() != 2]"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
A FONTE
<?xml version="1.0" encoding="UTF-8"?>
<wo:country>
some stuff
</wo:country>