Mercurial > dive4elements > river
changeset 7271:9543b768d740
Added check for duplicate macros.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Wed, 09 Oct 2013 16:17:22 +0200 |
parents | a365e587af67 |
children | f6e6e0e87426 |
files | artifacts/contrib/list-unused-macros.xsl |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/contrib/list-unused-macros.xsl Wed Oct 09 13:05:37 2013 +0200 +++ b/artifacts/contrib/list-unused-macros.xsl Wed Oct 09 16:17:22 2013 +0200 @@ -7,6 +7,16 @@ <xsl:output method="text" encoding="UTF-8"/> <xsl:template match="/"> + <xsl:text>Duplicate macros:
</xsl:text> + <xsl:for-each select="//dc:macro/@name"> + <xsl:variable name="mname" select="."/> + <xsl:if test="count(//dc:macro[@name=$mname]) > 1"> + <xsl:text> </xsl:text> + <xsl:value-of select="$mname"/> + <xsl:text>
</xsl:text> + </xsl:if> + </xsl:for-each> + <xsl:text>Marcos defined but not called:
</xsl:text> <xsl:for-each select="//dc:macro/@name"> <xsl:variable name="mname" select="."/>