Add XSLT postprocessing of HTML files to fix browser problems
[senf.git] / doclib / html-munge.xsl
1 <?xml version="1.0" encoding="utf-8"?>\r
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
3                 version="1.0">\r
4 \r
5   <xsl:output method="html" encoding="html" />\r
6 \r
7   <xsl:template match="/">\r
8     <html>\r
9       <body bgcolor="#FFFFFF">\r
10         <xsl:apply-templates/>\r
11       </body>\r
12     </html>\r
13   </xsl:template>\r
14 \r
15   <xsl:template match="dl[dt/b/a/text()='Bug:']">\r
16     <xsl:copy>\r
17       <xsl:for-each select="@*"><xsl:copy/></xsl:for-each>\r
18       <xsl:attribute name="class">xref-bug</xsl:attribute>\r
19       <xsl:apply-templates/>\r
20     </xsl:copy>\r
21   </xsl:template>\r
22 \r
23   <xsl:template match="dl[dt/b/a/text()='Fixme:']">\r
24     <xsl:copy>\r
25       <xsl:for-each select="@*"><xsl:copy/></xsl:for-each>\r
26       <xsl:attribute name="class">xref-fixme</xsl:attribute>\r
27       <xsl:apply-templates/>\r
28     </xsl:copy>\r
29   </xsl:template>\r
30 \r
31   <xsl:template match="dl[dt/b/a/text()='Todo:']">\r
32     <xsl:copy>\r
33       <xsl:for-each select="@*"><xsl:copy/></xsl:for-each>\r
34       <xsl:attribute name="class">xref-todo</xsl:attribute>\r
35       <xsl:apply-templates/>\r
36     </xsl:copy>\r
37   </xsl:template>\r
38 \r
39   <xsl:template match="dl[dt/b/a/text()='Idea:']">\r
40     <xsl:copy>\r
41       <xsl:for-each select="@*"><xsl:copy/></xsl:for-each>\r
42       <xsl:attribute name="class">xref-idea</xsl:attribute>\r
43       <xsl:apply-templates/>\r
44     </xsl:copy>\r
45   </xsl:template>\r
46 \r
47   <xsl:template match="*">\r
48     <xsl:copy>\r
49       <xsl:for-each select="@*"><xsl:copy/></xsl:for-each>\r
50       <xsl:apply-templates/>\r
51     </xsl:copy>\r
52   </xsl:template>\r
53 \r
54 </xsl:stylesheet>\r