1 <?xml version="1.0" encoding="US-ASCII"?>
2 <!--This file was created automatically by html2xhtml-->
3 <!--from the HTML stylesheets. Do not edit this file.-->
4 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
6 <!-- ********************************************************************
8 ********************************************************************
10 This file is part of the XSL DocBook Stylesheet distribution.
11 See ../README or http://nwalsh.com/docbook/xsl/ for copyright
12 and other information.
14 ******************************************************************** -->
16 <xsl:template match="processing-instruction()">
19 <xsl:template match="processing-instruction('dbhtml')">
23 <!-- ==================================================================== -->
25 <xsl:template name="dbhtml-attribute">
26 <xsl:param name="pis" select="processing-instruction('dbhtml')"/>
27 <xsl:param name="attribute">filename</xsl:param>
29 <xsl:call-template name="pi-attribute">
30 <xsl:with-param name="pis" select="$pis"/>
31 <xsl:with-param name="attribute" select="$attribute"/>
35 <xsl:template name="dbhtml-filename">
36 <xsl:param name="pis" select="./processing-instruction('dbhtml')"/>
37 <xsl:call-template name="dbhtml-attribute">
38 <xsl:with-param name="pis" select="$pis"/>
39 <xsl:with-param name="attribute">filename</xsl:with-param>
44 <xsl:template name="dbhtml-dir">
45 <xsl:param name="pis" select="./processing-instruction('dbhtml')"/>
46 <xsl:call-template name="dbhtml-attribute">
47 <xsl:with-param name="pis" select="$pis"/>
48 <xsl:with-param name="attribute">dir</xsl:with-param>
53 <xsl:template name="dbhtml-dir">
54 <xsl:param name="context" select="."/>
56 <!-- directories are now inherited from previous levels -->
58 <xsl:variable name="ppath">
59 <xsl:if test="$context/parent::*">
60 <xsl:call-template name="dbhtml-dir">
61 <xsl:with-param name="context" select="$context/parent::*"/>
66 <xsl:variable name="path">
67 <xsl:call-template name="dbhtml-attribute">
68 <xsl:with-param name="pis" select="$context/processing-instruction('dbhtml')"/>
69 <xsl:with-param name="attribute">dir</xsl:with-param>
74 <xsl:when test="$path = ''">
75 <xsl:if test="$ppath != ''">
76 <xsl:value-of select="$ppath"/>
80 <xsl:if test="$ppath != ''">
81 <xsl:value-of select="$ppath"/>
82 <xsl:if test="substring($ppath, string-length($ppath), 1) != '/'">
83 <xsl:text>/</xsl:text>
86 <xsl:value-of select="$path"/>
87 <xsl:text>/</xsl:text>
92 <!-- ==================================================================== -->
94 <xsl:template name="process.cmdsynopsis.list">
95 <xsl:param name="cmdsynopses"/><!-- empty node list by default -->
96 <xsl:param name="count" select="1"/>
99 <xsl:when test="$count>count($cmdsynopses)"/>
101 <xsl:variable name="cmdsyn" select="$cmdsynopses[$count]"/>
105 <xsl:attribute name="href">
106 <xsl:call-template name="object.id">
107 <xsl:with-param name="object" select="$cmdsyn"/>
112 <xsl:when test="$cmdsyn/@xreflabel">
113 <xsl:call-template name="xref.xreflabel">
114 <xsl:with-param name="target" select="$cmdsyn"/>
118 <xsl:apply-templates select="$cmdsyn" mode="xref-to">
119 <xsl:with-param name="target" select="$cmdsyn"/>
120 </xsl:apply-templates>
126 <xsl:call-template name="process.cmdsynopsis.list">
127 <xsl:with-param name="cmdsynopses" select="$cmdsynopses"/>
128 <xsl:with-param name="count" select="$count+1"/>
134 <xsl:template match="processing-instruction('dbcmdlist')">
135 <xsl:variable name="cmdsynopses" select="..//cmdsynopsis"/>
137 <xsl:if test="count($cmdsynopses)<1">
138 <xsl:message><xsl:text>No cmdsynopsis elements matched dbcmdlist PI, perhaps it's nested too deep?</xsl:text>
143 <xsl:call-template name="process.cmdsynopsis.list">
144 <xsl:with-param name="cmdsynopses" select="$cmdsynopses"/>
149 <!-- ==================================================================== -->
151 <xsl:template name="process.funcsynopsis.list">
152 <xsl:param name="funcsynopses"/><!-- empty node list by default -->
153 <xsl:param name="count" select="1"/>
156 <xsl:when test="$count>count($funcsynopses)"/>
158 <xsl:variable name="cmdsyn" select="$funcsynopses[$count]"/>
162 <xsl:attribute name="href">
163 <xsl:call-template name="object.id">
164 <xsl:with-param name="object" select="$cmdsyn"/>
169 <xsl:when test="$cmdsyn/@xreflabel">
170 <xsl:call-template name="xref.xreflabel">
171 <xsl:with-param name="target" select="$cmdsyn"/>
175 <xsl:apply-templates select="$cmdsyn" mode="xref-to">
176 <xsl:with-param name="target" select="$cmdsyn"/>
177 </xsl:apply-templates>
183 <xsl:call-template name="process.funcsynopsis.list">
184 <xsl:with-param name="funcsynopses" select="$funcsynopses"/>
185 <xsl:with-param name="count" select="$count+1"/>
191 <xsl:template match="processing-instruction('dbfunclist')">
192 <xsl:variable name="funcsynopses" select="..//funcsynopsis"/>
194 <xsl:if test="count($funcsynopses)<1">
195 <xsl:message><xsl:text>No funcsynopsis elements matched dbfunclist PI, perhaps it's nested too deep?</xsl:text>
200 <xsl:call-template name="process.funcsynopsis.list">
201 <xsl:with-param name="funcsynopses" select="$funcsynopses"/>
206 <!-- ==================================================================== -->