]> xenbits.xensource.com Git - libvirt.git/commitdiff
news: Remove handling of random HTML tags
authorAndrea Bolognani <abologna@redhat.com>
Tue, 28 Mar 2017 14:25:21 +0000 (16:25 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Sat, 1 Apr 2017 14:20:00 +0000 (16:20 +0200)
Now that the source file is validated against a schema that
only allows the <code> HTML tag to be used, we can rely on
that assumption to simplify our XSLT stylesheet.

docs/news-html.xsl

index 2961106d891323477e6ffc932e03e14e9bebee9f..dcbab86842611168514bd01c3045ce7c4817fae9 100644 (file)
     <xsl:apply-templates/>
   </xsl:template>
 
-  <!-- Misc HTML tags, add more as they are needed -->
-  <xsl:template match="code|i|tt">
-    <xsl:text disable-output-escaping="yes">&lt;</xsl:text>
-    <xsl:value-of select="name()"/>
-    <xsl:text disable-output-escaping="yes">&gt;</xsl:text>
+  <!-- <code> HTML tag -->
+  <xsl:template match="code">
+    <xsl:text disable-output-escaping="yes">&lt;code&gt;</xsl:text>
     <xsl:apply-templates/>
-    <xsl:text disable-output-escaping="yes">&lt;/</xsl:text>
-    <xsl:value-of select="name()"/>
-    <xsl:text disable-output-escaping="yes">&gt;</xsl:text>
+    <xsl:text disable-output-escaping="yes">&lt;/code&gt;</xsl:text>
   </xsl:template>
 
 </xsl:stylesheet>