comparison artifacts/contrib/list-unused-macros.xsl @ 7730:e1b831fe435a slt-simplify-cross-sections

Merged default into slt-simplify-cross-sections branch and updated package and class names.
author Tom Gottfried <tom@intevation.de>
date Mon, 20 Jan 2014 14:04:20 +0100
parents 9543b768d740
children
comparison
equal deleted inserted replaced
5084:ca45dd039b54 7730:e1b831fe435a
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:dc="http://www.intevation.org/2011/Datacage"
5 version="1.0">
6
7 <xsl:output method="text" encoding="UTF-8"/>
8
9 <xsl:template match="/">
10 <xsl:text>Duplicate macros:&#xa;</xsl:text>
11 <xsl:for-each select="//dc:macro/@name">
12 <xsl:variable name="mname" select="."/>
13 <xsl:if test="count(//dc:macro[@name=$mname]) &gt; 1">
14 <xsl:text> </xsl:text>
15 <xsl:value-of select="$mname"/>
16 <xsl:text>&#xa;</xsl:text>
17 </xsl:if>
18 </xsl:for-each>
19
20 <xsl:text>Marcos defined but not called:&#xa;</xsl:text>
21 <xsl:for-each select="//dc:macro/@name">
22 <xsl:variable name="mname" select="."/>
23 <xsl:if test="count(//dc:call-macro[@name=$mname]) = 0">
24 <xsl:text> </xsl:text>
25 <xsl:value-of select="$mname"/>
26 <xsl:text>&#xa;</xsl:text>
27 </xsl:if>
28 </xsl:for-each>
29
30 <xsl:text>Marcos called but not defined:&#xa;</xsl:text>
31 <xsl:for-each select="//dc:call-macro/@name">
32 <xsl:variable name="mname" select="."/>
33 <xsl:if test="count(//dc:macro[@name=$mname]) = 0">
34 <xsl:text> </xsl:text>
35 <xsl:value-of select="$mname"/>
36 <xsl:text>&#xa;</xsl:text>
37 </xsl:if>
38 </xsl:for-each>
39 </xsl:template>
40 </xsl:stylesheet>
41

http://dive4elements.wald.intevation.org