source: trunk/gli/help/gen-one-html.xsl@ 5417

Last change on this file since 5417 was 5417, checked in by mdewsnip, 21 years ago

Display sections and subsections differently. Ignore ObviousSentences. Changed link colour back to normal.

  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 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"/>
5
6 <xsl:template match="Anchor"/>
7
8 <xsl:template match="Break">
9 <p/>
10 </xsl:template>
11
12 <xsl:template match="Contents">
13 <p/>
14 </xsl:template>
15
16 <xsl:template match="Document">
17 <html>
18 <head>
19 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></meta>
20 <title>The Greenstone Librarian Interface - Help Pages</title>
21 </head>
22 <body bgcolor="#E0F0E0">
23 <xsl:for-each select="Section">
24 <xsl:call-template name="processSection">
25 <xsl:with-param name="sectionHead" select="position()"/>
26 </xsl:call-template>
27 </xsl:for-each>
28 </body>
29 </html>
30 </xsl:template>
31
32 <xsl:template match="ObviousSentence"/>
33
34 <xsl:template match="Reference">
35 <a href="#{@target}"><xsl:apply-templates/></a>
36 </xsl:template>
37
38 <xsl:template match="Section"/>
39
40 <xsl:template match="Title"/>
41
42
43 <xsl:template name="processSection">
44 <xsl:param name="sectionHead"/>
45
46 <xsl:if test="Title">
47 <a name="{@name}">
48 <xsl:call-template name="processTitle">
49 <xsl:with-param name="sectionNumber" select="$sectionHead"/>
50 <xsl:with-param name="sectionTitle" select="Title"/>
51 </xsl:call-template>
52 </a>
53 </xsl:if>
54
55 <xsl:apply-templates/>
56
57 <xsl:for-each select="Section">
58 <xsl:call-template name="processSection">
59 <xsl:with-param name="sectionHead" select="concat($sectionHead, '.', position())"/>
60 </xsl:call-template>
61 </xsl:for-each>
62 </xsl:template>
63
64
65 <xsl:template name="processTitle">
66 <xsl:param name="sectionNumber"/>
67 <xsl:param name="sectionTitle"/>
68
69 <xsl:choose>
70 <xsl:when test="contains($sectionNumber, '.')">
71 <h3>Section <xsl:value-of select="concat($sectionNumber, ': ', $sectionTitle)"/></h3>
72 </xsl:when>
73 <xsl:otherwise>
74 <h1>Section <xsl:value-of select="concat($sectionNumber, ': ', $sectionTitle)"/></h1>
75 </xsl:otherwise>
76 </xsl:choose>
77 </xsl:template>
78
79</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.