| [12] | 1 | <?xml version="1.0" encoding="utf-8"?> | 
|---|
 | 2 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | 
|---|
 | 3 |                 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" | 
|---|
 | 4 |                 version="1.0"> | 
|---|
 | 5 |  | 
|---|
 | 6 |   <!-- Import the HTML chunking stylesheet --> | 
|---|
 | 7 |   <xsl:import | 
|---|
 | 8 |     href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/> | 
|---|
 | 9 |  | 
|---|
 | 10 |   <xsl:import href="chunk-common.xsl"/> | 
|---|
 | 11 |   <xsl:import href="docbook-layout.xsl"/> | 
|---|
 | 12 |   <xsl:import href="navbar.xsl"/> | 
|---|
 | 13 |   <xsl:import href="admon.xsl"/> | 
|---|
 | 14 |   <xsl:import href="xref.xsl"/> | 
|---|
 | 15 |   <xsl:import href="relative-href.xsl"/> | 
|---|
 | 16 |  | 
|---|
 | 17 |   <xsl:param name="html.stylesheet" select="'boostbook.css'"/> | 
|---|
 | 18 |   <xsl:param name="navig.graphics" select="1"/> | 
|---|
 | 19 |   <xsl:param name="navig.graphics.extension" select="'.png'"/> | 
|---|
 | 20 |   <xsl:param name="chapter.autolabel" select="1"/> | 
|---|
 | 21 |   <xsl:param name="use.id.as.filename" select="1"/> | 
|---|
 | 22 |   <xsl:param name="refentry.generate.name" select="0"/> | 
|---|
 | 23 |   <xsl:param name="refentry.generate.title" select="1"/> | 
|---|
 | 24 |   <xsl:param name="make.year.ranges" select="1"/> | 
|---|
 | 25 |   <xsl:param name="generate.manifest" select="1"/> | 
|---|
 | 26 |   <xsl:param name="generate.section.toc.level" select="3"/> | 
|---|
 | 27 |   <xsl:param name="doc.standalone">false</xsl:param> | 
|---|
 | 28 |   <xsl:param name="chunker.output.indent">yes</xsl:param> | 
|---|
 | 29 |   <xsl:param name="toc.max.depth">2</xsl:param> | 
|---|
 | 30 |  | 
|---|
 | 31 |   <xsl:param name="generate.toc"> | 
|---|
 | 32 | appendix  toc,title | 
|---|
 | 33 | article/appendix  nop | 
|---|
 | 34 | article   toc,title | 
|---|
 | 35 | book      toc,title | 
|---|
 | 36 | chapter   toc,title | 
|---|
 | 37 | part      toc,title | 
|---|
 | 38 | preface   toc,title | 
|---|
 | 39 | qandadiv  toc | 
|---|
 | 40 | qandaset  toc | 
|---|
 | 41 | reference toc,title | 
|---|
 | 42 | sect1     toc | 
|---|
 | 43 | sect2     toc | 
|---|
 | 44 | sect3     toc | 
|---|
 | 45 | sect4     toc | 
|---|
 | 46 | sect5     toc | 
|---|
 | 47 | section   toc | 
|---|
 | 48 | set       toc,title | 
|---|
 | 49 |   </xsl:param> | 
|---|
 | 50 |  | 
|---|
 | 51 |  | 
|---|
 | 52 |   <xsl:template name="format.cvs.revision"> | 
|---|
 | 53 |     <xsl:param name="text"/> | 
|---|
 | 54 |  | 
|---|
 | 55 |     <!-- Remove the "$Date: " --> | 
|---|
 | 56 |     <xsl:variable name="text.noprefix"  | 
|---|
 | 57 |       select="substring-after($text, '$Date: ')"/> | 
|---|
 | 58 |  | 
|---|
 | 59 |     <!-- Grab the year --> | 
|---|
 | 60 |     <xsl:variable name="year" select="substring-before($text.noprefix, '/')"/> | 
|---|
 | 61 |     <xsl:variable name="text.noyear"  | 
|---|
 | 62 |       select="substring-after($text.noprefix, '/')"/> | 
|---|
 | 63 |  | 
|---|
 | 64 |     <!-- Grab the month --> | 
