Hi,
<xsl:if test="child::ptr[attribute::gradRef='gerg_inn']">
or e.g.
<xsl:if test="ptr/@gradRef = 'gerg_inn'">
but it did not work :-(
In your previous email you wrote:
<xsl:template match="/">
</xsl:template>
<xsl:key name="term" match="term[(_at_)type='forma']" use="."/>
<xsl:template match="//tig" name="pippo">
<html>
<body>
<xsl:if test="child::ptr[gradRef='gerg_inn']">
<xsl:for-each
select="child::term[(_at_)type='forma'][not(.=preceding::term)]">
<xsl:sort select="."/><br />
<xsl:value-of select="concat(.,' ',count(key('term',.)))"/>
<xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:if>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Does your stylesheet contain the topmost template, i.e. the template for root
node that doesn't do anything? Anyhow, the test works for me with the source
you showed—could you show a complete (i.e. self-contained) example and
stylesheet that doesn't work, and what is the desired output?
Cheers,
Jarno - DJ Xii vs DJ Todd: Bait & Switch Vol. 1
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list