blob: 53bfe21811ccf66375e2e2e93b58eb2e72276342 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<?xml version='1.0' encoding='utf-8'?><!-- -*- indent-tabs-mode: nil -*- -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:import href="../../xslt/docbook/html/db2html.xsl"/>
<xsl:param name="annotate" select="true()"/>
<xsl:template match="/*/*[preceding-sibling::*][name(.) != 'title']">
<xsl:if test="$annotate">
<pre style="margin: 16px; padding: 0.8em; background-color: #9EB6D1; -moz-border-radius: 8px;">
<xsl:apply-templates mode="source.mode" select="."/>
</pre>
</xsl:if>
<xsl:apply-imports/>
</xsl:template>
<xsl:template mode="source.mode" match="*">
<xsl:text><</xsl:text>
<xsl:value-of select="local-name(.)"/>
<xsl:for-each select="attribute::*">
<xsl:text> </xsl:text>
<xsl:value-of select="name(.)"/>
<xsl:text>="</xsl:text>
<xsl:value-of select="."/>
<xsl:text>"</xsl:text>
</xsl:for-each>
<xsl:text>></xsl:text>
<xsl:apply-templates mode="source.mode" select="node()"/>
<xsl:text></</xsl:text>
<xsl:value-of select="local-name(.)"/>
<xsl:text>></xsl:text>
</xsl:template>
</xsl:stylesheet>
|