biblio.xsl 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176
  1. <?xml version='1.0'?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns:fo="http://www.w3.org/1999/XSL/Format"
  4. version='1.0'>
  5. <!-- ********************************************************************
  6. $Id: biblio.xsl 9330 2012-05-05 22:48:55Z bobstayton $
  7. ********************************************************************
  8. This file is part of the XSL DocBook Stylesheet distribution.
  9. See ../README or http://docbook.sf.net/release/xsl/current/ for
  10. copyright and other information.
  11. ******************************************************************** -->
  12. <!-- ==================================================================== -->
  13. <xsl:template match="bibliography">
  14. <xsl:variable name="id">
  15. <xsl:call-template name="object.id"/>
  16. </xsl:variable>
  17. <xsl:choose>
  18. <xsl:when test="not(parent::*) or parent::part or parent::book">
  19. <xsl:variable name="master-reference">
  20. <xsl:call-template name="select.pagemaster"/>
  21. </xsl:variable>
  22. <fo:page-sequence hyphenate="{$hyphenate}"
  23. master-reference="{$master-reference}">
  24. <xsl:attribute name="language">
  25. <xsl:call-template name="l10n.language"/>
  26. </xsl:attribute>
  27. <xsl:attribute name="format">
  28. <xsl:call-template name="page.number.format">
  29. <xsl:with-param name="master-reference" select="$master-reference"/>
  30. </xsl:call-template>
  31. </xsl:attribute>
  32. <xsl:attribute name="initial-page-number">
  33. <xsl:call-template name="initial.page.number">
  34. <xsl:with-param name="master-reference" select="$master-reference"/>
  35. </xsl:call-template>
  36. </xsl:attribute>
  37. <xsl:attribute name="force-page-count">
  38. <xsl:call-template name="force.page.count">
  39. <xsl:with-param name="master-reference" select="$master-reference"/>
  40. </xsl:call-template>
  41. </xsl:attribute>
  42. <xsl:attribute name="hyphenation-character">
  43. <xsl:call-template name="gentext">
  44. <xsl:with-param name="key" select="'hyphenation-character'"/>
  45. </xsl:call-template>
  46. </xsl:attribute>
  47. <xsl:attribute name="hyphenation-push-character-count">
  48. <xsl:call-template name="gentext">
  49. <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
  50. </xsl:call-template>
  51. </xsl:attribute>
  52. <xsl:attribute name="hyphenation-remain-character-count">
  53. <xsl:call-template name="gentext">
  54. <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
  55. </xsl:call-template>
  56. </xsl:attribute>
  57. <xsl:apply-templates select="." mode="running.head.mode">
  58. <xsl:with-param name="master-reference" select="$master-reference"/>
  59. </xsl:apply-templates>
  60. <xsl:apply-templates select="." mode="running.foot.mode">
  61. <xsl:with-param name="master-reference" select="$master-reference"/>
  62. </xsl:apply-templates>
  63. <fo:flow flow-name="xsl-region-body">
  64. <xsl:call-template name="set.flow.properties">
  65. <xsl:with-param name="element" select="local-name(.)"/>
  66. <xsl:with-param name="master-reference" select="$master-reference"/>
  67. </xsl:call-template>
  68. <fo:block id="{$id}">
  69. <xsl:call-template name="bibliography.titlepage"/>
  70. </fo:block>
  71. <xsl:apply-templates/>
  72. </fo:flow>
  73. </fo:page-sequence>
  74. </xsl:when>
  75. <xsl:otherwise>
  76. <fo:block id="{$id}"
  77. space-before.minimum="1em"
  78. space-before.optimum="1.5em"
  79. space-before.maximum="2em">
  80. <xsl:call-template name="bibliography.titlepage"/>
  81. </fo:block>
  82. <xsl:apply-templates/>
  83. </xsl:otherwise>
  84. </xsl:choose>
  85. </xsl:template>
  86. <xsl:template match="bibliography/bibliographyinfo"></xsl:template>
  87. <xsl:template match="bibliography/info"></xsl:template>
  88. <xsl:template match="bibliography/title"></xsl:template>
  89. <xsl:template match="bibliography/subtitle"></xsl:template>
  90. <xsl:template match="bibliography/titleabbrev"></xsl:template>
  91. <!-- ==================================================================== -->
  92. <xsl:template match="bibliodiv">
  93. <fo:block>
  94. <xsl:attribute name="id">
  95. <xsl:call-template name="object.id"/>
  96. </xsl:attribute>
  97. <xsl:call-template name="bibliodiv.titlepage"/>
  98. <xsl:apply-templates/>
  99. </fo:block>
  100. </xsl:template>
  101. <xsl:template match="bibliodiv/title"/>
  102. <xsl:template match="bibliodiv/subtitle"/>
  103. <xsl:template match="bibliodiv/titleabbrev"/>
  104. <!-- ==================================================================== -->
  105. <xsl:template match="bibliolist">
  106. <xsl:variable name="id">
  107. <xsl:call-template name="object.id"/>
  108. </xsl:variable>
  109. <fo:block id="{$id}"
  110. space-before.minimum="1em"
  111. space-before.optimum="1.5em"
  112. space-before.maximum="2em">
  113. <xsl:if test="blockinfo/title|info/title|title">
  114. <xsl:call-template name="formal.object.heading"/>
  115. </xsl:if>
  116. <xsl:apply-templates select="*[not(self::blockinfo)
  117. and not(self::info)
  118. and not(self::title)
  119. and not(self::titleabbrev)]"/>
  120. </fo:block>
  121. </xsl:template>
  122. <!-- ==================================================================== -->
  123. <xsl:template match="biblioentry">
  124. <xsl:param name="label">
  125. <xsl:call-template name="biblioentry.label"/>
  126. </xsl:param>
  127. <xsl:variable name="id">
  128. <xsl:call-template name="object.id"/>
  129. </xsl:variable>
  130. <xsl:choose>
  131. <xsl:when test="string(.) = ''">
  132. <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
  133. <xsl:variable name="entry" select="$bib/bibliography//
  134. *[@id=$id or @xml:id=$id][1]"/>
  135. <xsl:choose>
  136. <xsl:when test="$entry">
  137. <xsl:choose>
  138. <xsl:when test="$bibliography.numbered != 0">
  139. <xsl:apply-templates select="$entry">
  140. <xsl:with-param name="label" select="$label"/>
  141. </xsl:apply-templates>
  142. </xsl:when>
  143. <xsl:otherwise>
  144. <xsl:apply-templates select="$entry"/>
  145. </xsl:otherwise>
  146. </xsl:choose>
  147. </xsl:when>
  148. <xsl:otherwise>
  149. <xsl:message>
  150. <xsl:text>No bibliography entry: </xsl:text>
  151. <xsl:value-of select="$id"/>
  152. <xsl:text> found in </xsl:text>
  153. <xsl:value-of select="$bibliography.collection"/>
  154. </xsl:message>
  155. <fo:block id="{$id}" xsl:use-attribute-sets="normal.para.spacing">
  156. <xsl:text>Error: no bibliography entry: </xsl:text>
  157. <xsl:value-of select="$id"/>
  158. <xsl:text> found in </xsl:text>
  159. <xsl:value-of select="$bibliography.collection"/>
  160. </fo:block>
  161. </xsl:otherwise>
  162. </xsl:choose>
  163. </xsl:when>
  164. <xsl:otherwise>
  165. <fo:block id="{$id}" xsl:use-attribute-sets="biblioentry.properties">
  166. <xsl:copy-of select="$label"/>
  167. <xsl:choose>
  168. <xsl:when test="$bibliography.style = 'iso690'">
  169. <xsl:call-template name="iso690.makecitation"/>
  170. </xsl:when>
  171. <xsl:otherwise>
  172. <xsl:apply-templates mode="bibliography.mode"/>
  173. </xsl:otherwise>
  174. </xsl:choose>
  175. </fo:block>
  176. </xsl:otherwise>
  177. </xsl:choose>
  178. </xsl:template>
  179. <xsl:template match="bibliomixed">
  180. <xsl:param name="label">
  181. <xsl:call-template name="biblioentry.label"/>
  182. </xsl:param>
  183. <xsl:variable name="id">
  184. <xsl:call-template name="object.id"/>
  185. </xsl:variable>
  186. <xsl:choose>
  187. <xsl:when test="string(.) = ''">
  188. <xsl:variable name="bib" select="document($bibliography.collection,.)"/>
  189. <xsl:variable name="entry" select="$bib/bibliography//
  190. *[@id=$id or @xml:id=$id][1]"/>
  191. <xsl:choose>
  192. <xsl:when test="$entry">
  193. <xsl:choose>
  194. <xsl:when test="$bibliography.numbered != 0">
  195. <xsl:apply-templates select="$entry">
  196. <xsl:with-param name="label" select="$label"/>
  197. </xsl:apply-templates>
  198. </xsl:when>
  199. <xsl:otherwise>
  200. <xsl:apply-templates select="$entry"/>
  201. </xsl:otherwise>
  202. </xsl:choose>
  203. </xsl:when>
  204. <xsl:otherwise>
  205. <xsl:message>
  206. <xsl:text>No bibliography entry: </xsl:text>
  207. <xsl:value-of select="$id"/>
  208. <xsl:text> found in </xsl:text>
  209. <xsl:value-of select="$bibliography.collection"/>
  210. </xsl:message>
  211. <fo:block id="{$id}" xsl:use-attribute-sets="normal.para.spacing">
  212. <xsl:text>Error: no bibliography entry: </xsl:text>
  213. <xsl:value-of select="$id"/>
  214. <xsl:text> found in </xsl:text>
  215. <xsl:value-of select="$bibliography.collection"/>
  216. </fo:block>
  217. </xsl:otherwise>
  218. </xsl:choose>
  219. </xsl:when>
  220. <xsl:otherwise>
  221. <fo:block id="{$id}" xsl:use-attribute-sets="biblioentry.properties">
  222. <xsl:copy-of select="$label"/>
  223. <xsl:apply-templates mode="bibliomixed.mode"/>
  224. </fo:block>
  225. </xsl:otherwise>
  226. </xsl:choose>
  227. </xsl:template>
  228. <xsl:template name="biblioentry.label">
  229. <xsl:param name="node" select="."/>
  230. <xsl:choose>
  231. <xsl:when test="$bibliography.numbered != 0">
  232. <xsl:text>[</xsl:text>
  233. <xsl:number from="bibliography" count="biblioentry|bibliomixed"
  234. level="any" format="1"/>
  235. <xsl:text>] </xsl:text>
  236. </xsl:when>
  237. <xsl:when test="local-name($node/child::*[1]) = 'abbrev'">
  238. <xsl:text>[</xsl:text>
  239. <xsl:apply-templates select="$node/abbrev[1]"/>
  240. <xsl:text>] </xsl:text>
  241. </xsl:when>
  242. <xsl:when test="$node/@xreflabel">
  243. <xsl:text>[</xsl:text>
  244. <xsl:value-of select="$node/@xreflabel"/>
  245. <xsl:text>] </xsl:text>
  246. </xsl:when>
  247. <xsl:when test="$node/@id or $node/@xml:id">
  248. <xsl:text>[</xsl:text>
  249. <xsl:value-of select="($node/@id|$node/@xml:id)[1]"/>
  250. <xsl:text>] </xsl:text>
  251. </xsl:when>
  252. <xsl:otherwise><!-- nop --></xsl:otherwise>
  253. </xsl:choose>
  254. </xsl:template>
  255. <!-- ==================================================================== -->
  256. <xsl:template match="*" mode="bibliography.mode">
  257. <xsl:apply-templates select="."/><!-- try the default mode -->
  258. </xsl:template>
  259. <xsl:template match="abbrev" mode="bibliography.mode">
  260. <xsl:if test="preceding-sibling::*">
  261. <fo:inline>
  262. <xsl:apply-templates mode="bibliography.mode"/>
  263. </fo:inline>
  264. </xsl:if>
  265. </xsl:template>
  266. <xsl:template match="abstract" mode="bibliography.mode">
  267. <!-- suppressed -->
  268. </xsl:template>
  269. <xsl:template match="address" mode="bibliography.mode">
  270. <fo:inline>
  271. <xsl:apply-templates mode="bibliography.mode"/>
  272. <xsl:value-of select="$biblioentry.item.separator"/>
  273. </fo:inline>
  274. </xsl:template>
  275. <xsl:template match="affiliation" mode="bibliography.mode">
  276. <fo:inline>
  277. <xsl:apply-templates mode="bibliography.mode"/>
  278. <xsl:value-of select="$biblioentry.item.separator"/>
  279. </fo:inline>
  280. </xsl:template>
  281. <xsl:template match="shortaffil" mode="bibliography.mode">
  282. <fo:inline>
  283. <xsl:apply-templates mode="bibliography.mode"/>
  284. <xsl:value-of select="$biblioentry.item.separator"/>
  285. </fo:inline>
  286. </xsl:template>
  287. <xsl:template match="jobtitle" mode="bibliography.mode">
  288. <fo:inline>
  289. <xsl:apply-templates mode="bibliography.mode"/>
  290. <xsl:value-of select="$biblioentry.item.separator"/>
  291. </fo:inline>
  292. </xsl:template>
  293. <xsl:template match="artheader|articleinfo|article/info"
  294. mode="bibliography.mode">
  295. <fo:inline>
  296. <xsl:apply-templates mode="bibliography.mode"/>
  297. <xsl:value-of select="$biblioentry.item.separator"/>
  298. </fo:inline>
  299. </xsl:template>
  300. <xsl:template match="artpagenums" mode="bibliography.mode">
  301. <fo:inline>
  302. <xsl:apply-templates mode="bibliography.mode"/>
  303. <xsl:value-of select="$biblioentry.item.separator"/>
  304. </fo:inline>
  305. </xsl:template>
  306. <xsl:template match="author" mode="bibliography.mode">
  307. <fo:inline>
  308. <xsl:choose>
  309. <xsl:when test="orgname">
  310. <xsl:apply-templates select="orgname" mode="bibliography.mode"/>
  311. </xsl:when>
  312. <xsl:otherwise>
  313. <xsl:call-template name="person.name"/>
  314. <xsl:value-of select="$biblioentry.item.separator"/>
  315. </xsl:otherwise>
  316. </xsl:choose>
  317. </fo:inline>
  318. </xsl:template>
  319. <xsl:template match="authorblurb|personblurb" mode="bibliography.mode">
  320. <fo:inline>
  321. <xsl:apply-templates mode="bibliography.mode"/>
  322. <xsl:value-of select="$biblioentry.item.separator"/>
  323. </fo:inline>
  324. </xsl:template>
  325. <xsl:template match="authorgroup" mode="bibliography.mode">
  326. <fo:inline>
  327. <xsl:call-template name="person.name.list"/>
  328. <xsl:value-of select="$biblioentry.item.separator"/>
  329. </fo:inline>
  330. </xsl:template>
  331. <xsl:template match="authorinitials" mode="bibliography.mode">
  332. <fo:inline>
  333. <xsl:apply-templates mode="bibliography.mode"/>
  334. <xsl:value-of select="$biblioentry.item.separator"/>
  335. </fo:inline>
  336. </xsl:template>
  337. <xsl:template match="bibliomisc" mode="bibliography.mode">
  338. <fo:inline>
  339. <xsl:apply-templates mode="bibliography.mode"/>
  340. <xsl:value-of select="$biblioentry.item.separator"/>
  341. </fo:inline>
  342. </xsl:template>
  343. <xsl:template match="bibliomset" mode="bibliography.mode">
  344. <fo:inline>
  345. <xsl:apply-templates mode="bibliography.mode"/>
  346. <xsl:value-of select="$biblioentry.item.separator"/>
  347. </fo:inline>
  348. </xsl:template>
  349. <!-- ================================================== -->
  350. <xsl:template match="biblioset" mode="bibliography.mode">
  351. <fo:inline>
  352. <xsl:apply-templates mode="bibliography.mode"/>
  353. </fo:inline>
  354. </xsl:template>
  355. <xsl:template match="biblioset/title|biblioset/citetitle"
  356. mode="bibliography.mode">
  357. <xsl:variable name="relation" select="../@relation"/>
  358. <xsl:choose>
  359. <xsl:when test="$relation='article' or @pubwork='article'">
  360. <xsl:call-template name="gentext.startquote"/>
  361. <xsl:apply-templates mode="bibliography.mode"/>
  362. <xsl:call-template name="gentext.endquote"/>
  363. </xsl:when>
  364. <xsl:otherwise>
  365. <fo:inline font-style="italic">
  366. <xsl:apply-templates/>
  367. </fo:inline>
  368. </xsl:otherwise>
  369. </xsl:choose>
  370. <xsl:value-of select="$biblioentry.item.separator"/>
  371. </xsl:template>
  372. <!-- ================================================== -->
  373. <xsl:template match="citetitle" mode="bibliography.mode">
  374. <fo:inline>
  375. <xsl:choose>
  376. <xsl:when test="@pubwork = 'article'">
  377. <xsl:call-template name="gentext.startquote"/>
  378. <xsl:apply-templates mode="bibliography.mode"/>
  379. <xsl:call-template name="gentext.endquote"/>
  380. </xsl:when>
  381. <xsl:otherwise>
  382. <fo:inline font-style="italic">
  383. <xsl:apply-templates mode="bibliography.mode"/>
  384. </fo:inline>
  385. </xsl:otherwise>
  386. </xsl:choose>
  387. <xsl:value-of select="$biblioentry.item.separator"/>
  388. </fo:inline>
  389. </xsl:template>
  390. <xsl:template match="collab" mode="bibliography.mode">
  391. <fo:inline>
  392. <xsl:apply-templates mode="bibliography.mode"/>
  393. <xsl:value-of select="$biblioentry.item.separator"/>
  394. </fo:inline>
  395. </xsl:template>
  396. <xsl:template match="confgroup" mode="bibliography.mode">
  397. <fo:inline>
  398. <xsl:apply-templates mode="bibliography.mode"/>
  399. <xsl:value-of select="$biblioentry.item.separator"/>
  400. </fo:inline>
  401. </xsl:template>
  402. <xsl:template match="contractnum" mode="bibliography.mode">
  403. <fo:inline>
  404. <xsl:apply-templates mode="bibliography.mode"/>
  405. <xsl:value-of select="$biblioentry.item.separator"/>
  406. </fo:inline>
  407. </xsl:template>
  408. <xsl:template match="contractsponsor" mode="bibliography.mode">
  409. <fo:inline>
  410. <xsl:apply-templates mode="bibliography.mode"/>
  411. <xsl:value-of select="$biblioentry.item.separator"/>
  412. </fo:inline>
  413. </xsl:template>
  414. <xsl:template match="contrib" mode="bibliography.mode">
  415. <fo:inline>
  416. <xsl:apply-templates mode="bibliography.mode"/>
  417. <xsl:value-of select="$biblioentry.item.separator"/>
  418. </fo:inline>
  419. </xsl:template>
  420. <!-- ================================================== -->
  421. <xsl:template match="copyright" mode="bibliography.mode">
  422. <fo:inline>
  423. <xsl:call-template name="gentext">
  424. <xsl:with-param name="key" select="'Copyright'"/>
  425. </xsl:call-template>
  426. <xsl:call-template name="gentext.space"/>
  427. <xsl:call-template name="dingbat">
  428. <xsl:with-param name="dingbat">copyright</xsl:with-param>
  429. </xsl:call-template>
  430. <xsl:call-template name="gentext.space"/>
  431. <xsl:apply-templates select="year" mode="bibliography.mode"/>
  432. <xsl:if test="holder">
  433. <xsl:call-template name="gentext.space"/>
  434. <xsl:apply-templates select="holder" mode="bibliography.mode"/>
  435. </xsl:if>
  436. <xsl:value-of select="$biblioentry.item.separator"/>
  437. </fo:inline>
  438. </xsl:template>
  439. <xsl:template match="year" mode="bibliography.mode">
  440. <xsl:apply-templates/><xsl:text>, </xsl:text>
  441. </xsl:template>
  442. <xsl:template match="year[position()=last()]" mode="bibliography.mode">
  443. <xsl:apply-templates/>
  444. </xsl:template>
  445. <xsl:template match="holder" mode="bibliography.mode">
  446. <xsl:apply-templates/>
  447. </xsl:template>
  448. <!-- ================================================== -->
  449. <xsl:template match="corpauthor" mode="bibliography.mode">
  450. <fo:inline>
  451. <xsl:apply-templates mode="bibliography.mode"/>
  452. <xsl:value-of select="$biblioentry.item.separator"/>
  453. </fo:inline>
  454. </xsl:template>
  455. <xsl:template match="corpcredit" mode="bibliography.mode">
  456. <fo:inline>
  457. <xsl:apply-templates mode="bibliography.mode"/>
  458. <xsl:value-of select="$biblioentry.item.separator"/>
  459. </fo:inline>
  460. </xsl:template>
  461. <xsl:template match="corpname" mode="bibliography.mode">
  462. <fo:inline>
  463. <xsl:apply-templates mode="bibliography.mode"/>
  464. <xsl:value-of select="$biblioentry.item.separator"/>
  465. </fo:inline>
  466. </xsl:template>
  467. <xsl:template match="date" mode="bibliography.mode">
  468. <fo:inline>
  469. <xsl:apply-templates mode="bibliography.mode"/>
  470. <xsl:value-of select="$biblioentry.item.separator"/>
  471. </fo:inline>
  472. </xsl:template>
  473. <xsl:template match="edition" mode="bibliography.mode">
  474. <fo:inline>
  475. <xsl:apply-templates mode="bibliography.mode"/>
  476. <xsl:value-of select="$biblioentry.item.separator"/>
  477. </fo:inline>
  478. </xsl:template>
  479. <xsl:template match="editor" mode="bibliography.mode">
  480. <fo:inline>
  481. <xsl:call-template name="person.name"/>
  482. <xsl:value-of select="$biblioentry.item.separator"/>
  483. </fo:inline>
  484. </xsl:template>
  485. <xsl:template match="firstname" mode="bibliography.mode">
  486. <fo:inline>
  487. <xsl:apply-templates mode="bibliography.mode"/>
  488. <xsl:value-of select="$biblioentry.item.separator"/>
  489. </fo:inline>
  490. </xsl:template>
  491. <xsl:template match="honorific" mode="bibliography.mode">
  492. <fo:inline>
  493. <xsl:apply-templates mode="bibliography.mode"/>
  494. <xsl:value-of select="$biblioentry.item.separator"/>
  495. </fo:inline>
  496. </xsl:template>
  497. <xsl:template match="indexterm" mode="bibliography.mode">
  498. <xsl:apply-templates select="."/>
  499. </xsl:template>
  500. <xsl:template match="invpartnumber" mode="bibliography.mode">
  501. <fo:inline>
  502. <xsl:apply-templates mode="bibliography.mode"/>
  503. <xsl:value-of select="$biblioentry.item.separator"/>
  504. </fo:inline>
  505. </xsl:template>
  506. <xsl:template match="isbn" mode="bibliography.mode">
  507. <fo:inline>
  508. <xsl:apply-templates mode="bibliography.mode"/>
  509. <xsl:value-of select="$biblioentry.item.separator"/>
  510. </fo:inline>
  511. </xsl:template>
  512. <xsl:template match="issn" mode="bibliography.mode">
  513. <fo:inline>
  514. <xsl:apply-templates mode="bibliography.mode"/>
  515. <xsl:value-of select="$biblioentry.item.separator"/>
  516. </fo:inline>
  517. </xsl:template>
  518. <xsl:template match="issuenum" mode="bibliography.mode">
  519. <fo:inline>
  520. <xsl:apply-templates mode="bibliography.mode"/>
  521. <xsl:value-of select="$biblioentry.item.separator"/>
  522. </fo:inline>
  523. </xsl:template>
  524. <xsl:template match="lineage" mode="bibliography.mode">
  525. <fo:inline>
  526. <xsl:apply-templates mode="bibliography.mode"/>
  527. <xsl:value-of select="$biblioentry.item.separator"/>
  528. </fo:inline>
  529. </xsl:template>
  530. <xsl:template match="orgname" mode="bibliography.mode">
  531. <fo:inline>
  532. <xsl:apply-templates mode="bibliography.mode"/>
  533. <xsl:value-of select="$biblioentry.item.separator"/>
  534. </fo:inline>
  535. </xsl:template>
  536. <xsl:template match="othercredit" mode="bibliography.mode">
  537. <fo:inline>
  538. <xsl:apply-templates mode="bibliography.mode"/>
  539. <xsl:value-of select="$biblioentry.item.separator"/>
  540. </fo:inline>
  541. </xsl:template>
  542. <xsl:template match="othername" mode="bibliography.mode">
  543. <fo:inline>
  544. <xsl:apply-templates mode="bibliography.mode"/>
  545. <xsl:value-of select="$biblioentry.item.separator"/>
  546. </fo:inline>
  547. </xsl:template>
  548. <xsl:template match="pagenums" mode="bibliography.mode">
  549. <fo:inline>
  550. <xsl:apply-templates mode="bibliography.mode"/>
  551. <xsl:value-of select="$biblioentry.item.separator"/>
  552. </fo:inline>
  553. </xsl:template>
  554. <xsl:template match="printhistory" mode="bibliography.mode">
  555. <fo:inline>
  556. <xsl:apply-templates mode="bibliography.mode"/>
  557. <xsl:value-of select="$biblioentry.item.separator"/>
  558. </fo:inline>
  559. </xsl:template>
  560. <xsl:template match="productname" mode="bibliography.mode">
  561. <fo:inline>
  562. <xsl:apply-templates mode="bibliography.mode"/>
  563. <xsl:value-of select="$biblioentry.item.separator"/>
  564. </fo:inline>
  565. </xsl:template>
  566. <xsl:template match="productnumber" mode="bibliography.mode">
  567. <fo:inline>
  568. <xsl:apply-templates mode="bibliography.mode"/>
  569. <xsl:value-of select="$biblioentry.item.separator"/>
  570. </fo:inline>
  571. </xsl:template>
  572. <xsl:template match="pubdate" mode="bibliography.mode">
  573. <fo:inline>
  574. <xsl:apply-templates mode="bibliography.mode"/>
  575. <xsl:value-of select="$biblioentry.item.separator"/>
  576. </fo:inline>
  577. </xsl:template>
  578. <xsl:template match="publisher" mode="bibliography.mode">
  579. <fo:inline>
  580. <xsl:apply-templates mode="bibliography.mode"/>
  581. </fo:inline>
  582. </xsl:template>
  583. <xsl:template match="publishername" mode="bibliography.mode">
  584. <fo:inline>
  585. <xsl:apply-templates mode="bibliography.mode"/>
  586. <xsl:value-of select="$biblioentry.item.separator"/>
  587. </fo:inline>
  588. </xsl:template>
  589. <xsl:template match="pubsnumber" mode="bibliography.mode">
  590. <fo:inline>
  591. <xsl:apply-templates mode="bibliography.mode"/>
  592. <xsl:value-of select="$biblioentry.item.separator"/>
  593. </fo:inline>
  594. </xsl:template>
  595. <xsl:template match="releaseinfo" mode="bibliography.mode">
  596. <fo:inline>
  597. <xsl:apply-templates mode="bibliography.mode"/>
  598. <xsl:value-of select="$biblioentry.item.separator"/>
  599. </fo:inline>
  600. </xsl:template>
  601. <xsl:template match="revhistory" mode="bibliography.mode">
  602. <fo:block>
  603. <xsl:apply-templates select="."/> <!-- use normal mode -->
  604. </fo:block>
  605. </xsl:template>
  606. <xsl:template match="seriesinfo" mode="bibliography.mode">
  607. <fo:inline>
  608. <xsl:apply-templates mode="bibliography.mode"/>
  609. </fo:inline>
  610. </xsl:template>
  611. <xsl:template match="seriesvolnums" mode="bibliography.mode">
  612. <fo:inline>
  613. <xsl:apply-templates mode="bibliography.mode"/>
  614. <xsl:value-of select="$biblioentry.item.separator"/>
  615. </fo:inline>
  616. </xsl:template>
  617. <xsl:template match="subtitle" mode="bibliography.mode">
  618. <fo:inline>
  619. <xsl:apply-templates mode="bibliography.mode"/>
  620. <xsl:value-of select="$biblioentry.item.separator"/>
  621. </fo:inline>
  622. </xsl:template>
  623. <xsl:template match="surname" mode="bibliography.mode">
  624. <fo:inline>
  625. <xsl:apply-templates mode="bibliography.mode"/>
  626. <xsl:value-of select="$biblioentry.item.separator"/>
  627. </fo:inline>
  628. </xsl:template>
  629. <xsl:template match="title" mode="bibliography.mode">
  630. <fo:inline>
  631. <fo:inline font-style="italic">
  632. <xsl:apply-templates mode="bibliography.mode"/>
  633. </fo:inline>
  634. <xsl:value-of select="$biblioentry.item.separator"/>
  635. </fo:inline>
  636. </xsl:template>
  637. <xsl:template match="titleabbrev" mode="bibliography.mode">
  638. <fo:inline>
  639. <xsl:apply-templates mode="bibliography.mode"/>
  640. <xsl:value-of select="$biblioentry.item.separator"/>
  641. </fo:inline>
  642. </xsl:template>
  643. <xsl:template match="volumenum" mode="bibliography.mode">
  644. <fo:inline>
  645. <xsl:apply-templates mode="bibliography.mode"/>
  646. <xsl:value-of select="$biblioentry.item.separator"/>
  647. </fo:inline>
  648. </xsl:template>
  649. <xsl:template match="orgdiv" mode="bibliography.mode">
  650. <fo:inline>
  651. <xsl:apply-templates mode="bibliography.mode"/>
  652. <xsl:value-of select="$biblioentry.item.separator"/>
  653. </fo:inline>
  654. </xsl:template>
  655. <xsl:template match="collabname" mode="bibliography.mode">
  656. <fo:inline>
  657. <xsl:apply-templates mode="bibliography.mode"/>
  658. <xsl:value-of select="$biblioentry.item.separator"/>
  659. </fo:inline>
  660. </xsl:template>
  661. <xsl:template match="confdates" mode="bibliography.mode">
  662. <fo:inline>
  663. <xsl:apply-templates mode="bibliography.mode"/>
  664. <xsl:value-of select="$biblioentry.item.separator"/>
  665. </fo:inline>
  666. </xsl:template>
  667. <xsl:template match="conftitle" mode="bibliography.mode">
  668. <fo:inline>
  669. <xsl:apply-templates mode="bibliography.mode"/>
  670. <xsl:value-of select="$biblioentry.item.separator"/>
  671. </fo:inline>
  672. </xsl:template>
  673. <xsl:template match="confnum" mode="bibliography.mode">
  674. <fo:inline>
  675. <xsl:apply-templates mode="bibliography.mode"/>
  676. <xsl:value-of select="$biblioentry.item.separator"/>
  677. </fo:inline>
  678. </xsl:template>
  679. <xsl:template match="confsponsor" mode="bibliography.mode">
  680. <fo:inline>
  681. <xsl:apply-templates mode="bibliography.mode"/>
  682. <xsl:value-of select="$biblioentry.item.separator"/>
  683. </fo:inline>
  684. </xsl:template>
  685. <xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource"
  686. mode="bibliography.mode">
  687. <fo:inline>
  688. <xsl:apply-templates mode="bibliography.mode"/>
  689. <xsl:value-of select="$biblioentry.item.separator"/>
  690. </fo:inline>
  691. </xsl:template>
  692. <!-- ==================================================================== -->
  693. <xsl:template match="*" mode="bibliomixed.mode">
  694. <xsl:apply-templates select="."/><!-- try the default mode -->
  695. </xsl:template>
  696. <xsl:template match="abbrev" mode="bibliomixed.mode">
  697. <xsl:if test="preceding-sibling::*">
  698. <fo:inline>
  699. <xsl:apply-templates mode="bibliomixed.mode"/>
  700. </fo:inline>
  701. </xsl:if>
  702. </xsl:template>
  703. <xsl:template match="abstract" mode="bibliomixed.mode">
  704. <fo:block start-indent="1in">
  705. <xsl:apply-templates mode="bibliomixed.mode"/>
  706. </fo:block>
  707. </xsl:template>
  708. <xsl:template match="para" mode="bibliomixed.mode">
  709. <fo:block>
  710. <xsl:apply-templates mode="bibliomixed.mode"/>
  711. </fo:block>
  712. </xsl:template>
  713. <xsl:template match="address" mode="bibliomixed.mode">
  714. <fo:inline>
  715. <xsl:apply-templates mode="bibliomixed.mode"/>
  716. </fo:inline>
  717. </xsl:template>
  718. <xsl:template match="affiliation" mode="bibliomixed.mode">
  719. <fo:inline>
  720. <xsl:apply-templates mode="bibliomixed.mode"/>
  721. </fo:inline>
  722. </xsl:template>
  723. <xsl:template match="shortaffil" mode="bibliomixed.mode">
  724. <fo:inline>
  725. <xsl:apply-templates mode="bibliography.mode"/>
  726. </fo:inline>
  727. </xsl:template>
  728. <xsl:template match="jobtitle" mode="bibliomixed.mode">
  729. <fo:inline>
  730. <xsl:apply-templates mode="bibliography.mode"/>
  731. </fo:inline>
  732. </xsl:template>
  733. <xsl:template match="artpagenums" mode="bibliomixed.mode">
  734. <fo:inline>
  735. <xsl:apply-templates mode="bibliomixed.mode"/>
  736. </fo:inline>
  737. </xsl:template>
  738. <xsl:template match="author" mode="bibliomixed.mode">
  739. <fo:inline>
  740. <xsl:choose>
  741. <xsl:when test="orgname">
  742. <xsl:apply-templates select="orgname" mode="bibliomixed.mode"/>
  743. </xsl:when>
  744. <xsl:otherwise>
  745. <xsl:call-template name="person.name"/>
  746. </xsl:otherwise>
  747. </xsl:choose>
  748. </fo:inline>
  749. </xsl:template>
  750. <xsl:template match="authorblurb|personblurb" mode="bibliomixed.mode">
  751. <fo:inline>
  752. <xsl:apply-templates mode="bibliomixed.mode"/>
  753. </fo:inline>
  754. </xsl:template>
  755. <xsl:template match="authorgroup" mode="bibliomixed.mode">
  756. <fo:inline>
  757. <xsl:apply-templates mode="bibliomixed.mode"/>
  758. </fo:inline>
  759. </xsl:template>
  760. <xsl:template match="authorinitials" mode="bibliomixed.mode">
  761. <fo:inline>
  762. <xsl:apply-templates mode="bibliomixed.mode"/>
  763. </fo:inline>
  764. </xsl:template>
  765. <xsl:template match="bibliomisc" mode="bibliomixed.mode">
  766. <fo:inline>
  767. <xsl:apply-templates mode="bibliomixed.mode"/>
  768. </fo:inline>
  769. </xsl:template>
  770. <!-- ================================================== -->
  771. <xsl:template match="bibliomset" mode="bibliomixed.mode">
  772. <fo:inline>
  773. <xsl:apply-templates mode="bibliomixed.mode"/>
  774. </fo:inline>
  775. </xsl:template>
  776. <xsl:template match="bibliomset/title|bibliomset/citetitle"
  777. mode="bibliomixed.mode">
  778. <xsl:variable name="relation" select="../@relation"/>
  779. <xsl:choose>
  780. <xsl:when test="$relation='article' or @pubwork='article'">
  781. <xsl:call-template name="gentext.startquote"/>
  782. <xsl:apply-templates mode="bibliomixed.mode"/>
  783. <xsl:call-template name="gentext.endquote"/>
  784. </xsl:when>
  785. <xsl:otherwise>
  786. <fo:inline font-style="italic">
  787. <xsl:apply-templates/>
  788. </fo:inline>
  789. </xsl:otherwise>
  790. </xsl:choose>
  791. </xsl:template>
  792. <!-- ================================================== -->
  793. <xsl:template match="biblioset" mode="bibliomixed.mode">
  794. <fo:inline>
  795. <xsl:apply-templates mode="bibliomixed.mode"/>
  796. </fo:inline>
  797. </xsl:template>
  798. <xsl:template match="citetitle" mode="bibliomixed.mode">
  799. <xsl:choose>
  800. <xsl:when test="@pubwork = 'article'">
  801. <xsl:call-template name="gentext.startquote"/>
  802. <xsl:apply-templates mode="bibliomixed.mode"/>
  803. <xsl:call-template name="gentext.endquote"/>
  804. </xsl:when>
  805. <xsl:otherwise>
  806. <fo:inline font-style="italic">
  807. <xsl:apply-templates mode="bibliography.mode"/>
  808. </fo:inline>
  809. </xsl:otherwise>
  810. </xsl:choose>
  811. </xsl:template>
  812. <xsl:template match="collab" mode="bibliomixed.mode">
  813. <fo:inline>
  814. <xsl:apply-templates mode="bibliomixed.mode"/>
  815. </fo:inline>
  816. </xsl:template>
  817. <xsl:template match="confgroup" mode="bibliomixed.mode">
  818. <fo:inline>
  819. <xsl:apply-templates mode="bibliomixed.mode"/>
  820. </fo:inline>
  821. </xsl:template>
  822. <xsl:template match="contractnum" mode="bibliomixed.mode">
  823. <fo:inline>
  824. <xsl:apply-templates mode="bibliomixed.mode"/>
  825. </fo:inline>
  826. </xsl:template>
  827. <xsl:template match="contractsponsor" mode="bibliomixed.mode">
  828. <fo:inline>
  829. <xsl:apply-templates mode="bibliomixed.mode"/>
  830. </fo:inline>
  831. </xsl:template>
  832. <xsl:template match="contrib" mode="bibliomixed.mode">
  833. <fo:inline>
  834. <xsl:apply-templates mode="bibliomixed.mode"/>
  835. </fo:inline>
  836. </xsl:template>
  837. <xsl:template match="copyright" mode="bibliomixed.mode">
  838. <fo:inline>
  839. <xsl:apply-templates mode="bibliomixed.mode"/>
  840. </fo:inline>
  841. </xsl:template>
  842. <xsl:template match="corpauthor" mode="bibliomixed.mode">
  843. <fo:inline>
  844. <xsl:apply-templates mode="bibliomixed.mode"/>
  845. </fo:inline>
  846. </xsl:template>
  847. <xsl:template match="corpcredit" mode="bibliomixed.mode">
  848. <fo:inline>
  849. <xsl:apply-templates mode="bibliomixed.mode"/>
  850. </fo:inline>
  851. </xsl:template>
  852. <xsl:template match="corpname" mode="bibliomixed.mode">
  853. <fo:inline>
  854. <xsl:apply-templates mode="bibliomixed.mode"/>
  855. </fo:inline>
  856. </xsl:template>
  857. <xsl:template match="date" mode="bibliomixed.mode">
  858. <fo:inline>
  859. <xsl:apply-templates mode="bibliomixed.mode"/>
  860. </fo:inline>
  861. </xsl:template>
  862. <xsl:template match="edition" mode="bibliomixed.mode">
  863. <fo:inline>
  864. <xsl:apply-templates mode="bibliomixed.mode"/>
  865. </fo:inline>
  866. </xsl:template>
  867. <xsl:template match="editor" mode="bibliomixed.mode">
  868. <fo:inline>
  869. <xsl:apply-templates mode="bibliomixed.mode"/>
  870. </fo:inline>
  871. </xsl:template>
  872. <xsl:template match="firstname" mode="bibliomixed.mode">
  873. <fo:inline>
  874. <xsl:apply-templates mode="bibliomixed.mode"/>
  875. </fo:inline>
  876. </xsl:template>
  877. <xsl:template match="honorific" mode="bibliomixed.mode">
  878. <fo:inline>
  879. <xsl:apply-templates mode="bibliomixed.mode"/>
  880. </fo:inline>
  881. </xsl:template>
  882. <xsl:template match="indexterm" mode="bibliomixed.mode">
  883. <xsl:apply-templates select="."/>
  884. </xsl:template>
  885. <xsl:template match="invpartnumber" mode="bibliomixed.mode">
  886. <fo:inline>
  887. <xsl:apply-templates mode="bibliomixed.mode"/>
  888. </fo:inline>
  889. </xsl:template>
  890. <xsl:template match="isbn" mode="bibliomixed.mode">
  891. <fo:inline>
  892. <xsl:apply-templates mode="bibliomixed.mode"/>
  893. </fo:inline>
  894. </xsl:template>
  895. <xsl:template match="issn" mode="bibliomixed.mode">
  896. <fo:inline>
  897. <xsl:apply-templates mode="bibliomixed.mode"/>
  898. </fo:inline>
  899. </xsl:template>
  900. <xsl:template match="issuenum" mode="bibliomixed.mode">
  901. <fo:inline>
  902. <xsl:apply-templates mode="bibliomixed.mode"/>
  903. </fo:inline>
  904. </xsl:template>
  905. <xsl:template match="lineage" mode="bibliomixed.mode">
  906. <fo:inline>
  907. <xsl:apply-templates mode="bibliomixed.mode"/>
  908. </fo:inline>
  909. </xsl:template>
  910. <xsl:template match="orgname" mode="bibliomixed.mode">
  911. <fo:inline>
  912. <xsl:apply-templates mode="bibliomixed.mode"/>
  913. </fo:inline>
  914. </xsl:template>
  915. <xsl:template match="othercredit" mode="bibliomixed.mode">
  916. <fo:inline>
  917. <xsl:apply-templates mode="bibliomixed.mode"/>
  918. </fo:inline>
  919. </xsl:template>
  920. <xsl:template match="othername" mode="bibliomixed.mode">
  921. <fo:inline>
  922. <xsl:apply-templates mode="bibliomixed.mode"/>
  923. </fo:inline>
  924. </xsl:template>
  925. <xsl:template match="pagenums" mode="bibliomixed.mode">
  926. <fo:inline>
  927. <xsl:apply-templates mode="bibliomixed.mode"/>
  928. </fo:inline>
  929. </xsl:template>
  930. <xsl:template match="printhistory" mode="bibliomixed.mode">
  931. <fo:inline>
  932. <xsl:apply-templates mode="bibliomixed.mode"/>
  933. </fo:inline>
  934. </xsl:template>
  935. <xsl:template match="productname" mode="bibliomixed.mode">
  936. <fo:inline>
  937. <xsl:apply-templates mode="bibliomixed.mode"/>
  938. </fo:inline>
  939. </xsl:template>
  940. <xsl:template match="productnumber" mode="bibliomixed.mode">
  941. <fo:inline>
  942. <xsl:apply-templates mode="bibliomixed.mode"/>
  943. </fo:inline>
  944. </xsl:template>
  945. <xsl:template match="pubdate" mode="bibliomixed.mode">
  946. <fo:inline>
  947. <xsl:apply-templates mode="bibliomixed.mode"/>
  948. </fo:inline>
  949. </xsl:template>
  950. <xsl:template match="publisher" mode="bibliomixed.mode">
  951. <fo:inline>
  952. <xsl:apply-templates mode="bibliomixed.mode"/>
  953. </fo:inline>
  954. </xsl:template>
  955. <xsl:template match="publishername" mode="bibliomixed.mode">
  956. <fo:inline>
  957. <xsl:apply-templates mode="bibliomixed.mode"/>
  958. </fo:inline>
  959. </xsl:template>
  960. <xsl:template match="pubsnumber" mode="bibliomixed.mode">
  961. <fo:inline>
  962. <xsl:apply-templates mode="bibliomixed.mode"/>
  963. </fo:inline>
  964. </xsl:template>
  965. <xsl:template match="releaseinfo" mode="bibliomixed.mode">
  966. <fo:inline>
  967. <xsl:apply-templates mode="bibliomixed.mode"/>
  968. </fo:inline>
  969. </xsl:template>
  970. <xsl:template match="revhistory" mode="bibliomixed.mode">
  971. <fo:inline>
  972. <xsl:apply-templates mode="bibliomixed.mode"/>
  973. </fo:inline>
  974. </xsl:template>
  975. <xsl:template match="seriesvolnums" mode="bibliomixed.mode">
  976. <fo:inline>
  977. <xsl:apply-templates mode="bibliomixed.mode"/>
  978. </fo:inline>
  979. </xsl:template>
  980. <xsl:template match="subtitle" mode="bibliomixed.mode">
  981. <fo:inline>
  982. <xsl:apply-templates mode="bibliomixed.mode"/>
  983. </fo:inline>
  984. </xsl:template>
  985. <xsl:template match="surname" mode="bibliomixed.mode">
  986. <fo:inline>
  987. <xsl:apply-templates mode="bibliomixed.mode"/>
  988. </fo:inline>
  989. </xsl:template>
  990. <xsl:template match="title" mode="bibliomixed.mode">
  991. <fo:inline>
  992. <xsl:apply-templates mode="bibliomixed.mode"/>
  993. </fo:inline>
  994. </xsl:template>
  995. <xsl:template match="titleabbrev" mode="bibliomixed.mode">
  996. <fo:inline>
  997. <xsl:apply-templates mode="bibliomixed.mode"/>
  998. </fo:inline>
  999. </xsl:template>
  1000. <xsl:template match="volumenum" mode="bibliomixed.mode">
  1001. <fo:inline>
  1002. <xsl:apply-templates mode="bibliomixed.mode"/>
  1003. </fo:inline>
  1004. </xsl:template>
  1005. <xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource"
  1006. mode="bibliomixed.mode">
  1007. <fo:inline>
  1008. <xsl:apply-templates mode="bibliomixed.mode"/>
  1009. </fo:inline>
  1010. </xsl:template>
  1011. <!-- ==================================================================== -->
  1012. </xsl:stylesheet>