|---|
 | 65 |     <xsl:variable name="month" select="substring-before($text.noyear, '/')"/> | 
|---|
 | 66 |     <xsl:variable name="text.nomonth"  | 
|---|
 | 67 |       select="substring-after($text.noyear, '/')"/> | 
|---|
 | 68 |  | 
|---|
 | 69 |     <!-- Grab the year --> | 
|---|
 | 70 |     <xsl:variable name="day" select="substring-before($text.nomonth, ' ')"/> | 
|---|
 | 71 |     <xsl:variable name="text.noday"  | 
|---|
 | 72 |       select="substring-after($text.nomonth, ' ')"/> | 
|---|
 | 73 |  | 
|---|
 | 74 |     <!-- Get the time --> | 
|---|
 | 75 |     <xsl:variable name="time" select="substring-before($text.noday, ' ')"/> | 
|---|
 | 76 |  | 
|---|
 | 77 |     <xsl:variable name="month.name"> | 
|---|
 | 78 |       <xsl:choose> | 
|---|
 | 79 |         <xsl:when test="$month=1">January</xsl:when> | 
|---|
 | 80 |         <xsl:when test="$month=2">February</xsl:when> | 
|---|
 | 81 |         <xsl:when test="$month=3">March</xsl:when> | 
|---|
 | 82 |         <xsl:when test="$month=4">April</xsl:when> | 
|---|
 | 83 |         <xsl:when test="$month=5">May</xsl:when> | 
|---|
 | 84 |         <xsl:when test="$month=6">June</xsl:when> | 
|---|
 | 85 |         <xsl:when test="$month=7">July</xsl:when> | 
|---|
 | 86 |         <xsl:when test="$month=8">August</xsl:when> | 
|---|
 | 87 |         <xsl:when test="$month=9">September</xsl:when> | 
|---|
 | 88 |         <xsl:when test="$month=10">October</xsl:when> | 
|---|
 | 89 |         <xsl:when test="$month=11">November</xsl:when> | 
|---|
 | 90 |         <xsl:when test="$month=12">December</xsl:when> | 
|---|
 | 91 |       </xsl:choose> | 
|---|
 | 92 |     </xsl:variable> | 
|---|
 | 93 |  | 
|---|
 | 94 |     <xsl:value-of select="concat($month.name, ' ', $day, ', ', $year, ' at ', | 
|---|
 | 95 |                                  $time, ' GMT')"/> | 
|---|
 | 96 |   </xsl:template> | 
|---|
 | 97 |  | 
|---|
 | 98 |   <xsl:template match="copyright" mode="boost.footer"> | 
|---|
 | 99 |     <xsl:if test="position() > 1"> | 
|---|
 | 100 |       <br/> | 
|---|
 | 101 |     </xsl:if> | 
|---|
 | 102 |     <xsl:call-template name="gentext"> | 
|---|
 | 103 |       <xsl:with-param name="key" select="'Copyright'"/> | 
|---|
 | 104 |     </xsl:call-template> | 
|---|
 | 105 |     <xsl:call-template name="gentext.space"/> | 
|---|
 | 106 |     <xsl:call-template name="dingbat"> | 
|---|
 | 107 |       <xsl:with-param name="dingbat">copyright</xsl:with-param> | 
|---|
 | 108 |     </xsl:call-template> | 
|---|
 | 109 |     <xsl:call-template name="gentext.space"/> | 
|---|
 | 110 |     <xsl:call-template name="copyright.years"> | 
|---|
 | 111 |       <xsl:with-param name="years" select="year"/> | 
|---|
 | 112 |       <xsl:with-param name="print.ranges" select="$make.year.ranges"/> | 
|---|
 | 113 |       <xsl:with-param name="single.year.ranges" | 
|---|
 | 114 |         select="$make.single.year.ranges"/> | 
|---|
 | 115 |     </xsl:call-template> | 
|---|
 | 116 |     <xsl:call-template name="gentext.space"/> | 
|---|
 | 117 |     <xsl:apply-templates select="holder" mode="titlepage.mode"/> | 
|---|
 | 118 |   </xsl:template> | 
|---|
 | 119 |  | 
