biblio.xsl 35 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169
  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$
  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:call-template name="person.name"/>
  309. <xsl:value-of select="$biblioentry.item.separator"/>
  310. </fo:inline>
  311. </xsl:template>
  312. <xsl:template match="authorblurb|personblurb" mode="bibliography.mode">
  313. <fo:inline>
  314. <xsl:apply-templates mode="bibliography.mode"/>
  315. <xsl:value-of select="$biblioentry.item.separator"/>
  316. </fo:inline>
  317. </xsl:template>
  318. <xsl:template match="authorgroup" mode="bibliography.mode">
  319. <fo:inline>
  320. <xsl:call-template name="person.name.list"/>
  321. <xsl:value-of select="$biblioentry.item.separator"/>
  322. </fo:inline>
  323. </xsl:template>
  324. <xsl:template match="authorinitials" mode="bibliography.mode">
  325. <fo:inline>
  326. <xsl:apply-templates mode="bibliography.mode"/>
  327. <xsl:value-of select="$biblioentry.item.separator"/>
  328. </fo:inline>
  329. </xsl:template>
  330. <xsl:template match="bibliomisc" mode="bibliography.mode">
  331. <fo:inline>
  332. <xsl:apply-templates mode="bibliography.mode"/>
  333. <xsl:value-of select="$biblioentry.item.separator"/>
  334. </fo:inline>
  335. </xsl:template>
  336. <xsl:template match="bibliomset" mode="bibliography.mode">
  337. <fo:inline>
  338. <xsl:apply-templates mode="bibliography.mode"/>
  339. <xsl:value-of select="$biblioentry.item.separator"/>
  340. </fo:inline>
  341. </xsl:template>
  342. <!-- ================================================== -->
  343. <xsl:template match="biblioset" mode="bibliography.mode">
  344. <fo:inline>
  345. <xsl:apply-templates mode="bibliography.mode"/>
  346. </fo:inline>
  347. </xsl:template>
  348. <xsl:template match="biblioset/title|biblioset/citetitle"
  349. mode="bibliography.mode">
  350. <xsl:variable name="relation" select="../@relation"/>
  351. <xsl:choose>
  352. <xsl:when test="$relation='article' or @pubwork='article'">
  353. <xsl:call-template name="gentext.startquote"/>
  354. <xsl:apply-templates mode="bibliography.mode"/>
  355. <xsl:call-template name="gentext.endquote"/>
  356. </xsl:when>
  357. <xsl:otherwise>
  358. <fo:inline font-style="italic">
  359. <xsl:apply-templates/>
  360. </fo:inline>
  361. </xsl:otherwise>
  362. </xsl:choose>
  363. <xsl:value-of select="$biblioentry.item.separator"/>
  364. </xsl:template>
  365. <!-- ================================================== -->
  366. <xsl:template match="bookbiblio" mode="bibliography.mode">
  367. <fo:inline>
  368. <xsl:apply-templates mode="bibliography.mode"/>
  369. <xsl:value-of select="$biblioentry.item.separator"/>
  370. </fo:inline>
  371. </xsl:template>
  372. <xsl:template match="citetitle" mode="bibliography.mode">
  373. <fo:inline>
  374. <xsl:choose>
  375. <xsl:when test="@pubwork = 'article'">
  376. <xsl:call-template name="gentext.startquote"/>
  377. <xsl:apply-templates mode="bibliography.mode"/>
  378. <xsl:call-template name="gentext.endquote"/>
  379. </xsl:when>
  380. <xsl:otherwise>
  381. <fo:inline font-style="italic">
  382. <xsl:apply-templates mode="bibliography.mode"/>
  383. </fo:inline>
  384. </xsl:otherwise>
  385. </xsl:choose>
  386. <xsl:value-of select="$biblioentry.item.separator"/>
  387. </fo:inline>
  388. </xsl:template>
  389. <xsl:template match="collab" mode="bibliography.mode">
  390. <fo:inline>
  391. <xsl:apply-templates mode="bibliography.mode"/>
  392. <xsl:value-of select="$biblioentry.item.separator"/>
  393. </fo:inline>
  394. </xsl:template>
  395. <xsl:template match="confgroup" mode="bibliography.mode">
  396. <fo:inline>
  397. <xsl:apply-templates mode="bibliography.mode"/>
  398. <xsl:value-of select="$biblioentry.item.separator"/>
  399. </fo:inline>
  400. </xsl:template>
  401. <xsl:template match="contractnum" mode="bibliography.mode">
  402. <fo:inline>
  403. <xsl:apply-templates mode="bibliography.mode"/>
  404. <xsl:value-of select="$biblioentry.item.separator"/>
  405. </fo:inline>
  406. </xsl:template>
  407. <xsl:template match="contractsponsor" mode="bibliography.mode">
  408. <fo:inline>
  409. <xsl:apply-templates mode="bibliography.mode"/>
  410. <xsl:value-of select="$biblioentry.item.separator"/>
  411. </fo:inline>
  412. </xsl:template>
  413. <xsl:template match="contrib" mode="bibliography.mode">
  414. <fo:inline>
  415. <xsl:apply-templates mode="bibliography.mode"/>
  416. <xsl:value-of select="$biblioentry.item.separator"/>
  417. </fo:inline>
  418. </xsl:template>
  419. <!-- ================================================== -->
  420. <xsl:template match="copyright" mode="bibliography.mode">
  421. <fo:inline>
  422. <xsl:call-template name="gentext">
  423. <xsl:with-param name="key" select="'Copyright'"/>
  424. </xsl:call-template>
  425. <xsl:call-template name="gentext.space"/>
  426. <xsl:call-template name="dingbat">
  427. <xsl:with-param name="dingbat">copyright</xsl:with-param>
  428. </xsl:call-template>
  429. <xsl:call-template name="gentext.space"/>
  430. <xsl:apply-templates select="year" mode="bibliography.mode"/>
  431. <xsl:if test="holder">
  432. <xsl:call-template name="gentext.space"/>
  433. <xsl:apply-templates select="holder" mode="bibliography.mode"/>
  434. </xsl:if>
  435. <xsl:value-of select="$biblioentry.item.separator"/>
  436. </fo:inline>
  437. </xsl:template>
  438. <xsl:template match="year" mode="bibliography.mode">
  439. <xsl:apply-templates/><xsl:text>, </xsl:text>
  440. </xsl:template>
  441. <xsl:template match="year[position()=last()]" mode="bibliography.mode">
  442. <xsl:apply-templates/>
  443. </xsl:template>
  444. <xsl:template match="holder" mode="bibliography.mode">
  445. <xsl:apply-templates/>
  446. </xsl:template>
  447. <!-- ================================================== -->
  448. <xsl:template match="corpauthor" mode="bibliography.mode">
  449. <fo:inline>
  450. <xsl:apply-templates mode="bibliography.mode"/>
  451. <xsl:value-of select="$biblioentry.item.separator"/>
  452. </fo:inline>
  453. </xsl:template>
  454. <xsl:template match="corpcredit" mode="bibliography.mode">
  455. <fo:inline>
  456. <xsl:apply-templates mode="bibliography.mode"/>
  457. <xsl:value-of select="$biblioentry.item.separator"/>
  458. </fo:inline>
  459. </xsl:template>
  460. <xsl:template match="corpname" mode="bibliography.mode">
  461. <fo:inline>
  462. <xsl:apply-templates mode="bibliography.mode"/>
  463. <xsl:value-of select="$biblioentry.item.separator"/>
  464. </fo:inline>
  465. </xsl:template>
  466. <xsl:template match="date" mode="bibliography.mode">
  467. <fo:inline>
  468. <xsl:apply-templates mode="bibliography.mode"/>
  469. <xsl:value-of select="$biblioentry.item.separator"/>
  470. </fo:inline>
  471. </xsl:template>
  472. <xsl:template match="edition" mode="bibliography.mode">
  473. <fo:inline>
  474. <xsl:apply-templates mode="bibliography.mode"/>
  475. <xsl:value-of select="$biblioentry.item.separator"/>
  476. </fo:inline>
  477. </xsl:template>
  478. <xsl:template match="editor" mode="bibliography.mode">
  479. <fo:inline>
  480. <xsl:call-template name="person.name"/>
  481. <xsl:value-of select="$biblioentry.item.separator"/>
  482. </fo:inline>
  483. </xsl:template>
  484. <xsl:template match="firstname" mode="bibliography.mode">
  485. <fo:inline>
  486. <xsl:apply-templates mode="bibliography.mode"/>
  487. <xsl:value-of select="$biblioentry.item.separator"/>
  488. </fo:inline>
  489. </xsl:template>
  490. <xsl:template match="honorific" mode="bibliography.mode">
  491. <fo:inline>
  492. <xsl:apply-templates mode="bibliography.mode"/>
  493. <xsl:value-of select="$biblioentry.item.separator"/>
  494. </fo:inline>
  495. </xsl:template>
  496. <xsl:template match="indexterm" mode="bibliography.mode">
  497. <xsl:apply-templates select="."/>
  498. </xsl:template>
  499. <xsl:template match="invpartnumber" mode="bibliography.mode">
  500. <fo:inline>
  501. <xsl:apply-templates mode="bibliography.mode"/>
  502. <xsl:value-of select="$biblioentry.item.separator"/>
  503. </fo:inline>
  504. </xsl:template>
  505. <xsl:template match="isbn" mode="bibliography.mode">
  506. <fo:inline>
  507. <xsl:apply-templates mode="bibliography.mode"/>
  508. <xsl:value-of select="$biblioentry.item.separator"/>
  509. </fo:inline>
  510. </xsl:template>
  511. <xsl:template match="issn" mode="bibliography.mode">
  512. <fo:inline>
  513. <xsl:apply-templates mode="bibliography.mode"/>
  514. <xsl:value-of select="$biblioentry.item.separator"/>
  515. </fo:inline>
  516. </xsl:template>
  517. <xsl:template match="issuenum" mode="bibliography.mode">
  518. <fo:inline>
  519. <xsl:apply-templates mode="bibliography.mode"/>
  520. <xsl:value-of select="$biblioentry.item.separator"/>
  521. </fo:inline>
  522. </xsl:template>
  523. <xsl:template match="lineage" mode="bibliography.mode">
  524. <fo:inline>
  525. <xsl:apply-templates mode="bibliography.mode"/>
  526. <xsl:value-of select="$biblioentry.item.separator"/>
  527. </fo:inline>
  528. </xsl:template>
  529. <xsl:template match="orgname" mode="bibliography.mode">
  530. <fo:inline>
  531. <xsl:apply-templates mode="bibliography.mode"/>
  532. <xsl:value-of select="$biblioentry.item.separator"/>
  533. </fo:inline>
  534. </xsl:template>
  535. <xsl:template match="othercredit" mode="bibliography.mode">
  536. <fo:inline>
  537. <xsl:apply-templates mode="bibliography.mode"/>
  538. <xsl:value-of select="$biblioentry.item.separator"/>
  539. </fo:inline>
  540. </xsl:template>
  541. <xsl:template match="othername" mode="bibliography.mode">
  542. <fo:inline>
  543. <xsl:apply-templates mode="bibliography.mode"/>
  544. <xsl:value-of select="$biblioentry.item.separator"/>
  545. </fo:inline>
  546. </xsl:template>
  547. <xsl:template match="pagenums" mode="bibliography.mode">
  548. <fo:inline>
  549. <xsl:apply-templates mode="bibliography.mode"/>
  550. <xsl:value-of select="$biblioentry.item.separator"/>
  551. </fo:inline>
  552. </xsl:template>
  553. <xsl:template match="printhistory" mode="bibliography.mode">
  554. <fo:inline>
  555. <xsl:apply-templates mode="bibliography.mode"/>
  556. <xsl:value-of select="$biblioentry.item.separator"/>
  557. </fo:inline>
  558. </xsl:template>
  559. <xsl:template match="productname" mode="bibliography.mode">
  560. <fo:inline>
  561. <xsl:apply-templates mode="bibliography.mode"/>
  562. <xsl:value-of select="$biblioentry.item.separator"/>
  563. </fo:inline>
  564. </xsl:template>
  565. <xsl:template match="productnumber" mode="bibliography.mode">
  566. <fo:inline>
  567. <xsl:apply-templates mode="bibliography.mode"/>
  568. <xsl:value-of select="$biblioentry.item.separator"/>
  569. </fo:inline>
  570. </xsl:template>
  571. <xsl:template match="pubdate" mode="bibliography.mode">
  572. <fo:inline>
  573. <xsl:apply-templates mode="bibliography.mode"/>
  574. <xsl:value-of select="$biblioentry.item.separator"/>
  575. </fo:inline>
  576. </xsl:template>
  577. <xsl:template match="publisher" mode="bibliography.mode">
  578. <fo:inline>
  579. <xsl:apply-templates mode="bibliography.mode"/>
  580. </fo:inline>
  581. </xsl:template>
  582. <xsl:template match="publishername" mode="bibliography.mode">
  583. <fo:inline>
  584. <xsl:apply-templates mode="bibliography.mode"/>
  585. <xsl:value-of select="$biblioentry.item.separator"/>
  586. </fo:inline>
  587. </xsl:template>
  588. <xsl:template match="pubsnumber" mode="bibliography.mode">
  589. <fo:inline>
  590. <xsl:apply-templates mode="bibliography.mode"/>
  591. <xsl:value-of select="$biblioentry.item.separator"/>
  592. </fo:inline>
  593. </xsl:template>
  594. <xsl:template match="releaseinfo" mode="bibliography.mode">
  595. <fo:inline>
  596. <xsl:apply-templates mode="bibliography.mode"/>
  597. <xsl:value-of select="$biblioentry.item.separator"/>
  598. </fo:inline>
  599. </xsl:template>
  600. <xsl:template match="revhistory" mode="bibliography.mode">
  601. <fo:block>
  602. <xsl:apply-templates select="."/> <!-- use normal mode -->
  603. </fo:block>
  604. </xsl:template>
  605. <xsl:template match="seriesinfo" mode="bibliography.mode">
  606. <fo:inline>
  607. <xsl:apply-templates mode="bibliography.mode"/>
  608. </fo:inline>
  609. </xsl:template>
  610. <xsl:template match="seriesvolnums" mode="bibliography.mode">
  611. <fo:inline>
  612. <xsl:apply-templates mode="bibliography.mode"/>
  613. <xsl:value-of select="$biblioentry.item.separator"/>
  614. </fo:inline>
  615. </xsl:template>
  616. <xsl:template match="subtitle" mode="bibliography.mode">
  617. <fo:inline>
  618. <xsl:apply-templates mode="bibliography.mode"/>
  619. <xsl:value-of select="$biblioentry.item.separator"/>
  620. </fo:inline>
  621. </xsl:template>
  622. <xsl:template match="surname" mode="bibliography.mode">
  623. <fo:inline>
  624. <xsl:apply-templates mode="bibliography.mode"/>
  625. <xsl:value-of select="$biblioentry.item.separator"/>
  626. </fo:inline>
  627. </xsl:template>
  628. <xsl:template match="title" mode="bibliography.mode">
  629. <fo:inline>
  630. <fo:inline font-style="italic">
  631. <xsl:apply-templates mode="bibliography.mode"/>
  632. </fo:inline>
  633. <xsl:value-of select="$biblioentry.item.separator"/>
  634. </fo:inline>
  635. </xsl:template>
  636. <xsl:template match="titleabbrev" mode="bibliography.mode">
  637. <fo:inline>
  638. <xsl:apply-templates mode="bibliography.mode"/>
  639. <xsl:value-of select="$biblioentry.item.separator"/>
  640. </fo:inline>
  641. </xsl:template>
  642. <xsl:template match="volumenum" mode="bibliography.mode">
  643. <fo:inline>
  644. <xsl:apply-templates mode="bibliography.mode"/>
  645. <xsl:value-of select="$biblioentry.item.separator"/>
  646. </fo:inline>
  647. </xsl:template>
  648. <xsl:template match="orgdiv" mode="bibliography.mode">
  649. <fo:inline>
  650. <xsl:apply-templates mode="bibliography.mode"/>
  651. <xsl:value-of select="$biblioentry.item.separator"/>
  652. </fo:inline>
  653. </xsl:template>
  654. <xsl:template match="collabname" mode="bibliography.mode">
  655. <fo:inline>
  656. <xsl:apply-templates mode="bibliography.mode"/>
  657. <xsl:value-of select="$biblioentry.item.separator"/>
  658. </fo:inline>
  659. </xsl:template>
  660. <xsl:template match="confdates" mode="bibliography.mode">
  661. <fo:inline>
  662. <xsl:apply-templates mode="bibliography.mode"/>
  663. <xsl:value-of select="$biblioentry.item.separator"/>
  664. </fo:inline>
  665. </xsl:template>
  666. <xsl:template match="conftitle" mode="bibliography.mode">
  667. <fo:inline>
  668. <xsl:apply-templates mode="bibliography.mode"/>
  669. <xsl:value-of select="$biblioentry.item.separator"/>
  670. </fo:inline>
  671. </xsl:template>
  672. <xsl:template match="confnum" mode="bibliography.mode">
  673. <fo:inline>
  674. <xsl:apply-templates mode="bibliography.mode"/>
  675. <xsl:value-of select="$biblioentry.item.separator"/>
  676. </fo:inline>
  677. </xsl:template>
  678. <xsl:template match="confsponsor" mode="bibliography.mode">
  679. <fo:inline>
  680. <xsl:apply-templates mode="bibliography.mode"/>
  681. <xsl:value-of select="$biblioentry.item.separator"/>
  682. </fo:inline>
  683. </xsl:template>
  684. <xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource"
  685. mode="bibliography.mode">
  686. <fo:inline>
  687. <xsl:apply-templates mode="bibliography.mode"/>
  688. <xsl:value-of select="$biblioentry.item.separator"/>
  689. </fo:inline>
  690. </xsl:template>
  691. <!-- ==================================================================== -->
  692. <xsl:template match="*" mode="bibliomixed.mode">
  693. <xsl:apply-templates select="."/><!-- try the default mode -->
  694. </xsl:template>
  695. <xsl:template match="abbrev" mode="bibliomixed.mode">
  696. <xsl:if test="preceding-sibling::*">
  697. <fo:inline>
  698. <xsl:apply-templates mode="bibliomixed.mode"/>
  699. </fo:inline>
  700. </xsl:if>
  701. </xsl:template>
  702. <xsl:template match="abstract" mode="bibliomixed.mode">
  703. <fo:block start-indent="1in">
  704. <xsl:apply-templates mode="bibliomixed.mode"/>
  705. </fo:block>
  706. </xsl:template>
  707. <xsl:template match="para" mode="bibliomixed.mode">
  708. <fo:block>
  709. <xsl:apply-templates mode="bibliomixed.mode"/>
  710. </fo:block>
  711. </xsl:template>
  712. <xsl:template match="address" mode="bibliomixed.mode">
  713. <fo:inline>
  714. <xsl:apply-templates mode="bibliomixed.mode"/>
  715. </fo:inline>
  716. </xsl:template>
  717. <xsl:template match="affiliation" mode="bibliomixed.mode">
  718. <fo:inline>
  719. <xsl:apply-templates mode="bibliomixed.mode"/>
  720. </fo:inline>
  721. </xsl:template>
  722. <xsl:template match="shortaffil" mode="bibliomixed.mode">
  723. <fo:inline>
  724. <xsl:apply-templates mode="bibliography.mode"/>
  725. </fo:inline>
  726. </xsl:template>
  727. <xsl:template match="jobtitle" mode="bibliomixed.mode">
  728. <fo:inline>
  729. <xsl:apply-templates mode="bibliography.mode"/>
  730. </fo:inline>
  731. </xsl:template>
  732. <xsl:template match="artpagenums" mode="bibliomixed.mode">
  733. <fo:inline>
  734. <xsl:apply-templates mode="bibliomixed.mode"/>
  735. </fo:inline>
  736. </xsl:template>
  737. <xsl:template match="author" mode="bibliomixed.mode">
  738. <fo:inline>
  739. <xsl:call-template name="person.name"/>
  740. </fo:inline>
  741. </xsl:template>
  742. <xsl:template match="authorblurb|personblurb" mode="bibliomixed.mode">
  743. <fo:inline>
  744. <xsl:apply-templates mode="bibliomixed.mode"/>
  745. </fo:inline>
  746. </xsl:template>
  747. <xsl:template match="authorgroup" mode="bibliomixed.mode">
  748. <fo:inline>
  749. <xsl:apply-templates mode="bibliomixed.mode"/>
  750. </fo:inline>
  751. </xsl:template>
  752. <xsl:template match="authorinitials" mode="bibliomixed.mode">
  753. <fo:inline>
  754. <xsl:apply-templates mode="bibliomixed.mode"/>
  755. </fo:inline>
  756. </xsl:template>
  757. <xsl:template match="bibliomisc" mode="bibliomixed.mode">
  758. <fo:inline>
  759. <xsl:apply-templates mode="bibliomixed.mode"/>
  760. </fo:inline>
  761. </xsl:template>
  762. <!-- ================================================== -->
  763. <xsl:template match="bibliomset" mode="bibliomixed.mode">
  764. <fo:inline>
  765. <xsl:apply-templates mode="bibliomixed.mode"/>
  766. </fo:inline>
  767. </xsl:template>
  768. <xsl:template match="bibliomset/title|bibliomset/citetitle"
  769. mode="bibliomixed.mode">
  770. <xsl:variable name="relation" select="../@relation"/>
  771. <xsl:choose>
  772. <xsl:when test="$relation='article' or @pubwork='article'">
  773. <xsl:call-template name="gentext.startquote"/>
  774. <xsl:apply-templates mode="bibliomixed.mode"/>
  775. <xsl:call-template name="gentext.endquote"/>
  776. </xsl:when>
  777. <xsl:otherwise>
  778. <fo:inline font-style="italic">
  779. <xsl:apply-templates/>
  780. </fo:inline>
  781. </xsl:otherwise>
  782. </xsl:choose>
  783. </xsl:template>
  784. <!-- ================================================== -->
  785. <xsl:template match="biblioset" mode="bibliomixed.mode">
  786. <fo:inline>
  787. <xsl:apply-templates mode="bibliomixed.mode"/>
  788. </fo:inline>
  789. </xsl:template>
  790. <xsl:template match="citetitle" mode="bibliomixed.mode">
  791. <xsl:choose>
  792. <xsl:when test="@pubwork = 'article'">
  793. <xsl:call-template name="gentext.startquote"/>
  794. <xsl:apply-templates mode="bibliomixed.mode"/>
  795. <xsl:call-template name="gentext.endquote"/>
  796. </xsl:when>
  797. <xsl:otherwise>
  798. <fo:inline font-style="italic">
  799. <xsl:apply-templates mode="bibliography.mode"/>
  800. </fo:inline>
  801. </xsl:otherwise>
  802. </xsl:choose>
  803. </xsl:template>
  804. <xsl:template match="collab" mode="bibliomixed.mode">
  805. <fo:inline>
  806. <xsl:apply-templates mode="bibliomixed.mode"/>
  807. </fo:inline>
  808. </xsl:template>
  809. <xsl:template match="confgroup" mode="bibliomixed.mode">
  810. <fo:inline>
  811. <xsl:apply-templates mode="bibliomixed.mode"/>
  812. </fo:inline>
  813. </xsl:template>
  814. <xsl:template match="contractnum" mode="bibliomixed.mode">
  815. <fo:inline>
  816. <xsl:apply-templates mode="bibliomixed.mode"/>
  817. </fo:inline>
  818. </xsl:template>
  819. <xsl:template match="contractsponsor" mode="bibliomixed.mode">
  820. <fo:inline>
  821. <xsl:apply-templates mode="bibliomixed.mode"/>
  822. </fo:inline>
  823. </xsl:template>
  824. <xsl:template match="contrib" mode="bibliomixed.mode">
  825. <fo:inline>
  826. <xsl:apply-templates mode="bibliomixed.mode"/>
  827. </fo:inline>
  828. </xsl:template>
  829. <xsl:template match="copyright" mode="bibliomixed.mode">
  830. <fo:inline>
  831. <xsl:apply-templates mode="bibliomixed.mode"/>
  832. </fo:inline>
  833. </xsl:template>
  834. <xsl:template match="corpauthor" mode="bibliomixed.mode">
  835. <fo:inline>
  836. <xsl:apply-templates mode="bibliomixed.mode"/>
  837. </fo:inline>
  838. </xsl:template>
  839. <xsl:template match="corpcredit" mode="bibliomixed.mode">
  840. <fo:inline>
  841. <xsl:apply-templates mode="bibliomixed.mode"/>
  842. </fo:inline>
  843. </xsl:template>
  844. <xsl:template match="corpname" mode="bibliomixed.mode">
  845. <fo:inline>
  846. <xsl:apply-templates mode="bibliomixed.mode"/>
  847. </fo:inline>
  848. </xsl:template>
  849. <xsl:template match="date" mode="bibliomixed.mode">
  850. <fo:inline>
  851. <xsl:apply-templates mode="bibliomixed.mode"/>
  852. </fo:inline>
  853. </xsl:template>
  854. <xsl:template match="edition" mode="bibliomixed.mode">
  855. <fo:inline>
  856. <xsl:apply-templates mode="bibliomixed.mode"/>
  857. </fo:inline>
  858. </xsl:template>
  859. <xsl:template match="editor" mode="bibliomixed.mode">
  860. <fo:inline>
  861. <xsl:apply-templates mode="bibliomixed.mode"/>
  862. </fo:inline>
  863. </xsl:template>
  864. <xsl:template match="firstname" mode="bibliomixed.mode">
  865. <fo:inline>
  866. <xsl:apply-templates mode="bibliomixed.mode"/>
  867. </fo:inline>
  868. </xsl:template>
  869. <xsl:template match="honorific" mode="bibliomixed.mode">
  870. <fo:inline>
  871. <xsl:apply-templates mode="bibliomixed.mode"/>
  872. </fo:inline>
  873. </xsl:template>
  874. <xsl:template match="indexterm" mode="bibliomixed.mode">
  875. <xsl:apply-templates select="."/>
  876. </xsl:template>
  877. <xsl:template match="invpartnumber" mode="bibliomixed.mode">
  878. <fo:inline>
  879. <xsl:apply-templates mode="bibliomixed.mode"/>
  880. </fo:inline>
  881. </xsl:template>
  882. <xsl:template match="isbn" mode="bibliomixed.mode">
  883. <fo:inline>
  884. <xsl:apply-templates mode="bibliomixed.mode"/>
  885. </fo:inline>
  886. </xsl:template>
  887. <xsl:template match="issn" mode="bibliomixed.mode">
  888. <fo:inline>
  889. <xsl:apply-templates mode="bibliomixed.mode"/>
  890. </fo:inline>
  891. </xsl:template>
  892. <xsl:template match="issuenum" mode="bibliomixed.mode">
  893. <fo:inline>
  894. <xsl:apply-templates mode="bibliomixed.mode"/>
  895. </fo:inline>
  896. </xsl:template>
  897. <xsl:template match="lineage" mode="bibliomixed.mode">
  898. <fo:inline>
  899. <xsl:apply-templates mode="bibliomixed.mode"/>
  900. </fo:inline>
  901. </xsl:template>
  902. <xsl:template match="orgname" mode="bibliomixed.mode">
  903. <fo:inline>
  904. <xsl:apply-templates mode="bibliomixed.mode"/>
  905. </fo:inline>
  906. </xsl:template>
  907. <xsl:template match="othercredit" mode="bibliomixed.mode">
  908. <fo:inline>
  909. <xsl:apply-templates mode="bibliomixed.mode"/>
  910. </fo:inline>
  911. </xsl:template>
  912. <xsl:template match="othername" mode="bibliomixed.mode">
  913. <fo:inline>
  914. <xsl:apply-templates mode="bibliomixed.mode"/>
  915. </fo:inline>
  916. </xsl:template>
  917. <xsl:template match="pagenums" mode="bibliomixed.mode">
  918. <fo:inline>
  919. <xsl:apply-templates mode="bibliomixed.mode"/>
  920. </fo:inline>
  921. </xsl:template>
  922. <xsl:template match="printhistory" mode="bibliomixed.mode">
  923. <fo:inline>
  924. <xsl:apply-templates mode="bibliomixed.mode"/>
  925. </fo:inline>
  926. </xsl:template>
  927. <xsl:template match="productname" mode="bibliomixed.mode">
  928. <fo:inline>
  929. <xsl:apply-templates mode="bibliomixed.mode"/>
  930. </fo:inline>
  931. </xsl:template>
  932. <xsl:template match="productnumber" mode="bibliomixed.mode">
  933. <fo:inline>
  934. <xsl:apply-templates mode="bibliomixed.mode"/>
  935. </fo:inline>
  936. </xsl:template>
  937. <xsl:template match="pubdate" mode="bibliomixed.mode">
  938. <fo:inline>
  939. <xsl:apply-templates mode="bibliomixed.mode"/>
  940. </fo:inline>
  941. </xsl:template>
  942. <xsl:template match="publisher" mode="bibliomixed.mode">
  943. <fo:inline>
  944. <xsl:apply-templates mode="bibliomixed.mode"/>
  945. </fo:inline>
  946. </xsl:template>
  947. <xsl:template match="publishername" mode="bibliomixed.mode">
  948. <fo:inline>
  949. <xsl:apply-templates mode="bibliomixed.mode"/>
  950. </fo:inline>
  951. </xsl:template>
  952. <xsl:template match="pubsnumber" mode="bibliomixed.mode">
  953. <fo:inline>
  954. <xsl:apply-templates mode="bibliomixed.mode"/>
  955. </fo:inline>
  956. </xsl:template>
  957. <xsl:template match="releaseinfo" mode="bibliomixed.mode">
  958. <fo:inline>
  959. <xsl:apply-templates mode="bibliomixed.mode"/>
  960. </fo:inline>
  961. </xsl:template>
  962. <xsl:template match="revhistory" mode="bibliomixed.mode">
  963. <fo:inline>
  964. <xsl:apply-templates mode="bibliomixed.mode"/>
  965. </fo:inline>
  966. </xsl:template>
  967. <xsl:template match="seriesvolnums" mode="bibliomixed.mode">
  968. <fo:inline>
  969. <xsl:apply-templates mode="bibliomixed.mode"/>
  970. </fo:inline>
  971. </xsl:template>
  972. <xsl:template match="subtitle" mode="bibliomixed.mode">
  973. <fo:inline>
  974. <xsl:apply-templates mode="bibliomixed.mode"/>
  975. </fo:inline>
  976. </xsl:template>
  977. <xsl:template match="surname" mode="bibliomixed.mode">
  978. <fo:inline>
  979. <xsl:apply-templates mode="bibliomixed.mode"/>
  980. </fo:inline>
  981. </xsl:template>
  982. <xsl:template match="title" mode="bibliomixed.mode">
  983. <fo:inline>
  984. <xsl:apply-templates mode="bibliomixed.mode"/>
  985. </fo:inline>
  986. </xsl:template>
  987. <xsl:template match="titleabbrev" mode="bibliomixed.mode">
  988. <fo:inline>
  989. <xsl:apply-templates mode="bibliomixed.mode"/>
  990. </fo:inline>
  991. </xsl:template>
  992. <xsl:template match="volumenum" mode="bibliomixed.mode">
  993. <fo:inline>
  994. <xsl:apply-templates mode="bibliomixed.mode"/>
  995. </fo:inline>
  996. </xsl:template>
  997. <xsl:template match="bibliocoverage|biblioid|bibliorelation|bibliosource"
  998. mode="bibliomixed.mode">
  999. <fo:inline>
  1000. <xsl:apply-templates mode="bibliomixed.mode"/>
  1001. </fo:inline>
  1002. </xsl:template>
  1003. <!-- ==================================================================== -->
  1004. </xsl:stylesheet>