File: doc.xsl

package info (click to toggle)
libxslt 1.0.16-0.2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 18,376 kB
  • ctags: 4,518
  • sloc: xml: 46,343; ansic: 20,543; sh: 6,655; makefile: 3,757; python: 1,175; perl: 34
file content (62 lines) | stat: -rw-r--r-- 985 bytes parent folder | download | duplicates (17)
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
<xsl:stylesheet version="1.0"
	      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	      xmlns="http://www.w3.org/TR/xhtml1/strict">

<xsl:strip-space elements="doc chapter section"/>
<xsl:output
 method="xml"
 indent="yes"
 encoding="iso-8859-1"
/>

<xsl:template match="doc">
<html>
 <head>
   <title>
     <xsl:value-of select="title"/>
   </title>
 </head>
 <body>
   <xsl:apply-templates/>
 </body>
</html>
</xsl:template>

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

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

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

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

<xsl:template match="note">
<p class="note">
  <b>NOTE: </b>
  <xsl:apply-templates/>
</p>
</xsl:template>

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

</xsl:stylesheet>