<xsl:param name="autotoc.label.in.hyperlink" select="1"></xsl:param>
<xsl:param name="section.label.includes.component.label" select="1"></xsl:param>
-<!-- textdecoration_1 applies the style to the text to highlight an region
- of the documentation refers to a lustre specific version.
- template_{1,2,3} all use the 'condition="{l23,l24}" attributes and add
- decoration to the rendered version of the manual to show lustre version
- specific features. -->
+<!-- include our decoration style for Lustre versions. -->
+<xsl:include href='./style/customstyle_common.xsl'/>
-<!-- textdecoration_1: a template to apply a div with a class
- around the relevant sections of text. -->
-<xsl:template name='textdecoration_1'>
- <xsl:param name='version'/>
- <xsl:param name='chunkid'/>
- <div class='versionbox'>
- <span class='versionlabel'>
- <xsl:value-of select='$version'/>
- </span>
- <span class='versioncontent'>
- <xsl:apply-templates/>
- </span>
- </div>
-</xsl:template>
-
-<!-- conditional matching template: this calls text decoration
- template with the correct variables. -->
<xsl:template match="*[@condition]">
- <xsl:variable name="id">
- <xsl:call-template name="object.id"/>
- </xsl:variable>
- <xsl:call-template name='section.titlepage'/>
- <xsl:choose>
- <xsl:when test="@condition = 'l21'">
- <xsl:call-template name='textdecoration_1'>
- <xsl:with-param name='version' select="'Introduced in Lustre 2.1'"/>
- <xsl:with-param name='chunkid' select="$id"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="@condition = 'l22'">
- <xsl:call-template name='textdecoration_1'>
- <xsl:with-param name='version' select="'Introduced in Lustre 2.2'"/>
- <xsl:with-param name='chunkid' select="$id"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="@condition = 'l23'">
- <xsl:call-template name='textdecoration_1'>
- <xsl:with-param name='version' select="'Introduced in Lustre 2.3'"/>
- <xsl:with-param name='chunkid' select="$id"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="@condition = 'l24'">
- <xsl:call-template name='textdecoration_1'>
- <xsl:with-param name='version' select="'Introduced in Lustre 2.4'"/>
- <xsl:with-param name='chunkid' select="$id"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="@condition = 'l25'">
- <xsl:call-template name='textdecoration_1'>
- <xsl:with-param name='version' select="'Introduced in Lustre 2.5'"/>
- <xsl:with-param name='chunkid' select="$id"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="@condition = 'l26'">
- <xsl:call-template name='textdecoration_1'>
- <xsl:with-param name='version' select="'Introduced in Lustre 2.6'"/>
- <xsl:with-param name='chunkid' select="$id"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="@condition = 'l27'">
- <xsl:call-template name='textdecoration_1'>
- <xsl:with-param name='version' select="'Introduced in Lustre 2.7'"/>
- <xsl:with-param name='chunkid' select="$id"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="@condition = 'l28'">
- <xsl:call-template name='textdecoration_1'>
- <xsl:with-param name='version' select="'Introduced in Lustre 2.8'"/>
- <xsl:with-param name='chunkid' select="$id"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="@condition = 'l29'">
- <xsl:call-template name='textdecoration_1'>
- <xsl:with-param name='version' select="'Introduced in Lustre 2.9'"/>
- <xsl:with-param name='chunkid' select="$id"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name='textdecoration_1'>
- <xsl:with-param name='version' select="'unrecognised Lustre version'"/>
- <xsl:with-param name='chunkid' select="$id"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<!-- toc.line template: This template over loads the behavior of creating the table of contents. It
- adds in a small entry to identify lustre version specific features.
- for more information, see this page:
- http://xml.web.cern.ch/XML/www.sagehill.net/xml/docbookxsl/PrintCustomEx.html#PrintTocEntries -->
-<xsl:template name="toc.line">
- <xsl:param name="toc-context" select="."/>
- <xsl:param name="depth" select="1"/>
- <xsl:param name="depth.from.context" select="8"/>
-
- <span>
- <xsl:attribute name="class">
- <xsl:value-of select="local-name(.)"/>
- </xsl:attribute>
-
- <!-- * if $autotoc.label.in.hyperlink is zero, then output the label -->
- <!-- * before the hyperlinked title (as the DSSSL stylesheet does) -->
- <xsl:if test="$autotoc.label.in.hyperlink = 0">
- <xsl:variable name="label">
- <xsl:apply-templates select="." mode="label.markup"/>
- </xsl:variable>
- <xsl:copy-of select="$label"/>
- <xsl:if test="$label != ''">
- <xsl:value-of select="$autotoc.label.separator"/>
- </xsl:if>
- </xsl:if>
-
- <a>
- <xsl:attribute name="href">
- <xsl:call-template name="href.target">
- <xsl:with-param name="context" select="$toc-context"/>
- <xsl:with-param name="toc-context" select="$toc-context"/>
- </xsl:call-template>
- </xsl:attribute>
+ <xsl:param name="content">
+ <xsl:apply-imports/>
+ </xsl:param>
- <!-- * if $autotoc.label.in.hyperlink is non-zero, then output the label
- as part of the hyperlinked title -->
- <xsl:if test="not($autotoc.label.in.hyperlink = 0)">
- <xsl:variable name="label">
- <xsl:apply-templates select="." mode="label.markup"/>
- </xsl:variable>
- <xsl:copy-of select="$label"/>
- <xsl:if test="$label != ''">
- <xsl:value-of select="$autotoc.label.separator"/>
- </xsl:if>
- </xsl:if>
- <xsl:apply-templates select="." mode="titleabbrev.markup"/>
- </a>
- </span>
- <!-- add another span to hold the lustre version annotation -->
- <xsl:if test="@condition='l21'">
- <span class='floatright'>L 2.1 </span>
- </xsl:if>
- <xsl:if test="@condition='l22'">
- <span class='floatright'>L 2.2 </span>
- </xsl:if>
- <xsl:if test="@condition='l23'">
- <span class='floatright'>L 2.3 </span>
- </xsl:if>
- <xsl:if test="@condition='l24'">
- <span class='floatright'>L 2.4 </span>
- </xsl:if>
- <xsl:if test="@condition='l25'">
- <span class='floatright'>L 2.5 </span>
- </xsl:if>
- <xsl:if test="@condition='l26'">
- <span class='floatright'>L 2.6 </span>
- </xsl:if>
- <xsl:if test="@condition='l27'">
- <span class='floatright'>L 2.7 </span>
- </xsl:if>
- <xsl:if test="@condition='l28'">
- <span class='floatright'>L 2.8 </span>
- </xsl:if>
- <xsl:if test="@condition='l29'">
- <span class='floatright'>L 2.9 </span>
- </xsl:if>
+ <xsl:call-template name='condition-decorator'>
+ <xsl:with-param name='content' select="$content"/>
+ </xsl:call-template>
</xsl:template>
</xsl:stylesheet>