/usr/share/yelp-xsl/xslt/docbook/html/db2html-bibliography.xsl is in yelp-xsl 3.10.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 | <?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- -->
<!--
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option) any
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.
You should have received a copy of the GNU Lesser General Public License
along with this program; see the file COPYING.LGPL. If not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:db="http://docbook.org/ns/docbook"
xmlns:msg="http://projects.gnome.org/yelp/gettext/"
xmlns:set="http://exslt.org/sets"
xmlns="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="db msg set"
version="1.0">
<!--!!==========================================================================
DocBook to HTML - Bibliographies
:Revision:version="3.4" date="2011-11-14" status="final"
This module provides templates to process DocBook bibliograpies.
-->
<!--**==========================================================================
db2html.biblioentry.data
Output structured data for a bibliography entry.
:Revision:version="3.4" date="2011-11-14" status="final"
$node: The #{biblioentry} or #{biblioset} element to output data for.
This template outputs a bibliography entry, or part of a bibliography entry,
based on structured data found in a #{biblioentry} or #{biblioset} element.
-->
<xsl:template name="db2html.biblioentry.data">
<xsl:param name="node" select="."/>
<xsl:variable name="authors" select="$node/author | $node/authorgroup/author |
$node/db:author | $node/db:authorgroup/db:author"/>
<xsl:if test="$authors">
<xsl:call-template name="db.personname.list">
<xsl:with-param name="nodes" select="$authors"/>
</xsl:call-template>
<xsl:text>. </xsl:text>
</xsl:if>
<xsl:variable name="titles" select="$node/title | $node/citetitle |
$node/db:title | $node/db:citetitle"/>
<xsl:if test="$titles">
<xsl:apply-templates mode="db2html.biblioentry.mode" select="$titles[1]"/>
<xsl:if test="$node/volumenum or $node/db:volumenum">
<xsl:text>, </xsl:text>
<xsl:apply-templates mode="db2html.biblioentry.mode"
select="($node/volumenum | $node/db:volumenum)[1]"/>
</xsl:if>
<xsl:if test="$node/issuenum or $node/db:issuenum">
<xsl:text>, </xsl:text>
<xsl:apply-templates mode="db2html.biblioentry.mode"
select="($node/issuenum | $node/db:issuenum)[1]"/>
</xsl:if>
<xsl:if test="$node/pagenums or $node/db:pagenums">
<xsl:text>, </xsl:text>
<xsl:apply-templates mode="db2html.biblioentry.mode"
select="($node/pagenums | $node/db:pagenums)[1]"/>
</xsl:if>
<xsl:if test="$node/artpagenums or $node/db:artpagenums">
<xsl:text>, </xsl:text>
<xsl:apply-templates mode="db2html.biblioentry.mode"
select="($node/artpagenums | $node/db:artpagenums)[1]"/>
</xsl:if>
<xsl:text>. </xsl:text>
</xsl:if>
<xsl:variable name="publisher" select="$node/publisher | $node/publishername |
$node/db:publisher | $node/db:publishername"/>
<xsl:if test="$publisher">
<xsl:apply-templates mode="db2html.biblioentry.mode" select="$publisher[1]"/>
<xsl:text>. </xsl:text>
</xsl:if>
<xsl:if test="$node/copyright or $node/db:copyright">
<xsl:for-each select="$node/copyright | $node/db:copyright">
<xsl:apply-templates mode="db2html.biblioentry.mode" select="."/>
<xsl:if test="position() != 1">
<xsl:call-template name="l10n.gettext">
<xsl:with-param name="msgid" select="', '"/>
</xsl:call-template>
</xsl:if>
</xsl:for-each>
<xsl:text>. </xsl:text>
</xsl:if>
<xsl:for-each select="$node/isbn | $node/issn | $node/pubsnumber | $node/biblioid | $node/db:biblioid">
<xsl:apply-templates mode="db2html.biblioentry.mode" select="."/>
<xsl:text>. </xsl:text>
</xsl:for-each>
<xsl:for-each select="$node/date | $node/pubdate | $node/db:date | $node/db:pubdate">
<xsl:apply-templates mode="db2html.biblioentry.mode" select="."/>
<xsl:text>. </xsl:text>
</xsl:for-each>
<xsl:for-each select="$node/biblioset | $node/db:biblioset">
<xsl:call-template name="db2html.biblioentry.data"/>
</xsl:for-each>
</xsl:template>
<!--**==========================================================================
db2html.biblioentry.label
Output the label for a bibliography entry.
:Revision:version="3.4" date="2011-11-14" status="final"
$node: The #{biblioentry} or #{bibliomixed} element to generate a label for.
This template outputs a label to be placed inline at the beginning of a bibliography
entry. Labels are created for both #{biblioentry} and #{bibliomixed} elements.
The label is typically an abbreviation of the authors' names and the year of
publication. In DocBook, it is usually provided with a leading #{abbrev}
element. Without a leading #{abbrev} element, this template will instead
use the #{xreflabel} or #{id} attribute.
-->
<xsl:template name="db2html.biblioentry.label">
<xsl:param name="node" select="."/>
<xsl:if test="$node/*[1]/self::abbrev or $node/@xreflabel or $node/@id or
$node/*[1]/self::db:abbrev or $node/@xml:id">
<span class="bibliolabel">
<xsl:call-template name="l10n.gettext">
<xsl:with-param name="msgid" select="'biblioentry.label'"/>
<xsl:with-param name="node" select="."/>
<xsl:with-param name="format" select="true()"/>
</xsl:call-template>
</span>
<xsl:text> </xsl:text>
</xsl:if>
</xsl:template>
<!--#% l10n.format.mode % msg:biblioentry.label -->
<xsl:template mode="l10n.format.mode" match="msg:biblioentry.label">
<xsl:param name="node"/>
<xsl:choose>
<xsl:when test="$node/*[1]/self::abbrev">
<xsl:apply-templates select="$node/abbrev[1]"/>
</xsl:when>
<xsl:when test="$node/*[1]/self::db:abbrev">
<xsl:apply-templates select="$node/db:abbrev[1]"/>
</xsl:when>
<xsl:when test="$node/@xreflabel">
<xsl:value-of select="$node/@xreflabel"/>
</xsl:when>
<xsl:when test="$node/@id">
<xsl:value-of select="$node/@id"/>
</xsl:when>
<xsl:when test="$node/@xml:id">
<xsl:value-of select="$node/@xml:id"/>
</xsl:when>
</xsl:choose>
</xsl:template>
<!--%%==========================================================================
db2html.biblioentry.mode
Format elements inside a #{biblioentry} or #{bibliomixed} element.
:Revision:version="3.4" date="2011-11-14" status="final"
This mode is used when processing the child elements of a #{biblioentry} or a
#{bibliomixed} element. Some elements are treated differently when they appear
inside a bibliography entry.
-->
<xsl:template mode="db2html.biblioentry.mode" match="*">
<span>
<xsl:call-template name="html.class.attr">
<xsl:with-param name="class" select="local-name(.)"/>
</xsl:call-template>
<xsl:call-template name="html.lang.attrs"/>
<xsl:call-template name="db2html.anchor"/>
<xsl:apply-templates mode="db2html.biblioentry.mode"/>
</span>
</xsl:template>
<!-- = abstract % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="abstract | db:abstract"/>
<!-- = affiliation % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="affiliation | db:affiliation"/>
<!-- = author % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="author | db:author">
<xsl:call-template name="db.personname"/>
</xsl:template>
<!-- = authorblurb % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="authorblurb"/>
<!-- = authorgroup % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="authorgroup | db:authorgroup">
<xsl:call-template name="db.personname.list">
<xsl:with-param name="nodes" select="*"/>
</xsl:call-template>
</xsl:template>
<!-- = biblioset % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="biblioset | db:biblioset">
<xsl:call-template name="db2html.biblioentry.data"/>
</xsl:template>
<!-- = citerefentry % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="citerefentry | db:citerefentry">
<xsl:apply-templates select="."/>
</xsl:template>
<!-- = collab % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="collab | db:collab">
<xsl:apply-templates select="."/>
</xsl:template>
<!-- = copyright % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="copyright | db:copyright">
<xsl:call-template name="db.copyright"/>
</xsl:template>
<!-- = cover % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="db:cover"/>
<!-- = editor % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="editor | db:editor">
<xsl:call-template name="db.personname"/>
</xsl:template>
<!-- = footnote % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="footnote | footnoteref | db:footnote | db:footnoteref">
<xsl:apply-templates select="."/>
</xsl:template>
<!-- = glossterm % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="glossterm | db:glossterm">
<xsl:apply-templates select="."/>
</xsl:template>
<!-- = indexterm % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="indexterm | db:indexterm"/>
<!-- = legalnotice % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="legalnotice | db:legalnotice"/>
<!-- = mediaobject % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="mediaobject | db:mediaobject">
<xsl:apply-templates select="."/>
</xsl:template>
<!-- = org % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="db:org">
<xsl:call-template name="db.personname"/>
</xsl:template>
<!-- = othercredit % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="othercredit | db:othercredit">
<xsl:call-template name="db.personname"/>
</xsl:template>
<!-- = person % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="db:person">
<xsl:call-template name="db.personname"/>
</xsl:template>
<!-- = personname % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="personname | db:personname">
<xsl:call-template name="db.personname"/>
</xsl:template>
<!-- = personblurb % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="personblurb | db:personblurb"/>
<!-- = publisher % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="publisher | db:publisher">
<xsl:apply-templates mode="db2html.biblioentry.mode"
select="publishername | db:publishername"/>
</xsl:template>
<!-- = printhistory % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="printhistory | db:printhistory"/>
<!-- = subscript % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="subscript | db:subscript">
<xsl:apply-templates select="."/>
</xsl:template>
<!-- = superscript % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="superscript | db:superscript">
<xsl:apply-templates select="."/>
</xsl:template>
<!-- = revhistory % db2html.biblioentry.mode = -->
<xsl:template mode="db2html.biblioentry.mode" match="revhistory | db:revhistory"/>
<!-- == Matched Templates == -->
<!-- = bibliography = -->
<xsl:template match="bibliography | db:bibliography">
<xsl:param name="depth_in_chunk">
<xsl:call-template name="db.chunk.depth-in-chunk"/>
</xsl:param>
<xsl:param name="depth_of_chunk">
<xsl:call-template name="db.chunk.depth-of-chunk"/>
</xsl:param>
<xsl:call-template name="db2html.division.div">
<xsl:with-param name="info" select="bibliographyinfo | db:info"/>
<xsl:with-param name="divisions" select="bibliodiv | db:bibliodiv"/>
<xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
<xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
</xsl:call-template>
</xsl:template>
<!-- = bibliodiv = -->
<xsl:template match="bibliodiv | db:bibliodiv">
<xsl:param name="depth_in_chunk">
<xsl:call-template name="db.chunk.depth-in-chunk"/>
</xsl:param>
<xsl:param name="depth_of_chunk">
<xsl:call-template name="db.chunk.depth-of-chunk"/>
</xsl:param>
<xsl:call-template name="db2html.division.div">
<xsl:with-param name="info" select="db:info"/>
<xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
<xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
</xsl:call-template>
</xsl:template>
<!-- = biblioentry = -->
<xsl:template match="biblioentry | db:biblioentry">
<xsl:variable name="if"><xsl:call-template name="db.profile.test"/></xsl:variable>
<xsl:if test="$if != ''">
<div>
<xsl:call-template name="html.class.attr">
<xsl:with-param name="class" select="'biblioentry'"/>
</xsl:call-template>
<xsl:call-template name="html.lang.attrs"/>
<xsl:call-template name="db2html.anchor"/>
<xsl:call-template name="db2html.biblioentry.label"/>
<xsl:call-template name="db2html.biblioentry.data"/>
</div>
</xsl:if>
</xsl:template>
<!-- = bibliomixed = -->
<xsl:template match="bibliomixed | db:bibliomixed">
<xsl:variable name="node" select="."/>
<xsl:variable name="if"><xsl:call-template name="db.profile.test"/></xsl:variable>
<xsl:if test="$if != ''">
<div>
<xsl:call-template name="html.class.attr">
<xsl:with-param name="class" select="'biblimixed'"/>
</xsl:call-template>
<xsl:call-template name="html.lang.attrs"/>
<xsl:call-template name="db2html.anchor"/>
<xsl:call-template name="db2html.biblioentry.label"/>
<xsl:apply-templates mode="db2html.biblioentry.mode"
select="node()[not(set:has-same-node(., $node/*[1]/self::abbrev | $node/*[1]/self::db:abbrev))]"/>
</div>
</xsl:if>
</xsl:template>
<!-- = bibliolist = -->
<xsl:template match="bibliolist | db:bibliolist">
<xsl:call-template name="db2html.block.formal">
<xsl:with-param name="class" select="'list'"/>
</xsl:call-template>
</xsl:template>
</xsl:stylesheet>
|