summaryrefslogtreecommitdiffstats
path: root/src/io/doc2html.xsl
blob: 9a98c23f25a19a5302fc0bc9f768c4f43250567a (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?xml version='1.0'?>
<!-- SPDX-License-Identifier: GPL-2.0-or-later -->
<xsl:stylesheet
          xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
<xsl:output method="html"/>

<xsl:template match="book">
  <html>
  <head>
  <style  TYPE="text/css">
      p
        {
        text-indent: 0.25in
        }
      h3
        {
        font-family: Arial, Helvetica, 'Bitstream Vera Sans', 'Luxi Sans', Verdana, Sans-Serif;
        font-size: 24px;
        }
      h4
        {
        font-family: Arial, Helvetica, 'Bitstream Vera Sans', 'Luxi Sans', Verdana, Sans-Serif;
        font-size: 16px;
        }

  </style>
  </head>
  <body>
  <xsl:apply-templates/>
  </body>
  </html>
</xsl:template>

<xsl:template match="bookinfo">
  <xsl:apply-templates/>
</xsl:template>

<xsl:template match="title">
  <h3>
  <xsl:apply-templates/>
  </h3>
</xsl:template>

<xsl:template match="author">
  <h4>
  <xsl:value-of select="./firstname"/>
  <xsl:text> </xsl:text>
  <xsl:value-of select="./surname"/>
  </h4>
</xsl:template>


<xsl:template match="chapter">
  <hr/>
  <xsl:apply-templates/>
</xsl:template>

<xsl:template match="para">
  <p>
  <xsl:apply-templates/>
  </p>
</xsl:template>

</xsl:stylesheet>