|---|
 | 120 |   <xsl:template name="user.footer.content"> | 
|---|
 | 121 |     <table width="100%"> | 
|---|
 | 122 |       <tr> | 
|---|
 | 123 |         <td align="left"> | 
|---|
 | 124 |           <xsl:variable name="revision-nodes"  | 
|---|
 | 125 |             select="ancestor-or-self::* | 
|---|
 | 126 |                     [not (attribute::rev:last-revision='')]"/> | 
|---|
 | 127 |           <xsl:if test="count($revision-nodes) > 0"> | 
|---|
 | 128 |             <xsl:variable name="revision-node" | 
|---|
 | 129 |               select="$revision-nodes[last()]"/> | 
|---|
 | 130 |             <xsl:variable name="revision-text"> | 
|---|
 | 131 |               <xsl:value-of  | 
|---|
 | 132 |                 select="normalize-space($revision-node/attribute::rev:last-revision)"/> | 
|---|
 | 133 |             </xsl:variable> | 
|---|
 | 134 |             <xsl:if test="string-length($revision-text) > 0"> | 
|---|
 | 135 |               <small> | 
|---|
 | 136 |                 <p> | 
|---|
 | 137 |                   <xsl:text>Last revised: </xsl:text> | 
|---|
 | 138 |                   <xsl:call-template name="format.cvs.revision"> | 
|---|
 | 139 |                     <xsl:with-param name="text" select="$revision-text"/> | 
|---|
 | 140 |                   </xsl:call-template> | 
|---|
 | 141 |                 </p> | 
|---|
 | 142 |               </small> | 
|---|
 | 143 |             </xsl:if> | 
|---|
 | 144 |           </xsl:if> | 
|---|
 | 145 |         </td> | 
|---|
 | 146 |         <td align="right"> | 
|---|
 | 147 |           <small> | 
|---|
 | 148 |             <xsl:apply-templates select="ancestor::*/*/copyright"  | 
|---|
 | 149 |               mode="boost.footer"/> | 
|---|
 | 150 |           </small> | 
|---|
 | 151 |         </td> | 
|---|
 | 152 |       </tr> | 
|---|
 | 153 |     </table> | 
|---|
 | 154 |   </xsl:template> | 
|---|
 | 155 |  | 
|---|
 | 156 |   <xsl:template match="variablelist"> | 
|---|
 | 157 |     <xsl:choose> | 
|---|
 | 158 |       <xsl:when test="@spacing='boost'"> | 
|---|
 | 159 |         <p><xsl:apply-templates mode="boost.variablelist"/></p> | 
|---|
 | 160 |       </xsl:when> | 
|---|
 | 161 |       <xsl:otherwise> | 
|---|
 | 162 |         <xsl:apply-imports /> | 
|---|
 | 163 |       </xsl:otherwise> | 
|---|
 | 164 |     </xsl:choose> | 
|---|
 | 165 |   </xsl:template> | 
|---|
 | 166 |  | 
|---|
 | 167 |   <xsl:template match="varlistentry" mode="boost.variablelist"> | 
|---|
 | 168 |     <xsl:if test="position() > 1"> | 
|---|
 | 169 |       <br/> | 
|---|
 | 170 |     </xsl:if> | 
|---|
 | 171 |     <b><xsl:apply-templates select="term"/></b>: | 
|---|
 | 172 |  | 
|---|
 | 173 |     <xsl:choose> | 
|---|
 | 174 |       <xsl:when test="local-name(listitem/*[1])='simpara' or | 
