r1996: Cope slightly better with invalid filenames in various places (reported by
[rox-filer.git] / ROX-Filer / src / Docs / to_html.xsl
blobe67f5eeb63036f826802ce423a10954e7cbc5960
1 <?xml version="1.0"?>
3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 version='1.0'>
6 <xsl:import href="/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl"/>
7 <!--
8 <xsl:param name="generate.component.toc">0</xsl:param>
9 -->
10 <xsl:template name="head.content">
11 <link rel="stylesheet" href="../style.css" type="text/css" media="all"/>
12 <title><xsl:value-of select='/book/bookinfo/title'/></title>
13 </xsl:template>
15 <xsl:template match="guimenuitem">
16 <span class="guimenuitem">
17 <xsl:call-template name="inline.charseq"/>
18 </span>
19 </xsl:template>
21 <xsl:template match="guibutton">
22 <span class="guibutton">
23 <xsl:call-template name="inline.charseq"/>
24 </span>
25 </xsl:template>
27 <xsl:template match="guilabel">`<span class="guilabel"><xsl:call-template name="inline.charseq"/></span>'</xsl:template>
29 <xsl:template match="function">
30 <span class="function"><xsl:apply-templates/></span>
31 </xsl:template>
33 <xsl:template match="parameter">
34 <span class="parameter"><xsl:apply-templates/></span>
35 </xsl:template>
37 <xsl:template match="filename">`<tt class="filename"><xsl:apply-templates/></tt>'</xsl:template>
39 <xsl:template match="keycap">
40 <span class="keycap"><xsl:apply-templates/></span>
41 </xsl:template>
43 <xsl:template match="book">
44 <div class='chapter'>
45 <xsl:call-template name="book.titlepage"/>
46 <xsl:call-template name="division.toc"/>
47 </div>
48 <xsl:apply-templates/>
49 </xsl:template>
51 <xsl:template match="othercredit" mode="titlepage.mode">
52 <h3 class="{name(.)}"><xsl:call-template name="person.name"/></h3>
53 <xsl:apply-templates mode="titlepage.mode" select="./contrib"/>
54 <xsl:apply-templates mode="titlepage.mode" select="./affiliation"/>
55 </xsl:template>
57 <xsl:template match="emphasis">
58 <xsl:choose>
59 <xsl:when test="@role='underline'">
60 <u><xsl:apply-templates/></u>
61 </xsl:when>
62 <xsl:otherwise>
63 <xsl:apply-imports/>
64 </xsl:otherwise>
65 </xsl:choose>
66 </xsl:template>
68 <xsl:template match="citation">
69 <xsl:text>[</xsl:text>
70 <xsl:variable name="cited"><xsl:value-of select="."/></xsl:variable>
71 <a href="#{generate-id(/book/bibliography/bibliomixed[string(abbrev/.) = $cited])}">
72 <xsl:call-template name="inline.charseq"/>
73 </a>
74 <xsl:text>]</xsl:text>
75 </xsl:template>
77 <xsl:template match="bibliomixed">
78 <div xmlns="http://www.w3.org/1999/xhtml" class="{name(.)}" id="{generate-id(.)}">
79 <xsl:call-template name="anchor"/>
80 <p class="{name(.)}">
81 <xsl:call-template name="biblioentry.label"/>
82 <xsl:apply-templates mode="bibliomixed.mode"/>
83 </p>
84 </div>
85 </xsl:template>
87 </xsl:stylesheet>