]> gitweb.michael.orlitzky.com - charm-bypass.git/blob - svgclean.xsl
index.html.in: tweak the slogan and add a security code hint
[charm-bypass.git] / svgclean.xsl
1 <?xml version="1.0"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:svg="http://www.w3.org/2000/svg"
4 version="1.0">
5 <xsl:output method="xml" encoding="UTF-8" />
6
7 <!--
8 The first rule replaces a <tspan> inside of a <text> with its
9 contents.
10 -->
11 <xsl:template match="svg:text/svg:tspan">
12 <xsl:value-of select="text()" />
13 </xsl:template>
14
15 <!--
16 Then this rule matches everything, and copies it while applying
17 any relevant templates to its children. Either we'll hit a <tspan>
18 within a <text> and process it, or we'll hit this rule again.
19 -->
20 <xsl:template match="*|@*">
21 <xsl:copy>
22 <xsl:apply-templates select="*|@*" />
23 </xsl:copy>
24 </xsl:template>
25 </xsl:stylesheet>