<xsl:output method="xml" encoding="UTF-8" />
<!--
- The first rule replaces a <tspan> inside of a <text> with its
- contents.
+ The first rule replaces a <tspan> directly inside of a <text> with
+ its contents. The "directly" part is important because we actually
+ use tspans in one place, for the origin -> destination. We don't
+ want to clobber THOSE tspans, but we can avoid it by putting them
+ in a group (<g>).
-->
<xsl:template match="svg:text/svg:tspan">
<xsl:value-of select="text()" />
any relevant templates to its children. Either we'll hit a <tspan>
within a <text> and process it, or we'll hit this rule again.
-->
- <xsl:template match="*|@*">
+ <xsl:template match="node()|@*">
<xsl:copy>
- <xsl:apply-templates select="*|@*" />
+ <xsl:apply-templates select="node()|@*" />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>