CSTUG

Stylesheet

<xsl:stylesheet version="2.0">

<!-- This stylesheets outputs only articles which contain at least one abstract in any language. It is achieved by modifying the templates of the imported stylesheet. -->
<xsl:import href="articles2.xsl"/>
<!-- Here we count the "abstract" children. If there is at least one, we apply the imported template. -->
<xsl:template match="c:article"> <xsl:if test="count(c:abstract) > 0"> <xsl:apply-imports/> </xsl:if> </xsl:template>
<!-- Without this template the stylesheet would output empty issues if none of the articles has any abstract. -->
<xsl:template match="c:issue"> <xsl:if test="count(c:article[count(c:abstract) > 0]) > 0"> <xsl:apply-imports/> </xsl:if> </xsl:template> </xsl:stylesheet>

abstracts2.xsl