blob: 31f4bfa6b11f68f1e7a13c5a3897dd19f651b570 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
<?xml version="1.0"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:svg="http://www.w3.org/2000/svg">
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
<xsl:param name="stepno"/>
<xsl:template match="svg:g[starts-with(@id, 'step')]">
<xsl:variable name="n">
<xsl:value-of select="substring-after(@id, 'step')"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="number($n) > number($stepno)">
<xsl:copy> <xsl:attribute name="style">opacity:0;</xsl:attribute><xsl:apply-templates select="node()|@*"/> </xsl:copy>
</xsl:when>
<xsl:when test="number($n) < number($stepno)">
<xsl:copy> <xsl:attribute name="style">opacity:0.5;</xsl:attribute><xsl:apply-templates select="node()|@*"/> </xsl:copy>
</xsl:when>
<xsl:otherwise>
<xsl:copy> <xsl:apply-templates select="node()|@*"/> </xsl:copy>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
|