|---|
 | 175 |                       local-name(listitem/*[1])='para'"> | 
|---|
 | 176 |         <xsl:apply-templates  | 
|---|
 | 177 |           select="listitem/*[1]/*|listitem/*[1]/text()"/> | 
|---|
 | 178 |         <xsl:apply-templates select="(listitem/*|listitem/text())[position() > 1]"/> | 
|---|
 | 179 |       </xsl:when> | 
|---|
 | 180 |       <xsl:otherwise> | 
|---|
 | 181 |         <xsl:apply-templates select="listitem/*|listitem/text()"/>         | 
|---|
 | 182 |       </xsl:otherwise> | 
|---|
 | 183 |     </xsl:choose> | 
|---|
 | 184 |   </xsl:template> | 
|---|
 | 185 |    | 
|---|
 | 186 |   <!-- We don't want refentry's to show up in the TOC because they | 
|---|
 | 187 |        will merely be redundant with the synopsis. --> | 
|---|
 | 188 |   <xsl:template match="refentry" mode="toc"/> | 
|---|
 | 189 |  | 
|---|
 | 190 |   <!-- override the behaviour of some DocBook elements for better | 
|---|
 | 191 |        rendering facilities --> | 
|---|
 | 192 |  | 
|---|
 | 193 |   <xsl:template match = "programlisting[ancestor::informaltable]"> | 
|---|
 | 194 |      <pre class = "table-{name(.)}"><xsl:apply-templates/></pre> | 
|---|
 | 195 |   </xsl:template> | 
|---|
 | 196 |  | 
|---|
 | 197 |   <xsl:template match = "refsynopsisdiv"> | 
|---|
 | 198 |      <h2 class = "{name(.)}-title">Synopsis</h2> | 
|---|
 | 199 |      <div class = "{name(.)}"> | 
|---|
 | 200 |         <xsl:apply-templates/> | 
|---|
 | 201 |      </div> | 
|---|
 | 202 |   </xsl:template> | 
|---|
 | 203 |  | 
|---|
 | 204 | <!-- ============================================================ --> | 
|---|
 | 205 |  | 
|---|
 | 206 | <xsl:template name="output.html.stylesheets"> | 
|---|
 | 207 |     <xsl:param name="stylesheets" select="''"/> | 
|---|
 | 208 |  | 
|---|
 | 209 |     <xsl:choose> | 
|---|
 | 210 |         <xsl:when test="contains($stylesheets, ' ')"> | 
|---|
 | 211 |             <link rel="stylesheet"> | 
|---|
 | 212 |                 <xsl:attribute name="href"> | 
|---|
 | 213 |                     <xsl:call-template name="href.target.relative"> | 
|---|
 | 214 |                         <xsl:with-param name="target" select="substring-before($stylesheets, ' ')"/> | 
|---|
 | 215 |                     </xsl:call-template> | 
|---|
 | 216 |                 </xsl:attribute> | 
|---|
 | 217 |                 <xsl:if test="$html.stylesheet.type != ''"> | 
|---|
 | 218 |                     <xsl:attribute name="type"> | 
|---|
 | 219 |                         <xsl:value-of select="$html.stylesheet.type"/> | 
|---|
 | 220 |                     </xsl:attribute> | 
|---|
 | 221 |                 </xsl:if> | 
|---|
 | 222 |             </link> | 
|---|
 | 223 |             <xsl:call-template name="output.html.stylesheets"> | 
|---|
 | 224 |                 <xsl:with-param name="stylesheets" select="substring-after($stylesheets, ' ')"/> | 
|---|
 | 225 |             </xsl:call-template> | 
|---|
 | 226 |         </xsl:when> | 
|---|
 | 227 |         <xsl:when test="$stylesheets != ''"> | 
|---|
 | 228 |             <link rel="stylesheet"> | 
|---|
 | 229 |                 <xsl:attribute name="href"> | 
|---|
 | 230 |                     <xsl:call-template name="href.target.relative"> | 
|---|
 | 231 |                         <xsl:with-param name="target" select="$stylesheets"/> | 
|---|
 | 232 |                     </xsl:call-template> | 
|---|
 | 233 |                 </xsl:attribute> | 
|---|
 | 234 |                 <xsl:if test="$html.stylesheet.type != ''"> | 
|---|
 | 235 |                     <xsl:attribute name="type"> | 
|---|
 | 236 |                         <xsl:value-of select="$html.stylesheet.type"/> | 
|---|
 | 237 |                     </xsl:attribute> | 
|---|
 | 238 |                 </xsl:if> | 
|---|
 | 239 |             </link> | 
|---|
 | 240 |         </xsl:when> | 
|---|
 | 241 |     </xsl:choose> | 
|---|
 | 242 | </xsl:template> | 
|---|
 | 243 |  | 
|---|
 | 244 | </xsl:stylesheet> | 
|---|