[Xsl] an xslt true limit

You simply cannot store xpath expressions in a variable.
Like the following example:

<xsl:call-template name="ShowFilteredXml">
<xsl:with-param name="filter">count(ancestor::*) > 1</xsl:with-param>
</xsl:call-template>


<xsl:template name="ShowFilteredXml">
<xsl:param name="filter"/>
<xsl:choose>
<xsl:when test="$filter">

...
</xsl:template>

Forget: you cannot !




For detailed information about what can you do or not with xsl please look at here

Nessun commento: