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='versioncontent'>
29 <span class='versionlabel'>
30 <xsl:value-of select='$version'/>
32 <xsl:apply-templates/>
36 <!-- conditional matching template: this calls text decoration
37 template with the correct variables. -->
38 <xsl:template match="*[@condition]">
39 <xsl:variable name="id">
40 <xsl:call-template name="object.id"/>
42 <xsl:call-template name='section.titlepage'/>
44 <xsl:when test="@condition = 'l21'">
45 <xsl:call-template name='textdecoration_1'>
46 <xsl:with-param name='version' select="'introduced in Lustre 2.1'"/>
47 <xsl:with-param name='chunkid' select="$id"/>
50 <xsl:when test="@condition = 'l22'">
51 <xsl:call-template name='textdecoration_1'>
52 <xsl:with-param name='version' select="'introduced in Lustre 2.2'"/>
53 <xsl:with-param name='chunkid' select="$id"/>
56 <xsl:when test="@condition = 'l23'">
57 <xsl:call-template name='textdecoration_1'>
58 <xsl:with-param name='version' select="'introduced in Lustre 2.3'"/>
59 <xsl:with-param name='chunkid' select="$id"/>
62 <xsl:when test="@condition = 'l24'">
63 <xsl:call-template name='textdecoration_1'>
64 <xsl:with-param name='version' select="'introduced in Lustre 2.4'"/>
65 <xsl:with-param name='chunkid' select="$id"/>
68 <xsl:when test="@condition = 'l25'">
69 <xsl:call-template name='textdecoration_1'>
70 <xsl:with-param name='version' select="'introduced in Lustre 2.5'"/>
71 <xsl:with-param name='chunkid' select="$id"/>
74 <xsl:when test="@condition = 'l26'">
75 <xsl:call-template name='textdecoration_1'>
76 <xsl:with-param name='version' select="'introduced in Lustre 2.6'"/>
77 <xsl:with-param name='chunkid' select="$id"/>
80 <xsl:when test="@condition = 'l27'">
81 <xsl:call-template name='textdecoration_1'>
82 <xsl:with-param name='version' select="'introduced in Lustre 2.7'"/>
83 <xsl:with-param name='chunkid' select="$id"/>
86 <xsl:when test="@condition = 'l28'">
87 <xsl:call-template name='textdecoration_1'>
88 <xsl:with-param name='version' select="'introduced in Lustre 2.8'"/>
89 <xsl:with-param name='chunkid' select="$id"/>
92 <xsl:when test="@condition = 'l29'">
93 <xsl:call-template name='textdecoration_1'>
94 <xsl:with-param name='version' select="'introduced in Lustre 2.9'"/>
95 <xsl:with-param name='chunkid' select="$id"/>
99 <xsl:call-template name='textdecoration_1'>
100 <xsl:with-param name='version' select="'unrecognised Lustre version'"/>
101 <xsl:with-param name='chunkid' select="$id"/>
107 <!-- toc.line template: This template over loads the behavior of creating the table of contents. It
108 adds in a small entry to identify lustre version specific features.
109 for more information, see this page:
110 http://xml.web.cern.ch/XML/www.sagehill.net/xml/docbookxsl/PrintCustomEx.html#PrintTocEntries -->
111 <xsl:template name="toc.line">
112 <xsl:param name="toc-context" select="."/>
113 <xsl:param name="depth" select="1"/>
114 <xsl:param name="depth.from.context" select="8"/>
117 <xsl:attribute name="class">
118 <xsl:value-of select="local-name(.)"/>
121 <!-- * if $autotoc.label.in.hyperlink is zero, then output the label -->
122 <!-- * before the hyperlinked title (as the DSSSL stylesheet does) -->
123 <xsl:if test="$autotoc.label.in.hyperlink = 0">
124 <xsl:variable name="label">
125 <xsl:apply-templates select="." mode="label.markup"/>
127 <xsl:copy-of select="$label"/>
128 <xsl:if test="$label != ''">
129 <xsl:value-of select="$autotoc.label.separator"/>
134 <xsl:attribute name="href">
135 <xsl:call-template name="href.target">
136 <xsl:with-param name="context" select="$toc-context"/>
137 <xsl:with-param name="toc-context" select="$toc-context"/>
141 <!-- * if $autotoc.label.in.hyperlink is non-zero, then output the label
142 as part of the hyperlinked title -->
143 <xsl:if test="not($autotoc.label.in.hyperlink = 0)">
144 <xsl:variable name="label">
145 <xsl:apply-templates select="." mode="label.markup"/>
147 <xsl:copy-of select="$label"/>
148 <xsl:if test="$label != ''">
149 <xsl:value-of select="$autotoc.label.separator"/>
152 <xsl:apply-templates select="." mode="titleabbrev.markup"/>
155 <!-- add another span to hold the lustre version annotation -->
156 <xsl:if test="@condition='l21'">
157 <span class='floatright'>L 2.1 </span>
159 <xsl:if test="@condition='l22'">
160 <span class='floatright'>L 2.2 </span>
162 <xsl:if test="@condition='l23'">
163 <span class='floatright'>L 2.3 </span>
165 <xsl:if test="@condition='l24'">
166 <span class='floatright'>L 2.4 </span>
168 <xsl:if test="@condition='l25'">
169 <span class='floatright'>L 2.5 </span>
171 <xsl:if test="@condition='l26'">
172 <span class='floatright'>L 2.6 </span>
174 <xsl:if test="@condition='l27'">
175 <span class='floatright'>L 2.7 </span>
177 <xsl:if test="@condition='l28'">
178 <span class='floatright'>L 2.8 </span>
180 <xsl:if test="@condition='l29'">
181 <span class='floatright'>L 2.9 </span>