xsl-list
[Top] [All Lists]

Using keys in templates

2004-07-13 07:16:11
Hi all,

        I'm finding I'm using more and more constructs like :

<xsl:key name="dists" match="/release/module/dist" use="@name"/>

<xsl:template match="module/dist">
 <xsl:variable name="dist" select="@name"/>
 <xsl:if test="generate-id(.) = generate-id(key('dists',$dist))">
   something
 </xsl:if>
</xsl:template>

        Would it be possible to kill the if using a syntax like :

<xsl:template match="module/dist[some test]" priority="1">
</xsl:template>

<xsl:template match="module/dist" priority="0"/>

-- 
Nicolas Mailhot



<Prev in Thread] Current Thread [Next in Thread>