]> gitweb.michael.orlitzky.com - charm-bypass.git/commitdiff
svgclean.xsl: fix text node processing
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 3 Nov 2023 02:47:02 +0000 (22:47 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 3 Nov 2023 03:19:08 +0000 (23:19 -0400)
We have to use node() instead of "*" to match (child) text nodes.

svgclean.xsl

index 5077a216fc5f2ac40c086134bcb24c69709aa235..81b7faf4d40f01856965091444642d7cfed09c67 100644 (file)
@@ -20,9 +20,9 @@
     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>