2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:svg="http://www.w3.org/2000/svg"
5 <xsl:output method="xml" encoding="UTF-8" />
8 The first rule replaces a <tspan> directly inside of a <text> with
9 its contents. The "directly" part is important because we actually
10 use tspans in one place, for the origin -> destination. We don't
11 want to clobber THOSE tspans, but we can avoid it by putting them
14 <xsl:template match="svg:text/svg:tspan">
15 <xsl:value-of select="text()" />
19 Then this rule matches everything, and copies it while applying
20 any relevant templates to its children. Either we'll hit a <tspan>
21 within a <text> and process it, or we'll hit this rule again.
23 <xsl:template match="*|@*">
25 <xsl:apply-templates select="*|@*" />