source: trunk/gli/help/gen-many-html.xsl@ 7017

Last change on this file since 7017 was 6586, checked in by mdewsnip, 20 years ago

Added encoding="UTF-8" to output statements (not sure if this is necessary or not, but at least it documents it a little).

  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
4 <xsl:output method="html" encoding="UTF-8"/>
5
6
7 <xsl:template match="Anchor">
8 <p/>
9 <img height="20" src="../gatherer_small.gif" width="20"/>
10 <a name="{@name}"><xsl:text> </xsl:text><xsl:apply-templates/></a>
11 <p style="text-align:justify"/>
12 </xsl:template>
13
14
15 <xsl:template match="Break">
16 <p/>
17 </xsl:template>
18
19
20 <xsl:template match="Contents">
21 <p/>
22 <table align="center" border="2" cellpadding="2" width="480" bgcolor="#B0D0B0">
23 <tr>
24 <td align="center">
25 <font face="Verdana" size="4">
26 <strong>
27 Contents
28 </strong>
29 </font>
30 </td>
31 </tr>
32
33 <tr>
34 <td>
35 <table bgcolor="#FFFFFF" border="0" cellpadding="2" width="100%">
36 <xsl:apply-templates/>
37 </table>
38 </td>
39 </tr>
40 </table>
41 <p/>
42 </xsl:template>
43
44
45 <xsl:template match="ContentsGroup">
46 <tr>
47 <td colspan="3">
48 <a href="#{@linkto}">
49 <xsl:variable name="linkTo" select="@linkto"/>
50 <xsl:value-of select="parent::Contents/parent::Section/Anchor[@name=$linkTo]"/>
51 </a>
52 </td>
53 </tr>
54
55 <xsl:apply-templates/>
56 </xsl:template>
57
58
59 <xsl:template match="ContentsItem">
60 <xsl:variable name="depth" select="count(ancestor::ContentsItem) + 1"/>
61 <tr>
62 <td colspan="{$depth}">
63 <xsl:text> </xsl:text>
64 </td>
65 <td colspan="{3 - $depth}">
66 <xsl:apply-templates/>
67 </td>
68 </tr>
69 </xsl:template>
70
71
72 <xsl:template match="Document">
73 <xsl:for-each select="Section">
74 <xsl:call-template name="processSection">
75 <xsl:with-param name="sectionHead" select="position()"/>
76 </xsl:call-template>
77 </xsl:for-each>
78 </xsl:template>
79
80
81 <xsl:template match="Reference">
82 <a href="{@target}.htm#{@target}"><xsl:apply-templates/></a>
83 </xsl:template>
84
85
86 <xsl:template match="Section"/>
87
88
89 <xsl:template match="Title"/>
90
91
92 <xsl:template name="processSection">
93 <xsl:param name="sectionHead"/>
94
95 <html>
96 <head>
97 <title>The Greenstone Librarian Interface - Help Pages</title>
98 </head>
99 <body bgcolor="#E0F0E0">
100 <table border="2" bgcolor="#B0D0B0" cellpadding="5" cellspacing="0" width="100%">
101 <tr>
102 <td align="center" width="15%">
103 <img height="45" src="../gatherer_medium.gif" width="45"/>
104 </td>
105 <td align="center" width="*">
106 <a name="{@name}">
107 <xsl:call-template name="processTitle">
108 <xsl:with-param name="sectionNumber" select="$sectionHead"/>
109 <xsl:with-param name="sectionTitle" select="Title"/>
110 </xsl:call-template>
111 </a>
112 </td>
113 <td align="center" width="15%">
114 <img height="45" src="../gatherer_medium.gif" width="45"/>
115 </td>
116 </tr>
117 </table>
118
119 <xsl:apply-templates/>
120 </body>
121 </html>
122
123 <xsl:for-each select="Section">
124 <xsl:call-template name="processSection">
125 <xsl:with-param name="sectionHead" select="concat($sectionHead, '.', position())"/>
126 </xsl:call-template>
127 </xsl:for-each>
128 </xsl:template>
129
130
131 <xsl:template name="processTitle">
132 <xsl:param name="sectionNumber"/>
133 <xsl:param name="sectionTitle"/>
134
135 <font face="Verdana" size="5">
136 <strong>
137 <xsl:value-of select="concat($sectionNumber, ': ', $sectionTitle)"/>
138 </strong>
139 </font>
140 </xsl:template>
141
142</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.