2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
4 <!-- xsl:import takes place at compile time. For this reason, I sed in the correct
5 primary xsl (for html,xhtml), and then run xsltproc -->
6 <xsl:import href="PRIMARYXSL"/>
8 <xsl:param name="html.stylesheet" select="'./style/manual.css'"/>
10 <xsl:param name="chapter.autolabel" select="1"></xsl:param>
11 <xsl:param name="section.autolabel" select="1"></xsl:param>
12 <xsl:param name="appendix.autolabel" select="1"></xsl:param>
13 <xsl:param name="autotoc.label.in.hyperlink" select="1"></xsl:param>
14 <xsl:param name="section.label.includes.component.label" select="1"></xsl:param>
16 <!-- textdecoration_1 applies the style to the text to highlight an region
17 of the documentation refers to a lustre specific version.
19 template_{1,2,3} all use the 'condition="{l23,l24}" attributes and add
20 decoration to the rendered version of the manual to show lustre version
21 specific features. -->
23 <!-- textdecoration_1: a template to apply a div with a class
24 around the relevant sections of text. -->
25 <xsl:template name='textdecoration_1'>
26 <xsl:param name='version'/>
27 <xsl:param name='chunkid'/>
28 <div class='versionbox'>
29 <span class='versionlabel'>
30 <xsl:value-of select='$version'/>
32 <span class='versioncontent'>
33 <xsl:apply-templates/>
38 <!-- conditional matching template: this calls text decoration
39 template with the correct variables. -->
40 <xsl:template match="*[@condition]">
41 <xsl:variable name="id">
42 <xsl:call-template name="object.id"/>
44 <xsl:call-template name='section.titlepage'/>
46 <xsl:when test="@condition = 'l21'">
47 <xsl:call-template name='textdecoration_1'>
48 <xsl:with-param name='version' select="'Introduced in Lustre 2.1'"/>
49 <xsl:with-param name='chunkid' select="$id"/>
52 <xsl:when test="@condition = 'l22'">
53 <xsl:call-template name='textdecoration_1'>
54 <xsl:with-param name='version' select="'Introduced in Lustre 2.2'"/>
55 <xsl:with-param name='chunkid' select="$id"/>
58 <xsl:when test="@condition = 'l23'">
59 <xsl:call-template name='textdecoration_1'>
60 <xsl:with-param name='version' select="'Introduced in Lustre 2.3'"/>
61 <xsl:with-param name='chunkid' select="$id"/>
64 <xsl:when test="@condition = 'l24'">
65 <xsl:call-template name='textdecoration_1'>
66 <xsl:with-param name='version' select="'Introduced in Lustre 2.4'"/>
67 <xsl:with-param name='chunkid' select="$id"/>
70 <xsl:when test="@condition = 'l25'">
71 <xsl:call-template name='textdecoration_1'>
72 <xsl:with-param name='version' select="'Introduced in Lustre 2.5'"/>
73 <xsl:with-param name='chunkid' select="$id"/>
76 <xsl:when test="@condition = 'l26'">
77 <xsl:call-template name='textdecoration_1'>
78 <xsl:with-param name='version' select="'Introduced in Lustre 2.6'"/>
79 <xsl:with-param name='chunkid' select="$id"/>
82 <xsl:when test="@condition = 'l27'">
83 <xsl:call-template name='textdecoration_1'>
84 <xsl:with-param name='version' select="'Introduced in Lustre 2.7'"/>
85 <xsl:with-param name='chunkid' select="$id"/>
88 <xsl:when test="@condition = 'l28'">
89 <xsl:call-template name='textdecoration_1'>
90 <xsl:with-param name='version' select="'Introduced in Lustre 2.8'"/>
91 <xsl:with-param name='chunkid' select="$id"/>
94 <xsl:when test="@condition = 'l29'">
95 <xsl:call-template name='textdecoration_1'>
96 <xsl:with-param name='version' select="'Introduced in Lustre 2.9'"/>
97 <xsl:with-param name='chunkid' select="$id"/>
101 <xsl:call-template name='textdecoration_1'>
102 <xsl:with-param name='version' select="'unrecognised Lustre version'"/>
103 <xsl:with-param name='chunkid' select="$id"/>
109 <!-- toc.line template: This template over loads the behavior of creating the table of contents. It
110 adds in a small entry to identify lustre version specific features.
111 for more information, see this page:
112 http://xml.web.cern.ch/XML/www.sagehill.net/xml/docbookxsl/PrintCustomEx.html#PrintTocEntries -->
113 <xsl:template name="toc.line">
114 <xsl:param name="toc-context" select="."/>
115 <xsl:param name="depth" select="1"/>
116 <xsl:param name="depth.from.context" select="8"/>
119 <xsl:attribute name="class">
120 <xsl:value-of select="local-name(.)"/>
123 <!-- * if $autotoc.label.in.hyperlink is zero, then output the label -->
124 <!-- * before the hyperlinked title (as the DSSSL stylesheet does) -->
125 <xsl:if test="$autotoc.label.in.hyperlink = 0">
126 <xsl:variable name="label">
127 <xsl:apply-templates select="." mode="label.markup"/>
129 <xsl:copy-of select="$label"/>
130 <xsl:if test="$label != ''">
131 <xsl:value-of select="$autotoc.label.separator"/>
136 <xsl:attribute name="href">
137 <xsl:call-template name="href.target">
138 <xsl:with-param name="context" select="$toc-context"/>
139 <xsl:with-param name="toc-context" select="$toc-context"/>
143 <!-- * if $autotoc.label.in.hyperlink is non-zero, then output the label
144 as part of the hyperlinked title -->
145 <xsl:if test="not($autotoc.label.in.hyperlink = 0)">
146 <xsl:variable name="label">
147 <xsl:apply-templates select="." mode="label.markup"/>
149 <xsl:copy-of select="$label"/>
150 <xsl:if test="$label != ''">
151 <xsl:value-of select="$autotoc.label.separator"/>
154 <xsl:apply-templates select="." mode="titleabbrev.markup"/>
157 <!-- add another span to hold the lustre version annotation -->
158 <xsl:if test="@condition='l21'">
159 <span class='floatright'>L 2.1 </span>
161 <xsl:if test="@condition='l22'">
162 <span class='floatright'>L 2.2 </span>
164 <xsl:if test="@condition='l23'">
165 <span class='floatright'>L 2.3 </span>
167 <xsl:if test="@condition='l24'">
168 <span class='floatright'>L 2.4 </span>
170 <xsl:if test="@condition='l25'">
171 <span class='floatright'>L 2.5 </span>
173 <xsl:if test="@condition='l26'">
174 <span class='floatright'>L 2.6 </span>
176 <xsl:if test="@condition='l27'">
177 <span class='floatright'>L 2.7 </span>
179 <xsl:if test="@condition='l28'">
180 <span class='floatright'>L 2.8 </span>
182 <xsl:if test="@condition='l29'">
183 <span class='floatright'>L 2.9 </span>