- Timestamp:
- 10/08/2013 08:03:29 PM (11 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 7.5, 7.6, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 58675ce
- Parents:
- 09a35dd
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
stylesheets/lfs-xsl/docbook-xsl-1.78.1/xhtml-1_1/formal.xsl
r09a35dd r15c7d39 5 5 6 6 <!-- ******************************************************************** 7 $Id $7 $Id: formal.xsl 9501 2012-07-16 00:14:50Z bobstayton $ 8 8 ******************************************************************** 9 9 … … 26 26 <xsl:variable name="content"> 27 27 <div class="{$class}"> 28 <xsl:call-template name="id.attribute"> 29 <xsl:with-param name="conditional" select="0"/> 30 </xsl:call-template> 28 31 <xsl:call-template name="anchor"> 29 32 <xsl:with-param name="conditional" select="0"/> … … 91 94 </xsl:param> 92 95 93 <p class="title"> 94 <b> 95 <xsl:copy-of select="$title"/> 96 </b> 97 </p> 96 97 <xsl:choose> 98 <xsl:when test="$make.clean.html != 0"> 99 <xsl:variable name="html.class" select="concat(local-name($object),'-title')"/> 100 <div class="{$html.class}"> 101 <xsl:copy-of select="$title"/> 102 </div> 103 </xsl:when> 104 <xsl:otherwise> 105 <p class="title"> 106 <strong xmlns:xslo="http://www.w3.org/1999/XSL/Transform"> 107 <xsl:copy-of select="$title"/> 108 </strong> 109 </p> 110 </xsl:otherwise> 111 </xsl:choose> 98 112 </xsl:template> 99 113 100 114 <xsl:template name="informal.object"> 101 <xsl:param name="class" select="local-name(.)"/> 115 <xsl:param name="class"> 116 <xsl:apply-templates select="." mode="class.value"/> 117 </xsl:param> 102 118 103 119 <xsl:variable name="content"> 104 120 <div class="{$class}"> 121 <xsl:call-template name="id.attribute"/> 105 122 <xsl:if test="$spacing.paras != 0"><p/></xsl:if> 106 123 <xsl:call-template name="anchor"/> … … 142 159 143 160 <xsl:choose> 144 <xsl:when test="title ">161 <xsl:when test="title or info/title"> 145 162 <xsl:call-template name="formal.object"> 146 163 <xsl:with-param name="placement" select="$placement"/> … … 182 199 <xsl:call-template name="calsTable"/> 183 200 </xsl:when> 184 <xsl:otherwise> 185 <xsl:copy> 186 <xsl:copy-of select="@*[not(local-name()='id')]"/> 187 <xsl:attribute name="id"> 188 <xsl:call-template name="object.id"/> 189 </xsl:attribute> 190 <xsl:call-template name="htmlTable"/> 191 </xsl:copy> 192 </xsl:otherwise> 193 </xsl:choose> 201 <xsl:when test="caption"> 202 <xsl:call-template name="htmlTable.with.caption"/> 203 </xsl:when> 204 <xsl:otherwise> 205 <!-- do not use xsl:copy because of XHTML's needs --> 206 <div> 207 <xsl:call-template name="generate.class.attribute"/> 208 <xsl:call-template name="id.attribute"/> 209 <xsl:call-template name="anchor"/> 210 <xsl:element name="table" namespace="http://www.w3.org/1999/xhtml"> 211 <xsl:apply-templates select="@*" mode="htmlTableAtt"/> 212 <xsl:call-template name="htmlTable"/> 213 </xsl:element> 214 </div> 215 </xsl:otherwise> 216 </xsl:choose> 217 </xsl:template> 218 219 <!-- Handle html markup table like formal.object --> 220 <xsl:template name="htmlTable.with.caption"> 221 <xsl:param name="class"> 222 <xsl:apply-templates select="." mode="class.value"/> 223 </xsl:param> 224 225 <xsl:variable name="param.placement" select="substring-after(normalize-space($formal.title.placement), concat(local-name(.), ' '))"/> 226 227 <xsl:variable name="placement"> 228 <xsl:choose> 229 <xsl:when test="contains($param.placement, ' ')"> 230 <xsl:value-of select="substring-before($param.placement, ' ')"/> 231 </xsl:when> 232 <xsl:when test="$param.placement = ''">before</xsl:when> 233 <xsl:otherwise> 234 <xsl:value-of select="$param.placement"/> 235 </xsl:otherwise> 236 </xsl:choose> 237 </xsl:variable> 238 239 <xsl:call-template name="id.warning"/> 240 241 <xsl:variable name="content"> 242 <div class="{$class}"> 243 <xsl:call-template name="id.attribute"> 244 <xsl:with-param name="conditional" select="0"/> 245 </xsl:call-template> 246 <xsl:call-template name="anchor"> 247 <xsl:with-param name="conditional" select="0"/> 248 </xsl:call-template> 249 250 <xsl:choose> 251 <xsl:when test="$placement = 'before'"> 252 253 <xsl:call-template name="formal.object.heading"/> 254 255 <div class="{$class}-contents"> 256 <xsl:apply-templates select="." mode="htmlTable"/> 257 </div> 258 259 <xsl:call-template name="table.longdesc"/> 260 261 <xsl:if test="$spacing.paras != 0"><p/></xsl:if> 262 </xsl:when> 263 <xsl:otherwise> 264 <xsl:if test="$spacing.paras != 0"><p/></xsl:if> 265 266 <div class="{$class}-contents"> 267 <xsl:apply-templates select="." mode="htmlTable"/> 268 </div> 269 270 <xsl:call-template name="table.longdesc"/> 271 272 <xsl:call-template name="formal.object.heading"/> 273 </xsl:otherwise> 274 </xsl:choose> 275 </div> 276 <xsl:if test="not($formal.object.break.after = '0')"> 277 <br class="{$class}-break"/> 278 </xsl:if> 279 </xsl:variable> 280 281 <xsl:variable name="floatstyle"> 282 <xsl:call-template name="floatstyle"/> 283 </xsl:variable> 284 285 <xsl:choose> 286 <xsl:when test="$floatstyle != ''"> 287 <xsl:call-template name="floater"> 288 <xsl:with-param name="class"><xsl:value-of select="$class"/>-float</xsl:with-param> 289 <xsl:with-param name="floatstyle" select="$floatstyle"/> 290 <xsl:with-param name="content" select="$content"/> 291 </xsl:call-template> 292 </xsl:when> 293 <xsl:otherwise> 294 <xsl:copy-of select="$content"/> 295 </xsl:otherwise> 296 </xsl:choose> 297 194 298 </xsl:template> 195 299 … … 215 319 <xsl:call-template name="formal.object"> 216 320 <xsl:with-param name="placement" select="$placement"/> 217 <xsl:with-param name="class">218 <xsl:choose>219 <xsl:when test="@tabstyle">220 <!-- hack, this will only ever occur on table, not example -->221 <xsl:value-of select="@tabstyle"/>222 </xsl:when>223 <xsl:otherwise>224 <xsl:value-of select="local-name(.)"/>225 </xsl:otherwise>226 </xsl:choose>227 </xsl:with-param>228 321 </xsl:call-template> 322 </xsl:template> 323 324 <xsl:template match="table|informaltable" mode="class.value"> 325 <xsl:choose> 326 <xsl:when test="@tabstyle"> 327 <xsl:value-of select="@tabstyle"/> 328 </xsl:when> 329 <xsl:otherwise> 330 <xsl:value-of select="local-name(.)"/> 331 </xsl:otherwise> 332 </xsl:choose> 229 333 </xsl:template> 230 334 … … 235 339 236 340 <xsl:apply-templates mode="htmlTable"/> 341 342 <xsl:if test=".//footnote|../title//footnote"> 343 <tbody class="footnotes"> 344 <tr> 345 <td colspan="50"> 346 <xsl:apply-templates select=".//footnote|../title//footnote" mode="table.footnote.mode"/> 347 </td> 348 </tr> 349 </tbody> 350 </xsl:if> 237 351 </xsl:template> 238 352 … … 300 414 <xsl:choose> 301 415 <xsl:when test="tgroup|mediaobject|graphic"> 302 <xsl:call-template name="informal.object"> 303 <xsl:with-param name="class"> 304 <xsl:choose> 305 <xsl:when test="@tabstyle"> 306 <xsl:value-of select="@tabstyle"/> 307 </xsl:when> 308 <xsl:otherwise> 309 <xsl:value-of select="local-name(.)"/> 310 </xsl:otherwise> 311 </xsl:choose> 312 </xsl:with-param> 313 </xsl:call-template> 314 </xsl:when> 315 <xsl:otherwise> 316 <table> 317 <xsl:copy-of select="@*"/> 318 <xsl:call-template name="htmlTable"/> 319 </table> 416 <xsl:call-template name="informal.object"/> 417 </xsl:when> 418 <xsl:otherwise> 419 <div> 420 <xsl:call-template name="generate.class.attribute"/> 421 <xsl:call-template name="id.attribute"/> 422 <xsl:call-template name="anchor"/> 423 <xsl:element name="table" namespace="http://www.w3.org/1999/xhtml"> 424 <xsl:apply-templates select="@*" mode="htmlTableAtt"/> 425 <xsl:call-template name="htmlTable"/> 426 </xsl:element> 427 </div> 320 428 </xsl:otherwise> 321 429 </xsl:choose>
Note:
See TracChangeset
for help on using the changeset viewer.