2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
5 <!-- textdecoration-1 applies the style to the text to highlight an region
6 of the documentation refers to a lustre specific version.
8 the overall purpose of this custom style is to add
9 decoration to the rendered version of the manual to show lustre version
10 specific features. This is used in the manual docbook markup by
11 adding a condition='lNM' element to a node. When rendered,
12 the node contents is decorated to indicate it is only available in
13 the N.M version of lustre. -->
15 <!-- textdecoration-1: a template to apply a div with a class
16 around the relevant sections of text. -->
17 <xsl:template name='textdecoration-1'>
18 <xsl:param name='version'/>
19 <xsl:param name='content'/>
20 <div class='versionbox'>
21 <span class='versionlabel'>
22 <xsl:value-of select='$version'/>
24 <span class='versioncontent'>
25 <xsl:copy-of select="$content"/>
30 <!-- conditional matching template: this calls text decoration
31 template with the correct variables. -->
32 <xsl:template name="condition-decorator">
33 <xsl:param name='content'/>
35 <xsl:when test="@condition = 'l23'">
36 <xsl:call-template name='textdecoration-1'>
37 <xsl:with-param name='version' select="'Introduced in Lustre 2.3'"/>
38 <xsl:with-param name='content' select="$content"/>
41 <xsl:when test="@condition = 'l24'">
42 <xsl:call-template name='textdecoration-1'>
43 <xsl:with-param name='version' select="'Introduced in Lustre 2.4'"/>
44 <xsl:with-param name='content' select="$content"/>
47 <xsl:when test="@condition = 'l25'">
48 <xsl:call-template name='textdecoration-1'>
49 <xsl:with-param name='version' select="'Introduced in Lustre 2.5'"/>
50 <xsl:with-param name='content' select="$content"/>
53 <xsl:when test="@condition = 'l26'">
54 <xsl:call-template name='textdecoration-1'>
55 <xsl:with-param name='version' select="'Introduced in Lustre 2.6'"/>
56 <xsl:with-param name='content' select="$content"/>
59 <xsl:when test="@condition = 'l27'">
60 <xsl:call-template name='textdecoration-1'>
61 <xsl:with-param name='version' select="'Introduced in Lustre 2.7'"/>
62 <xsl:with-param name='content' select="$content"/>
65 <xsl:when test="@condition = 'l28'">
66 <xsl:call-template name='textdecoration-1'>
67 <xsl:with-param name='version' select="'Introduced in Lustre 2.8'"/>
68 <xsl:with-param name='content' select="$content"/>
71 <xsl:when test="@condition = 'l29'">
72 <xsl:call-template name='textdecoration-1'>
73 <xsl:with-param name='version' select="'Introduced in Lustre 2.9'"/>
74 <xsl:with-param name='content' select="$content"/>
77 <xsl:when test="@condition = 'l2A'">
78 <xsl:call-template name='textdecoration-1'>
79 <xsl:with-param name='version' select="'Introduced in Lustre 2.10'"/>
80 <xsl:with-param name='content' select="$content"/>
83 <xsl:when test="@condition = 'l2B'">
84 <xsl:call-template name='textdecoration-1'>
85 <xsl:with-param name='version' select="'Introduced in Lustre 2.11'"/>
86 <xsl:with-param name='content' select="$content"/>
89 <xsl:when test="@condition = 'l2C'">
90 <xsl:call-template name='textdecoration-1'>
91 <xsl:with-param name='version' select="'Introduced in Lustre 2.12'"/>
92 <xsl:with-param name='content' select="$content"/>
95 <xsl:when test="@condition != ''">
96 <xsl:call-template name='textdecoration-1'>
97 <xsl:with-param name='version' select="'Introduced before Lustre 2.3'"/>
98 <xsl:with-param name='content' select="$content"/>
102 <xsl:copy-of select="$content"/>
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 <xsl:call-template name="condition-title">
156 <xsl:with-param name="condition" select="@condition"/>
160 <xsl:template name="condition-title">
161 <xsl:param name='condition'/>
162 <!-- add another span to hold the lustre version annotation -->
164 <xsl:when test="$condition = 'l23'">
165 <span class='floatright'>L 2.3 </span>
167 <xsl:when test="$condition = 'l24'">
168 <span class='floatright'>L 2.4 </span>
170 <xsl:when test="$condition = 'l25'">
171 <span class='floatright'>L 2.5 </span>
173 <xsl:when test="$condition = 'l26'">
174 <span class='floatright'>L 2.6 </span>
176 <xsl:when test="$condition = 'l27'">
177 <span class='floatright'>L 2.7 </span>
179 <xsl:when test="$condition = 'l28'">
180 <span class='floatright'>L 2.8 </span>
182 <xsl:when test="$condition = 'l29'">
183 <span class='floatright'>L 2.9 </span>
185 <xsl:when test="$condition = 'l2A'">
186 <span class='floatright'>L 2.10 </span>
188 <xsl:when test="$condition = 'l2B'">
189 <span class='floatright'>L 2.11 </span>
191 <xsl:when test="$condition = 'l2C'">
192 <span class='floatright'>L 2.12 </span>
194 <xsl:when test="$condition != ''">
195 <span class='floatright'>L ?.? </span>