biblio-iso690.xsl 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300
  1. <?xml version="1.0" encoding="ASCII"?>
  2. <!--This file was created automatically by html2xhtml-->
  3. <!--from the HTML stylesheets.-->
  4. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" 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. The original code for processing bibliography in ISO690 style
  12. was provided by Jana Dvorakova <jana4u@seznam.cz>
  13. ******************************************************************** -->
  14. <!-- ==================================================================== -->
  15. <!-- if biblioentry.alt.primary.seps is set to nonzero value then use alternative separators for primary responsibility - $alt.person.two.sep, $alt.person.last.sep, $alt.person.more.sep -->
  16. <xsl:param name="biblioentry.alt.primary.seps" select="0"/>
  17. <!-- how many authors will be printed if there is more than three authors - set to number 1 (default value), 2 or 3 -->
  18. <xsl:param name="biblioentry.primary.count" select="1"/>
  19. <!-- ==================================================================== -->
  20. <xsl:template name="iso690.makecitation">
  21. <!-- Types of resources -->
  22. <xsl:choose>
  23. <!-- SYSTEMS OF ELECTRONIC COMMUNICATION : ENTIRE MESSAGE SYSTEM -->
  24. <!-- same as Monographs -->
  25. <xsl:when test="./@role='messagesystem'">
  26. <xsl:call-template name="iso690.monogr"/>
  27. </xsl:when>
  28. <!-- SYSTEMS OF ELECTRONIC COMMUNICATION : ELECTRONIC MESSAGES -->
  29. <!-- same as Contributions to Monographs -->
  30. <xsl:when test="./@role='message'">
  31. <xsl:call-template name="iso690.paper.mon"/>
  32. </xsl:when>
  33. <!-- SERIALS -->
  34. <xsl:when test="./@role='serial' or ./biblioid/@class='issn' or ./issn">
  35. <xsl:call-template name="iso690.serial"/>
  36. </xsl:when>
  37. <!-- PARTS OF MONOGRAPHS -->
  38. <xsl:when test="./@role='part' or (./bibliomisc[@role='secnum']|./bibliomisc[@role='sectitle'])">
  39. <xsl:call-template name="iso690.monogr.part"/>
  40. </xsl:when>
  41. <!-- CONTRIBUTIONS TO MONOGRAPHS -->
  42. <xsl:when test="./@role='contribution' or (./biblioset/@relation='part' and ./biblioset/@relation='book')">
  43. <xsl:call-template name="iso690.paper.mon"/>
  44. </xsl:when>
  45. <!-- ARTICLES, ETC., IN SERIALS -->
  46. <xsl:when test="./@role='article' or (./biblioset/@relation='journal' and ./biblioset/@relation='article')">
  47. <xsl:call-template name="iso690.article"/>
  48. </xsl:when>
  49. <!-- PATENT DOCUMENTS -->
  50. <xsl:when test="./@role='patent' or (./bibliomisc[@role='patenttype'] and ./bibliomisc[@role='patentnum'])">
  51. <xsl:call-template name="iso690.patent"/>
  52. </xsl:when>
  53. <!-- MONOGRAPHS -->
  54. <xsl:otherwise>
  55. <xsl:call-template name="iso690.monogr"/>
  56. </xsl:otherwise>
  57. </xsl:choose>
  58. </xsl:template>
  59. <!-- ==================================================================== -->
  60. <!-- MONOGRAPHS -->
  61. <xsl:template name="iso690.monogr">
  62. <!-- Primary responsibility -->
  63. <xsl:call-template name="iso690.primary"/>
  64. <!-- Title and Type of medium -->
  65. <xsl:call-template name="iso690.title"/>
  66. <!-- Subordinate responsibility -->
  67. <xsl:call-template name="iso690.secondary"/>
  68. <!-- Edition -->
  69. <xsl:call-template name="iso690.edition"/>
  70. <!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation -->
  71. <xsl:call-template name="iso690.pub"/>
  72. <!-- Extent -->
  73. <xsl:call-template name="iso690.extent"/>
  74. <!-- Series -->
  75. <xsl:call-template name="iso690.serie"/>
  76. <!-- Notes -->
  77. <xsl:call-template name="iso690.notice"/>
  78. <!-- Avaibility and access -->
  79. <xsl:call-template name="iso690.access"/>
  80. <!-- Standard number -->
  81. <xsl:call-template name="iso690.isbn"/>
  82. </xsl:template>
  83. <!-- SERIALS -->
  84. <xsl:template name="iso690.serial">
  85. <!-- Title and Type of medium -->
  86. <xsl:call-template name="iso690.title"/>
  87. <!-- Responsibility [nonEL] -->
  88. <xsl:if test="not(./bibliomisc[@role='medium'])">
  89. <xsl:call-template name="iso690.secondary"/>
  90. </xsl:if>
  91. <!-- Edition -->
  92. <xsl:call-template name="iso690.edition">
  93. <xsl:with-param name="after" select="./bibliomisc[@role='issuing']"/>
  94. </xsl:call-template>
  95. <!-- Issue designation (date and/or num) [nonEL] -->
  96. <xsl:if test="not(./bibliomisc[@role='medium'])">
  97. <xsl:call-template name="iso690.issuing"/>
  98. </xsl:if>
  99. <!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation -->
  100. <xsl:call-template name="iso690.pub"/>
  101. <!-- Series -->
  102. <xsl:call-template name="iso690.serie"/>
  103. <!-- Notes -->
  104. <xsl:call-template name="iso690.notice"/>
  105. <!-- Avaibility and access -->
  106. <xsl:call-template name="iso690.access"/>
  107. <!-- Standard number -->
  108. <xsl:call-template name="iso690.issn"/>
  109. </xsl:template>
  110. <!-- PARTS OF MONOGRAPHS -->
  111. <xsl:template name="iso690.monogr.part">
  112. <!-- Primary responsibility of host document -->
  113. <xsl:call-template name="iso690.primary"/>
  114. <!-- Title and Type of medium of host document -->
  115. <xsl:call-template name="iso690.title"/>
  116. <!-- Subordinate responsibility of host document [EL] -->
  117. <xsl:if test="./bibliomisc[@role='medium']">
  118. <xsl:call-template name="iso690.secondary"/>
  119. </xsl:if>
  120. <!-- Edition -->
  121. <xsl:call-template name="iso690.edition">
  122. <xsl:with-param name="after" select="./volumenum"/>
  123. </xsl:call-template>
  124. <!-- Numeration of the part [nonEL]-->
  125. <xsl:if test="not(./bibliomisc[@role='medium'])">
  126. <xsl:call-template name="iso690.partnr"/>
  127. <!-- Subordinate responsibility [nonEL] -->
  128. <xsl:call-template name="iso690.secondary"/>
  129. </xsl:if>
  130. <!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation -->
  131. <xsl:call-template name="iso690.pub"/>
  132. <!-- Location within host -->
  133. <xsl:call-template name="iso690.part.location"/>
  134. <xsl:if test="./bibliomisc[@role='medium']">
  135. <!-- Numeration within host document [EL] -->
  136. <!-- Notes [EL] -->
  137. <xsl:call-template name="iso690.notice"/>
  138. <!-- Avaibility and access [EL] -->
  139. <xsl:call-template name="iso690.access"/>
  140. <!-- Standard number [EL] -->
  141. <xsl:call-template name="iso690.isbn"/>
  142. </xsl:if>
  143. </xsl:template>
  144. <!-- CONTRIBUTIONS TO MONOGRAPHS -->
  145. <xsl:template name="iso690.paper.mon">
  146. <!-- Contribution -->
  147. <xsl:apply-templates mode="iso690.paper.part" select="./biblioset[@relation='part']"/>
  148. <!-- In -->
  149. <xsl:text>In </xsl:text>
  150. <!-- Host -->
  151. <xsl:apply-templates mode="iso690.paper.book" select="./biblioset[@relation='book']"/>
  152. </xsl:template>
  153. <xsl:template match="biblioset" mode="iso690.paper.part">
  154. <!-- Contribution -->
  155. <!-- Primary responsibility -->
  156. <xsl:call-template name="iso690.primary"/>
  157. <!-- Title -->
  158. <xsl:call-template name="iso690.title">
  159. <xsl:with-param name="italic" select="0"/>
  160. </xsl:call-template>
  161. </xsl:template>
  162. <xsl:template match="biblioset" mode="iso690.paper.book">
  163. <!-- Host -->
  164. <!-- Primary responsibility -->
  165. <xsl:call-template name="iso690.primary"/>
  166. <!-- Title and Type of medium -->
  167. <xsl:call-template name="iso690.title"/>
  168. <!-- Subordinate responsibility [EL] -->
  169. <xsl:if test="./bibliomisc[@role='medium']">
  170. <xsl:call-template name="iso690.secondary"/>
  171. </xsl:if>
  172. <!-- Edition -->
  173. <xsl:call-template name="iso690.edition"/>
  174. <!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation -->
  175. <xsl:call-template name="iso690.paper.pub"/>
  176. <!-- Numeration within host document [EL] -->
  177. <!-- Location within host -->
  178. <xsl:call-template name="iso690.location"/>
  179. <xsl:if test="./bibliomisc[@role='medium']">
  180. <!-- Notes [EL] -->
  181. <xsl:call-template name="iso690.notice"/>
  182. <!-- Avaibility and access [EL] -->
  183. <xsl:call-template name="iso690.access"/>
  184. <!-- Standard number [EL] -->
  185. <xsl:call-template name="iso690.isbn"/>
  186. </xsl:if>
  187. </xsl:template>
  188. <!-- ARTICLES, ETC., IN SERIALS -->
  189. <xsl:template name="iso690.article">
  190. <!-- Article -->
  191. <xsl:apply-templates mode="iso690.article.art" select="./biblioset[@relation='article']"/>
  192. <!-- Serial -->
  193. <xsl:apply-templates mode="iso690.article.jour" select="./biblioset[@relation='journal']"/>
  194. </xsl:template>
  195. <xsl:template match="biblioset" mode="iso690.article.art">
  196. <!-- Article -->
  197. <!-- Primary responsibility -->
  198. <xsl:call-template name="iso690.primary"/>
  199. <!-- Title -->
  200. <xsl:call-template name="iso690.title">
  201. <xsl:with-param name="italic" select="0"/>
  202. </xsl:call-template>
  203. <!-- Subordinate responsibility [nonEL] -->
  204. <xsl:if test="not(../*/bibliomisc[@role='medium'])">
  205. <xsl:call-template name="iso690.secondary"/>
  206. </xsl:if>
  207. </xsl:template>
  208. <xsl:template match="biblioset" mode="iso690.article.jour">
  209. <!-- Serial -->
  210. <!-- Title and Type of medium -->
  211. <xsl:call-template name="iso690.title"/>
  212. <!-- Edition -->
  213. <xsl:call-template name="iso690.edition">
  214. <xsl:with-param name="after" select="./pubdate[not(@role='issuing')]|./volumenum|./issuenum|./pagenums"/>
  215. </xsl:call-template>
  216. <!-- Number designation [EL] -->
  217. <!-- Location within host -->
  218. <xsl:call-template name="iso690.article.location"/>
  219. <xsl:if test="./bibliomisc[@role='medium']">
  220. <!-- Notes [EL] -->
  221. <xsl:call-template name="iso690.notice"/>
  222. <!-- Avaibility and access [EL] -->
  223. <xsl:call-template name="iso690.access"/>
  224. <!-- Standard number [EL] -->
  225. <xsl:call-template name="iso690.issn"/>
  226. </xsl:if>
  227. </xsl:template>
  228. <!-- PATENT DOCUMENTS -->
  229. <xsl:template name="iso690.patent">
  230. <!-- Primary responsibility (applicant) -->
  231. <xsl:call-template name="iso690.primary"/>
  232. <!-- Title of the invention -->
  233. <xsl:call-template name="iso690.title"/>
  234. <!-- Subordinate responsibility -->
  235. <xsl:call-template name="iso690.secondary"/>
  236. <!-- Notes -->
  237. <xsl:call-template name="iso690.notice"/>
  238. <!-- Identification -->
  239. <xsl:call-template name="iso690.pat.ident"/>
  240. </xsl:template>
  241. <!-- ==================================================================== -->
  242. <!-- Elements -->
  243. <!-- Primary responsibility -->
  244. <xsl:template name="iso690.primary">
  245. <xsl:param name="primary.sep">
  246. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'primary.sep'"/></xsl:call-template>
  247. </xsl:param>
  248. <xsl:choose>
  249. <xsl:when test="./authorgroup/author|./author">
  250. <xsl:call-template name="iso690.author.list">
  251. <xsl:with-param name="person.list" select=".//authorgroup/author|.//author"/>
  252. </xsl:call-template>
  253. </xsl:when>
  254. <xsl:when test="./authorgroup/editor|./editor">
  255. <xsl:call-template name="iso690.author.list">
  256. <xsl:with-param name="person.list" select=".//authorgroup/editor|.//editor"/>
  257. </xsl:call-template>
  258. </xsl:when>
  259. <xsl:when test="./authorgroup/corpauthor|./corpauthor">
  260. <xsl:call-template name="iso690.author.list">
  261. <xsl:with-param name="person.list" select=".//authorgroup/corpauthor|.//corpauthor"/>
  262. </xsl:call-template>
  263. </xsl:when>
  264. <xsl:otherwise>
  265. <xsl:if test="(./firstname)and(./surname)">
  266. <xsl:call-template name="iso690.author"/>
  267. <xsl:call-template name="iso690.endsep">
  268. <xsl:with-param name="text" select="string(./firstname[1])"/>
  269. <xsl:with-param name="sep" select="$primary.sep"/>
  270. </xsl:call-template>
  271. </xsl:if>
  272. </xsl:otherwise>
  273. </xsl:choose>
  274. </xsl:template>
  275. <xsl:template name="iso690.author.list">
  276. <xsl:param name="person.list" select="author|corpauthor|editor"/>
  277. <xsl:param name="person.count" select="count($person.list)"/>
  278. <xsl:param name="count" select="1"/>
  279. <xsl:param name="group" select="./authorgroup[@role='many']"/>
  280. <xsl:param name="many" select="0"/>
  281. <xsl:param name="primary.many">
  282. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'primary.many'"/></xsl:call-template>
  283. </xsl:param>
  284. <xsl:param name="primary.editor">
  285. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'primary.editor'"/></xsl:call-template>
  286. </xsl:param>
  287. <xsl:param name="primary.sep">
  288. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'primary.sep'"/></xsl:call-template>
  289. </xsl:param>
  290. <xsl:choose>
  291. <xsl:when test="$count &gt; $person.count"/>
  292. <xsl:otherwise>
  293. <xsl:choose>
  294. <xsl:when test="$person.count &lt; 4 and not($group)">
  295. <xsl:call-template name="iso690.author">
  296. <xsl:with-param name="node" select="$person.list[position()=$count]"/>
  297. </xsl:call-template>
  298. <xsl:choose>
  299. <xsl:when test="$person.count = 2 and $count = 1 and $biblioentry.alt.primary.seps != 0">
  300. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'alt.person.two.sep'"/></xsl:call-template>
  301. </xsl:when>
  302. <xsl:when test="$person.count = 2 and $count = 1">
  303. <xsl:call-template name="gentext.template">
  304. <xsl:with-param name="context" select="'authorgroup'"/>
  305. <xsl:with-param name="name" select="'sep2'"/>
  306. </xsl:call-template>
  307. </xsl:when>
  308. <xsl:when test="$person.count &gt; 2 and $count+1 = $person.count and $biblioentry.alt.primary.seps != 0">
  309. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'alt.person.last.sep'"/></xsl:call-template>
  310. </xsl:when>
  311. <xsl:when test="$person.count &gt; 2 and $count+1 = $person.count">
  312. <xsl:call-template name="gentext.template">
  313. <xsl:with-param name="context" select="'authorgroup'"/>
  314. <xsl:with-param name="name" select="'seplast'"/>
  315. </xsl:call-template>
  316. </xsl:when>
  317. <xsl:when test="$count &lt; $person.count and $biblioentry.alt.primary.seps != 0">
  318. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'alt.person.more.sep'"/></xsl:call-template>
  319. </xsl:when>
  320. <xsl:when test="$count &lt; $person.count">
  321. <xsl:call-template name="gentext.template">
  322. <xsl:with-param name="context" select="'authorgroup'"/>
  323. <xsl:with-param name="name" select="'sep'"/>
  324. </xsl:call-template>
  325. </xsl:when>
  326. <xsl:when test="($count = $person.count)">
  327. <xsl:choose>
  328. <xsl:when test="$many!=0">
  329. <xsl:if test="name($person.list[position()=$count])='editor'">
  330. <xsl:value-of select="$primary.editor"/>
  331. </xsl:if>
  332. <xsl:value-of select="$primary.many"/>
  333. <xsl:call-template name="iso690.endsep">
  334. <xsl:with-param name="text" select="$primary.many"/>
  335. <xsl:with-param name="sep" select="$primary.sep"/>
  336. </xsl:call-template>
  337. </xsl:when>
  338. <xsl:when test="name($person.list[position()=$count])='editor'">
  339. <xsl:value-of select="$primary.editor"/>
  340. <xsl:value-of select="$primary.sep"/>
  341. </xsl:when>
  342. <xsl:when test="name($person.list[position()=$count])='corpauthor'">
  343. <xsl:call-template name="iso690.endsep">
  344. <xsl:with-param name="text" select="string($person.list[position()=$count])"/>
  345. <xsl:with-param name="sep" select="$primary.sep"/>
  346. </xsl:call-template>
  347. </xsl:when>
  348. <xsl:otherwise>
  349. <xsl:call-template name="iso690.endsep">
  350. <xsl:with-param name="text" select="string($person.list[position()=$count]//firstname[1])"/>
  351. <xsl:with-param name="sep" select="$primary.sep"/>
  352. </xsl:call-template>
  353. </xsl:otherwise>
  354. </xsl:choose>
  355. </xsl:when>
  356. </xsl:choose>
  357. <xsl:call-template name="iso690.author.list">
  358. <xsl:with-param name="person.list" select="$person.list"/>
  359. <xsl:with-param name="person.count" select="$person.count"/>
  360. <xsl:with-param name="count" select="$count+1"/>
  361. <xsl:with-param name="many" select="$many"/>
  362. <xsl:with-param name="group"/>
  363. </xsl:call-template>
  364. </xsl:when>
  365. <xsl:otherwise>
  366. <xsl:choose>
  367. <xsl:when test="($biblioentry.primary.count&gt;=3) and ($person.count&gt;=3)">
  368. <xsl:call-template name="iso690.author.list">
  369. <xsl:with-param name="person.list" select="$person.list[1]|$person.list[2]|$person.list[3]"/>
  370. <xsl:with-param name="person.count" select="3"/>
  371. <xsl:with-param name="count" select="1"/>
  372. <xsl:with-param name="many" select="1"/>
  373. <xsl:with-param name="group"/>
  374. </xsl:call-template>
  375. </xsl:when>
  376. <xsl:when test="($biblioentry.primary.count&gt;1) and ($person.count&gt;1)">
  377. <xsl:call-template name="iso690.author.list">
  378. <xsl:with-param name="person.list" select="$person.list[1]|$person.list[2]"/>
  379. <xsl:with-param name="person.count" select="2"/>
  380. <xsl:with-param name="count" select="1"/>
  381. <xsl:with-param name="many" select="1"/>
  382. <xsl:with-param name="group"/>
  383. </xsl:call-template>
  384. </xsl:when>
  385. <xsl:otherwise>
  386. <xsl:call-template name="iso690.author.list">
  387. <xsl:with-param name="person.list" select="$person.list[1]"/>
  388. <xsl:with-param name="person.count" select="1"/>
  389. <xsl:with-param name="count" select="1"/>
  390. <xsl:with-param name="many" select="1"/>
  391. <xsl:with-param name="group"/>
  392. </xsl:call-template>
  393. </xsl:otherwise>
  394. </xsl:choose>
  395. </xsl:otherwise>
  396. </xsl:choose>
  397. </xsl:otherwise>
  398. </xsl:choose>
  399. </xsl:template>
  400. <xsl:template name="iso690.author">
  401. <xsl:param name="node" select="."/>
  402. <xsl:param name="lastfirst.sep">
  403. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'lastfirst.sep'"/></xsl:call-template>
  404. </xsl:param>
  405. <xsl:choose>
  406. <xsl:when test="name($node)!='corpauthor'">
  407. <span style="text-transform:uppercase">
  408. <xsl:apply-templates mode="iso690.mode" select="$node//surname[1]"/>
  409. </span>
  410. <xsl:if test="$node//surname and $node//firstname">
  411. <xsl:value-of select="$lastfirst.sep"/>
  412. </xsl:if>
  413. <xsl:apply-templates mode="iso690.mode" select="$node//firstname[1]"/>
  414. </xsl:when>
  415. <xsl:otherwise>
  416. <span style="text-transform:uppercase">
  417. <xsl:apply-templates mode="iso690.mode" select="$node"/>
  418. </span>
  419. </xsl:otherwise>
  420. </xsl:choose>
  421. </xsl:template>
  422. <xsl:template match="corpauthor|firstname|surname" mode="iso690.mode">
  423. <xsl:apply-templates mode="iso690.mode"/>
  424. </xsl:template>
  425. <!-- Title and Type of medium -->
  426. <xsl:template name="iso690.title">
  427. <xsl:param name="medium" select="./bibliomisc[@role='medium']"/>
  428. <xsl:param name="italic" select="1"/>
  429. <xsl:param name="sep">
  430. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'title.sep'"/></xsl:call-template>
  431. </xsl:param>
  432. <xsl:apply-templates mode="iso690.mode" select="./title">
  433. <xsl:with-param name="medium" select="$medium"/>
  434. <xsl:with-param name="italic" select="$italic"/>
  435. <xsl:with-param name="sep" select="$sep"/>
  436. </xsl:apply-templates>
  437. </xsl:template>
  438. <xsl:template match="title" mode="iso690.mode">
  439. <xsl:param name="medium"/>
  440. <xsl:param name="italic" select="1"/>
  441. <xsl:param name="sep">
  442. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'title.sep'"/></xsl:call-template>
  443. </xsl:param>
  444. <xsl:param name="medium1">
  445. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'medium1'"/></xsl:call-template>
  446. </xsl:param>
  447. <xsl:param name="medium2">
  448. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'medium2'"/></xsl:call-template>
  449. </xsl:param>
  450. <xsl:choose>
  451. <xsl:when test="$italic=1">
  452. <xsl:call-template name="iso690.italic.title"/>
  453. </xsl:when>
  454. <xsl:otherwise>
  455. <xsl:call-template name="iso690.make.title"/>
  456. </xsl:otherwise>
  457. </xsl:choose>
  458. <xsl:if test="$medium">
  459. <xsl:value-of select="$medium1"/>
  460. <xsl:apply-templates mode="iso690.mode" select="$medium"/>
  461. <xsl:value-of select="$medium2"/>
  462. </xsl:if>
  463. <xsl:call-template name="iso690.endsep">
  464. <xsl:with-param name="text" select="concat(string(.),string(../subtitle))"/>
  465. <xsl:with-param name="sep" select="$sep"/>
  466. </xsl:call-template>
  467. </xsl:template>
  468. <xsl:template name="iso690.italic.title">
  469. <i>
  470. <xsl:call-template name="iso690.make.title"/>
  471. </i>
  472. </xsl:template>
  473. <xsl:template name="iso690.make.title">
  474. <xsl:param name="submaintitle.sep">
  475. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'submaintitle.sep'"/></xsl:call-template>
  476. </xsl:param>
  477. <xsl:apply-templates mode="iso690.mode"/>
  478. <xsl:if test="../subtitle">
  479. <xsl:value-of select="$submaintitle.sep"/>
  480. <xsl:apply-templates mode="iso690.mode" select="../subtitle"/>
  481. </xsl:if>
  482. </xsl:template>
  483. <xsl:template match="subtitle" mode="iso690.mode">
  484. <xsl:apply-templates mode="iso690.mode"/>
  485. </xsl:template>
  486. <xsl:template match="bibliomisc[@role='medium']" mode="iso690.mode">
  487. <xsl:apply-templates mode="iso690.mode"/>
  488. </xsl:template>
  489. <!-- Subordinate responsibility -->
  490. <xsl:template name="iso690.secondary">
  491. <xsl:param name="secondary.sep">
  492. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'secondary.sep'"/></xsl:call-template>
  493. </xsl:param>
  494. <xsl:param name="secondary.person.sep">
  495. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'secondary.person.sep'"/></xsl:call-template>
  496. </xsl:param>
  497. <xsl:for-each select="./bibliomisc[@role='secondary']">
  498. <xsl:apply-templates mode="iso690.mode" select="."/>
  499. <xsl:choose>
  500. <xsl:when test="position()=count(../bibliomisc[@role='secondary'])">
  501. <xsl:call-template name="iso690.endsep">
  502. <xsl:with-param name="text" select="string(.)"/>
  503. <xsl:with-param name="sep" select="$secondary.sep"/>
  504. </xsl:call-template>
  505. </xsl:when>
  506. <xsl:otherwise>
  507. <xsl:value-of select="$secondary.person.sep"/>
  508. </xsl:otherwise>
  509. </xsl:choose>
  510. </xsl:for-each>
  511. </xsl:template>
  512. <xsl:template match="bibliomisc[@role='secondary']" mode="iso690.mode">
  513. <xsl:apply-templates mode="iso690.mode"/>
  514. </xsl:template>
  515. <!-- Edition -->
  516. <xsl:template name="iso690.edition">
  517. <xsl:param name="after"/>
  518. <xsl:param name="edition.serial.sep">
  519. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'edition.serial.sep'"/></xsl:call-template>
  520. </xsl:param>
  521. <xsl:choose>
  522. <xsl:when test="string($after)!=''">
  523. <xsl:apply-templates mode="iso690.mode" select="./edition">
  524. <xsl:with-param name="sep" select="$edition.serial.sep"/>
  525. </xsl:apply-templates>
  526. </xsl:when>
  527. <xsl:otherwise>
  528. <xsl:apply-templates mode="iso690.mode" select="./edition"/>
  529. </xsl:otherwise>
  530. </xsl:choose>
  531. </xsl:template>
  532. <xsl:template match="edition" mode="iso690.mode">
  533. <xsl:param name="sep">
  534. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'edition.sep'"/></xsl:call-template>
  535. </xsl:param>
  536. <xsl:apply-templates mode="iso690.mode"/>
  537. <xsl:call-template name="iso690.endsep">
  538. <xsl:with-param name="text" select="string(.)"/>
  539. <xsl:with-param name="sep" select="$sep"/>
  540. </xsl:call-template>
  541. </xsl:template>
  542. <!-- Issue designation (date and/or num) -->
  543. <xsl:template name="iso690.issuing">
  544. <xsl:param name="issuing.div">
  545. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.div'"/></xsl:call-template>
  546. </xsl:param>
  547. <xsl:param name="issuing.range">
  548. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.range'"/></xsl:call-template>
  549. </xsl:param>
  550. <xsl:param name="issuing.sep">
  551. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.sep'"/></xsl:call-template>
  552. </xsl:param>
  553. <xsl:choose>
  554. <xsl:when test="./pubdate[@role='issuing'] and ./volumenum[2] and ./issuenum[2]">
  555. <xsl:call-template name="iso690.issuedate"/>
  556. <xsl:apply-templates mode="iso690.mode" select="./volumenum[1]">
  557. <xsl:with-param name="sep" select="$issuing.div"/>
  558. </xsl:apply-templates>
  559. <xsl:apply-templates mode="iso690.mode" select="./issuenum[1]">
  560. <xsl:with-param name="sep" select="$issuing.range"/>
  561. </xsl:apply-templates>
  562. <xsl:apply-templates mode="iso690.mode" select="./volumenum[2]">
  563. <xsl:with-param name="sep" select="$issuing.div"/>
  564. </xsl:apply-templates>
  565. <xsl:apply-templates mode="iso690.mode" select="./issuenum[2]">
  566. <xsl:with-param name="sep" select="$issuing.sep"/>
  567. </xsl:apply-templates>
  568. </xsl:when>
  569. <xsl:when test="./pubdate[@role='issuing'] and ./volumenum[2]">
  570. <xsl:call-template name="iso690.issuedate"/>
  571. <xsl:apply-templates mode="iso690.mode" select="./volumenum[1]">
  572. <xsl:with-param name="sep" select="$issuing.range"/>
  573. </xsl:apply-templates>
  574. <xsl:apply-templates mode="iso690.mode" select="./volumenum[2]">
  575. <xsl:with-param name="sep" select="$issuing.sep"/>
  576. </xsl:apply-templates>
  577. </xsl:when>
  578. <xsl:when test="./pubdate[@role='issuing'] and ./volumenum and ./issuenum">
  579. <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing']">
  580. <xsl:with-param name="sep" select="$issuing.div"/>
  581. </xsl:apply-templates>
  582. <xsl:apply-templates mode="iso690.mode" select="./volumenum">
  583. <xsl:with-param name="sep" select="$issuing.div"/>
  584. </xsl:apply-templates>
  585. <xsl:apply-templates mode="iso690.mode" select="./issuenum">
  586. <xsl:with-param name="sep" select="$issuing.sep"/>
  587. </xsl:apply-templates>
  588. </xsl:when>
  589. <xsl:when test="./pubdate[@role='issuing']">
  590. <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing']">
  591. <xsl:with-param name="sep" select="$issuing.sep"/>
  592. </xsl:apply-templates>
  593. </xsl:when>
  594. <xsl:when test="./volumenum">
  595. <xsl:apply-templates mode="iso690.mode" select="./volumenum">
  596. <xsl:with-param name="sep" select="$issuing.sep"/>
  597. </xsl:apply-templates>
  598. </xsl:when>
  599. <xsl:when test="./issuenum">
  600. <xsl:apply-templates mode="iso690.mode" select="./issuenum">
  601. <xsl:with-param name="sep" select="$issuing.sep"/>
  602. </xsl:apply-templates>
  603. </xsl:when>
  604. </xsl:choose>
  605. </xsl:template>
  606. <xsl:template name="iso690.issuedate">
  607. <xsl:param name="issuing.div">
  608. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.div'"/></xsl:call-template>
  609. </xsl:param>
  610. <xsl:param name="issuing.range">
  611. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.range'"/></xsl:call-template>
  612. </xsl:param>
  613. <xsl:param name="issuing.sep">
  614. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issuing.sep'"/></xsl:call-template>
  615. </xsl:param>
  616. <xsl:choose>
  617. <xsl:when test="./pubdate[@role='issuing'][2]">
  618. <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing'][1]">
  619. <xsl:with-param name="sep" select="$issuing.range"/>
  620. </xsl:apply-templates>
  621. <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing'][2]">
  622. <xsl:with-param name="sep" select="$issuing.div"/>
  623. </xsl:apply-templates>
  624. </xsl:when>
  625. <xsl:otherwise>
  626. <xsl:apply-templates mode="iso690.mode" select="./pubdate[@role='issuing']">
  627. <xsl:with-param name="sep" select="$issuing.div"/>
  628. </xsl:apply-templates>
  629. </xsl:otherwise>
  630. </xsl:choose>
  631. </xsl:template>
  632. <xsl:template match="pubdate[@role='issuing']" mode="iso690.mode">
  633. <xsl:param name="sep"/>
  634. <xsl:variable name="substr" select="substring(string(.),string-length(string(.)))"/>
  635. <xsl:apply-templates mode="iso690.mode"/>
  636. <xsl:call-template name="iso690.space">
  637. <xsl:with-param name="text" select="$substr"/>
  638. </xsl:call-template>
  639. <xsl:choose>
  640. <xsl:when test="$substr='-'">
  641. <xsl:call-template name="iso690.endsep">
  642. <xsl:with-param name="text" select="' '"/>
  643. <xsl:with-param name="sep" select="$sep"/>
  644. </xsl:call-template>
  645. </xsl:when>
  646. <xsl:otherwise>
  647. <xsl:call-template name="iso690.endsep">
  648. <xsl:with-param name="text" select="string(.)"/>
  649. <xsl:with-param name="sep" select="$sep"/>
  650. </xsl:call-template>
  651. </xsl:otherwise>
  652. </xsl:choose>
  653. </xsl:template>
  654. <!-- Numeration of the part -->
  655. <xsl:template name="iso690.partnr">
  656. <xsl:param name="partnr.sep">
  657. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'partnr.sep'"/></xsl:call-template>
  658. </xsl:param>
  659. <xsl:apply-templates mode="iso690.mode" select="./volumenum">
  660. <xsl:with-param name="sep" select="$partnr.sep"/>
  661. </xsl:apply-templates>
  662. </xsl:template>
  663. <!-- Place of publication, Publisher, Year/Date of publication, Date of update/revision, Date of citation -->
  664. <xsl:template name="iso690.pub">
  665. <xsl:param name="onlydate" select="0"/>
  666. <xsl:param name="placesep">
  667. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'placepubl.sep'"/></xsl:call-template>
  668. </xsl:param>
  669. <xsl:param name="pubsep">
  670. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'publyear.sep'"/></xsl:call-template>
  671. </xsl:param>
  672. <xsl:param name="endsep">
  673. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'pubinfo.sep'"/></xsl:call-template>
  674. </xsl:param>
  675. <xsl:choose>
  676. <xsl:when test="(./publisher/publishername|./publishername|./publisher/address/city)and($onlydate=0)and(./pubdate[not(@role='issuing')]|./copyright/year|./date[@role='upd']|./date[@role='upd'])">
  677. <xsl:apply-templates mode="iso690.mode" select="./publisher/address/city">
  678. <xsl:with-param name="sep" select="$placesep"/>
  679. </xsl:apply-templates>
  680. <xsl:apply-templates mode="iso690.mode" select="./publisher/publishername|./publishername">
  681. <xsl:with-param name="sep" select="$pubsep"/>
  682. </xsl:apply-templates>
  683. <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]|./copyright/year">
  684. <xsl:with-param name="sep" select="$endsep"/>
  685. </xsl:apply-templates>
  686. <xsl:if test="not(./pubdate[not(@role='issuing')]|./copyright/year)">
  687. <xsl:call-template name="iso690.data">
  688. <xsl:with-param name="sep" select="$endsep"/>
  689. </xsl:call-template>
  690. </xsl:if>
  691. </xsl:when>
  692. <xsl:when test="(./publisher/publishername|./publishername)and(./publisher/address/city)and($onlydate=0)">
  693. <xsl:apply-templates mode="iso690.mode" select="./publisher/address/city">
  694. <xsl:with-param name="sep" select="$placesep"/>
  695. </xsl:apply-templates>
  696. <xsl:apply-templates mode="iso690.mode" select="./publisher/publishername|./publishername">
  697. <xsl:with-param name="sep" select="$endsep"/>
  698. </xsl:apply-templates>
  699. </xsl:when>
  700. <xsl:when test="($onlydate=1)or(./pubdate[not(@role='issuing')]|./copyright/year)">
  701. <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]|./copyright/year">
  702. <xsl:with-param name="sep" select="$endsep"/>
  703. </xsl:apply-templates>
  704. <xsl:if test="$onlydate=1">
  705. <xsl:call-template name="iso690.location">
  706. <xsl:with-param name="onlypages" select="1"/>
  707. </xsl:call-template>
  708. </xsl:if>
  709. </xsl:when>
  710. <xsl:when test="not(./pubdate[not(@role='issuing')]|./copyright/year)">
  711. <xsl:call-template name="iso690.data">
  712. <xsl:with-param name="sep" select="$endsep"/>
  713. </xsl:call-template>
  714. </xsl:when>
  715. </xsl:choose>
  716. </xsl:template>
  717. <xsl:template name="iso690.paper.pub">
  718. <xsl:param name="spec.pubinfo.sep">
  719. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'spec.pubinfo.sep'"/></xsl:call-template>
  720. </xsl:param>
  721. <xsl:choose>
  722. <xsl:when test="./volumnum|./issuenum|./pagenums">
  723. <xsl:call-template name="iso690.pub">
  724. <xsl:with-param name="endsep" select="$spec.pubinfo.sep"/>
  725. </xsl:call-template>
  726. </xsl:when>
  727. <xsl:otherwise>
  728. <xsl:call-template name="iso690.pub"/>
  729. </xsl:otherwise>
  730. </xsl:choose>
  731. </xsl:template>
  732. <xsl:template name="iso690.data">
  733. <xsl:param name="sep"/>
  734. <xsl:param name="datecit2">
  735. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'datecit2'"/></xsl:call-template>
  736. </xsl:param>
  737. <xsl:apply-templates mode="iso690.mode" select="./date[@role='upd']">
  738. <xsl:with-param name="sep"/>
  739. </xsl:apply-templates>
  740. <xsl:apply-templates mode="iso690.mode" select="./date[@role='cit']"/>
  741. <xsl:choose>
  742. <xsl:when test="./date[@role='cit']">
  743. <xsl:call-template name="iso690.endsep">
  744. <xsl:with-param name="text" select="$datecit2"/>
  745. <xsl:with-param name="sep" select="$sep"/>
  746. </xsl:call-template>
  747. </xsl:when>
  748. <xsl:when test="./date[@role='upd']">
  749. <xsl:call-template name="iso690.endsep">
  750. <xsl:with-param name="text" select="string(./date[@role='upd'])"/>
  751. <xsl:with-param name="sep" select="$sep"/>
  752. </xsl:call-template>
  753. </xsl:when>
  754. </xsl:choose>
  755. </xsl:template>
  756. <xsl:template match="publisher/address/city|publishername" mode="iso690.mode">
  757. <xsl:param name="sep"/>
  758. <xsl:param name="upd" select="0"/>
  759. <xsl:apply-templates mode="iso690.mode"/>
  760. <xsl:call-template name="iso690.endsep">
  761. <xsl:with-param name="text" select="string(.)"/>
  762. <xsl:with-param name="sep" select="$sep"/>
  763. </xsl:call-template>
  764. </xsl:template>
  765. <xsl:template match="pubdate|copyright/year" mode="iso690.mode">
  766. <xsl:param name="sep"/>
  767. <xsl:param name="upd" select="1"/>
  768. <xsl:param name="datecit2">
  769. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'datecit2'"/></xsl:call-template>
  770. </xsl:param>
  771. <xsl:variable name="substr" select="substring(string(.),string-length(string(.)))"/>
  772. <xsl:if test="name(.)!='pubdate'">
  773. <xsl:value-of select="'&#169;'"/><!-- copyright -->
  774. </xsl:if>
  775. <xsl:apply-templates mode="iso690.mode"/>
  776. <xsl:call-template name="iso690.space">
  777. <xsl:with-param name="text" select="$substr"/>
  778. </xsl:call-template>
  779. <xsl:if test="$upd!=0">
  780. <xsl:choose>
  781. <xsl:when test="name(.)='pubdate'">
  782. <xsl:apply-templates mode="iso690.mode" select="../date[@role='upd']"/>
  783. <xsl:apply-templates mode="iso690.mode" select="../date[@role='cit']"/>
  784. </xsl:when>
  785. <xsl:otherwise>
  786. <xsl:apply-templates mode="iso690.mode" select="../../date[@role='upd']"/>
  787. <xsl:apply-templates mode="iso690.mode" select="../../date[@role='cit']"/>
  788. </xsl:otherwise>
  789. </xsl:choose>
  790. </xsl:if>
  791. <xsl:choose>
  792. <xsl:when test="../date[@role='cit']|../../date[@role='cit'] and $upd!=0">
  793. <xsl:call-template name="iso690.endsep">
  794. <xsl:with-param name="text" select="$datecit2"/>
  795. <xsl:with-param name="sep" select="$sep"/>
  796. </xsl:call-template>
  797. </xsl:when>
  798. <xsl:when test="../date[@role='upd']|../../date[@role='upd'] and $upd!=0">
  799. <xsl:call-template name="iso690.endsep">
  800. <xsl:with-param name="text" select="string(../date[@role='upd'])"/>
  801. <xsl:with-param name="sep" select="$sep"/>
  802. </xsl:call-template>
  803. </xsl:when>
  804. <xsl:when test="$substr='-'">
  805. <xsl:call-template name="iso690.endsep">
  806. <xsl:with-param name="text" select="' '"/>
  807. <xsl:with-param name="sep" select="$sep"/>
  808. </xsl:call-template>
  809. </xsl:when>
  810. <xsl:otherwise>
  811. <xsl:call-template name="iso690.endsep">
  812. <xsl:with-param name="text" select="string(.)"/>
  813. <xsl:with-param name="sep" select="$sep"/>
  814. </xsl:call-template>
  815. </xsl:otherwise>
  816. </xsl:choose>
  817. </xsl:template>
  818. <xsl:template name="iso690.space">
  819. <xsl:param name="text" select="substring(string(.),string-length(string(.)))"/>
  820. <xsl:if test="$text='-'">
  821. <xsl:value-of select="' '"/>
  822. </xsl:if>
  823. </xsl:template>
  824. <!-- Date of update/revision -->
  825. <xsl:template match="date[@role='upd']" mode="iso690.mode">
  826. <xsl:param name="sep">
  827. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'upd.sep'"/></xsl:call-template>
  828. </xsl:param>
  829. <xsl:value-of select="$sep"/>
  830. <xsl:apply-templates mode="iso690.mode"/>
  831. </xsl:template>
  832. <!-- Date of citation -->
  833. <xsl:template match="date[@role='cit']" mode="iso690.mode">
  834. <xsl:param name="datecit1">
  835. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'datecit1'"/></xsl:call-template>
  836. </xsl:param>
  837. <xsl:param name="datecit2">
  838. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'datecit2'"/></xsl:call-template>
  839. </xsl:param>
  840. <xsl:value-of select="$datecit1"/>
  841. <xsl:apply-templates mode="iso690.mode"/>
  842. <xsl:value-of select="$datecit2"/>
  843. </xsl:template>
  844. <!-- Extent -->
  845. <xsl:template name="iso690.extent">
  846. <xsl:param name="extent.sep">
  847. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'extent.sep'"/></xsl:call-template>
  848. </xsl:param>
  849. <xsl:apply-templates mode="iso690.mode" select="./pagenums">
  850. <xsl:with-param name="sep" select="$extent.sep"/>
  851. </xsl:apply-templates>
  852. </xsl:template>
  853. <!-- Location within host -->
  854. <xsl:template name="iso690.part.location">
  855. <xsl:param name="location.sep">
  856. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template>
  857. </xsl:param>
  858. <xsl:choose>
  859. <xsl:when test="./pagenums">
  860. <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='secnum']"/>
  861. <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='sectitle']"/>
  862. <xsl:apply-templates mode="iso690.mode" select="./pagenums"/>
  863. </xsl:when>
  864. <xsl:when test="./bibliomisc[@role='sectitle']">
  865. <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='secnum']"/>
  866. <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='sectitle']">
  867. <xsl:with-param name="sep" select="$location.sep"/>
  868. </xsl:apply-templates>
  869. </xsl:when>
  870. <xsl:otherwise>
  871. <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='secnum']">
  872. <xsl:with-param name="sep" select="$location.sep"/>
  873. </xsl:apply-templates>
  874. </xsl:otherwise>
  875. </xsl:choose>
  876. </xsl:template>
  877. <xsl:template name="iso690.article.location">
  878. <xsl:param name="location.sep">
  879. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template>
  880. </xsl:param>
  881. <xsl:param name="locs.sep">
  882. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'locs.sep'"/></xsl:call-template>
  883. </xsl:param>
  884. <xsl:choose>
  885. <xsl:when test="not(./date[@role='upd']|./date[@role='cit'])">
  886. <xsl:choose>
  887. <xsl:when test="./volumenum|./issuenum|./pagenums">
  888. <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
  889. <xsl:with-param name="upd" select="0"/>
  890. <xsl:with-param name="sep" select="$locs.sep"/>
  891. </xsl:apply-templates>
  892. <xsl:call-template name="iso690.location"/>
  893. </xsl:when>
  894. <xsl:otherwise>
  895. <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
  896. <xsl:with-param name="sep" select="$location.sep"/>
  897. </xsl:apply-templates>
  898. </xsl:otherwise>
  899. </xsl:choose>
  900. </xsl:when>
  901. <xsl:otherwise>
  902. <xsl:choose>
  903. <xsl:when test="./volumenum|./issuenum|./pagenums">
  904. <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
  905. <xsl:with-param name="upd" select="0"/>
  906. <xsl:with-param name="sep" select="$locs.sep"/>
  907. </xsl:apply-templates>
  908. </xsl:when>
  909. <xsl:otherwise>
  910. <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
  911. <xsl:with-param name="upd" select="0"/>
  912. <xsl:with-param name="sep" select="$location.sep"/>
  913. </xsl:apply-templates>
  914. </xsl:otherwise>
  915. </xsl:choose>
  916. <xsl:choose>
  917. <xsl:when test="./issuenum">
  918. <xsl:apply-templates mode="iso690.mode" select="./volumenum"/>
  919. <xsl:apply-templates mode="iso690.mode" select="./issuenum">
  920. <xsl:with-param name="sep"/>
  921. </xsl:apply-templates>
  922. </xsl:when>
  923. <xsl:otherwise>
  924. <xsl:apply-templates mode="iso690.mode" select="./volumenum">
  925. <xsl:with-param name="sep"/>
  926. </xsl:apply-templates>
  927. </xsl:otherwise>
  928. </xsl:choose>
  929. <xsl:choose>
  930. <xsl:when test="./pagenums">
  931. <xsl:call-template name="iso690.data">
  932. <xsl:with-param name="sep" select="$locs.sep"/>
  933. </xsl:call-template>
  934. <xsl:apply-templates mode="iso690.mode" select="./pagenums"/>
  935. </xsl:when>
  936. <xsl:otherwise>
  937. <xsl:call-template name="iso690.data">
  938. <xsl:with-param name="sep" select="$location.sep"/>
  939. </xsl:call-template>
  940. </xsl:otherwise>
  941. </xsl:choose>
  942. </xsl:otherwise>
  943. </xsl:choose>
  944. </xsl:template>
  945. <xsl:template name="iso690.location">
  946. <xsl:param name="location.sep">
  947. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template>
  948. </xsl:param>
  949. <xsl:choose>
  950. <xsl:when test="./volumenum and not(./issuenum) and not(./pagenums)">
  951. <xsl:apply-templates mode="iso690.mode" select="./volumenum">
  952. <xsl:with-param name="sep" select="$location.sep"/>
  953. </xsl:apply-templates>
  954. </xsl:when>
  955. <xsl:when test="./issuenum and not(./pagenums)">
  956. <xsl:apply-templates mode="iso690.mode" select="./volumenum"/>
  957. <xsl:apply-templates mode="iso690.mode" select="./issuenum">
  958. <xsl:with-param name="sep" select="$location.sep"/>
  959. </xsl:apply-templates>
  960. </xsl:when>
  961. <xsl:when test="./pagenums">
  962. <xsl:apply-templates mode="iso690.mode" select="./volumenum"/>
  963. <xsl:apply-templates mode="iso690.mode" select="./issuenum"/>
  964. <xsl:apply-templates mode="iso690.mode" select="./pagenums"/>
  965. </xsl:when>
  966. </xsl:choose>
  967. </xsl:template>
  968. <xsl:template match="bibliomisc[@role='secnum']|bibliomisc[@role='sectitle']" mode="iso690.mode">
  969. <xsl:param name="sep">
  970. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'locs.sep'"/></xsl:call-template>
  971. </xsl:param>
  972. <xsl:apply-templates mode="iso690.mode"/>
  973. <xsl:call-template name="iso690.endsep">
  974. <xsl:with-param name="text" select="string(.)"/>
  975. <xsl:with-param name="sep" select="$sep"/>
  976. </xsl:call-template>
  977. </xsl:template>
  978. <xsl:template match="volumenum|issuenum" mode="iso690.mode">
  979. <xsl:param name="sep">
  980. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'locs.sep'"/></xsl:call-template>
  981. </xsl:param>
  982. <xsl:apply-templates mode="iso690.mode"/>
  983. <xsl:call-template name="iso690.endsep">
  984. <xsl:with-param name="text" select="string(.)"/>
  985. <xsl:with-param name="sep" select="$sep"/>
  986. </xsl:call-template>
  987. </xsl:template>
  988. <xsl:template match="pagenums" mode="iso690.mode">
  989. <xsl:param name="sep">
  990. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'location.sep'"/></xsl:call-template>
  991. </xsl:param>
  992. <xsl:apply-templates mode="iso690.mode"/>
  993. <xsl:call-template name="iso690.endsep">
  994. <xsl:with-param name="text" select="string(.)"/>
  995. <xsl:with-param name="sep" select="$sep"/>
  996. </xsl:call-template>
  997. </xsl:template>
  998. <!-- Series -->
  999. <xsl:template name="iso690.serie">
  1000. <xsl:apply-templates mode="iso690.mode" select=".//bibliomisc[@role='serie']"/>
  1001. </xsl:template>
  1002. <!-- Notes -->
  1003. <xsl:template name="iso690.notice">
  1004. <xsl:apply-templates mode="iso690.mode" select=".//bibliomisc[not(@role)]"/>
  1005. </xsl:template>
  1006. <xsl:template match="bibliomisc[not(@role)]|bibliomisc[@role='serie']" mode="iso690.mode">
  1007. <xsl:param name="notice.sep">
  1008. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'notice.sep'"/></xsl:call-template>
  1009. </xsl:param>
  1010. <xsl:apply-templates mode="iso690.mode"/>
  1011. <xsl:call-template name="iso690.endsep">
  1012. <xsl:with-param name="text" select="string(.)"/>
  1013. <xsl:with-param name="sep" select="$notice.sep"/>
  1014. </xsl:call-template>
  1015. </xsl:template>
  1016. <!-- Avaibility and access -->
  1017. <xsl:template name="iso690.access">
  1018. <xsl:for-each select="./biblioid[@class='uri']|./bibliomisc[@role='access']">
  1019. <xsl:choose>
  1020. <xsl:when test="position()=1">
  1021. <xsl:apply-templates mode="iso690.mode" select="."/>
  1022. </xsl:when>
  1023. <xsl:otherwise>
  1024. <xsl:apply-templates mode="iso690.mode" select=".">
  1025. <xsl:with-param name="firstacc" select="0"/>
  1026. </xsl:apply-templates>
  1027. </xsl:otherwise>
  1028. </xsl:choose>
  1029. </xsl:for-each>
  1030. </xsl:template>
  1031. <xsl:template match="biblioid[@class='uri']/ulink|bibliomisc[@role='access']/ulink" mode="iso690.mode">
  1032. <xsl:param name="link1">
  1033. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'link1'"/></xsl:call-template>
  1034. </xsl:param>
  1035. <xsl:param name="link2">
  1036. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'link2'"/></xsl:call-template>
  1037. </xsl:param>
  1038. <xsl:value-of select="$link1"/>
  1039. <xsl:call-template name="ulink"/>
  1040. <xsl:value-of select="$link2"/>
  1041. </xsl:template>
  1042. <xsl:template match="biblioid[@class='uri']|bibliomisc[@role='access']" mode="iso690.mode">
  1043. <xsl:param name="firstacc" select="1"/>
  1044. <xsl:param name="access">
  1045. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'access'"/></xsl:call-template>
  1046. </xsl:param>
  1047. <xsl:param name="acctoo">
  1048. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'acctoo'"/></xsl:call-template>
  1049. </xsl:param>
  1050. <xsl:param name="onwww">
  1051. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'onwww'"/></xsl:call-template>
  1052. </xsl:param>
  1053. <xsl:param name="oninet">
  1054. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'oninet'"/></xsl:call-template>
  1055. </xsl:param>
  1056. <xsl:param name="access.end">
  1057. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'access.end'"/></xsl:call-template>
  1058. </xsl:param>
  1059. <xsl:param name="access.sep">
  1060. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'access.sep'"/></xsl:call-template>
  1061. </xsl:param>
  1062. <xsl:choose>
  1063. <xsl:when test="$firstacc=1">
  1064. <xsl:value-of select="$access"/>
  1065. </xsl:when>
  1066. <xsl:otherwise>
  1067. <xsl:value-of select="$acctoo"/>
  1068. </xsl:otherwise>
  1069. </xsl:choose>
  1070. <xsl:choose>
  1071. <xsl:when test="(./ulink)and(string(./ulink)=string(.))">
  1072. <xsl:choose>
  1073. <xsl:when test="(starts-with(./ulink/@url,'http://')or(starts-with(./ulink/@url,'https://')))">
  1074. <xsl:value-of select="$onwww"/>
  1075. <xsl:value-of select="$access.end"/>
  1076. <xsl:apply-templates mode="iso690.mode" select="./ulink"/>
  1077. </xsl:when>
  1078. <xsl:otherwise>
  1079. <xsl:value-of select="$oninet"/>
  1080. <xsl:value-of select="$access.end"/>
  1081. <xsl:apply-templates mode="iso690.mode" select="./ulink"/>
  1082. </xsl:otherwise>
  1083. </xsl:choose>
  1084. </xsl:when>
  1085. <xsl:when test="(./ulink)and(string(./ulink)!=string(.))">
  1086. <xsl:value-of select="text()[1]"/>
  1087. <xsl:call-template name="iso690.endsep">
  1088. <xsl:with-param name="text" select="text()[1]"/>
  1089. <xsl:with-param name="sep" select="$access.end"/>
  1090. </xsl:call-template>
  1091. <xsl:apply-templates mode="iso690.mode" select="./ulink"/>
  1092. </xsl:when>
  1093. <xsl:otherwise>
  1094. <xsl:apply-templates mode="iso690.mode"/>
  1095. </xsl:otherwise>
  1096. </xsl:choose>
  1097. <xsl:value-of select="$access.sep"/>
  1098. </xsl:template>
  1099. <!-- Standard number - ISBN -->
  1100. <xsl:template name="iso690.isbn">
  1101. <xsl:choose>
  1102. <xsl:when test="./biblioid/@class='isbn'">
  1103. <xsl:apply-templates mode="iso690.mode" select="./biblioid[@class='isbn']"/>
  1104. </xsl:when>
  1105. <xsl:when test="./isbn">
  1106. <xsl:apply-templates mode="iso690.mode" select="./isbn"/>
  1107. </xsl:when>
  1108. </xsl:choose>
  1109. </xsl:template>
  1110. <xsl:template match="isbn|biblioid[@class='isbn']" mode="iso690.mode">
  1111. <xsl:param name="isbn">
  1112. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'isbn'"/></xsl:call-template>
  1113. </xsl:param>
  1114. <xsl:param name="stdnum.sep">
  1115. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'stdnum.sep'"/></xsl:call-template>
  1116. </xsl:param>
  1117. <xsl:value-of select="$isbn"/>
  1118. <xsl:apply-templates mode="iso690.mode"/>
  1119. <xsl:value-of select="$stdnum.sep"/>
  1120. </xsl:template>
  1121. <!-- Standard number - ISSN -->
  1122. <xsl:template name="iso690.issn">
  1123. <xsl:choose>
  1124. <xsl:when test="./biblioid/@class='issn'">
  1125. <xsl:apply-templates mode="iso690.mode" select="./biblioid[@class='issn']"/>
  1126. </xsl:when>
  1127. <xsl:when test="./issn">
  1128. <xsl:apply-templates mode="iso690.mode" select="./issn"/>
  1129. </xsl:when>
  1130. </xsl:choose>
  1131. </xsl:template>
  1132. <xsl:template match="issn|biblioid[@class='issn']" mode="iso690.mode">
  1133. <xsl:param name="issn">
  1134. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'issn'"/></xsl:call-template>
  1135. </xsl:param>
  1136. <xsl:param name="stdnum.sep">
  1137. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'stdnum.sep'"/></xsl:call-template>
  1138. </xsl:param>
  1139. <xsl:value-of select="$issn"/>
  1140. <xsl:apply-templates mode="iso690.mode"/>
  1141. <xsl:value-of select="$stdnum.sep"/>
  1142. </xsl:template>
  1143. <!-- Identification of patent document -->
  1144. <xsl:template name="iso690.pat.ident">
  1145. <xsl:param name="patdate.sep">
  1146. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'patdate.sep'"/></xsl:call-template>
  1147. </xsl:param>
  1148. <xsl:apply-templates mode="iso690.mode" select="./address/country"/>
  1149. <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='patenttype']"/>
  1150. <xsl:choose>
  1151. <xsl:when test="./biblioid[@class='other' and @otherclass='patentnum']">
  1152. <xsl:apply-templates mode="iso690.mode" select="./biblioid[@class='other' and @otherclass='patentnum']"/>
  1153. </xsl:when>
  1154. <xsl:otherwise>
  1155. <xsl:apply-templates mode="iso690.mode" select="./bibliomisc[@role='patentnum']"/>
  1156. </xsl:otherwise>
  1157. </xsl:choose>
  1158. <xsl:apply-templates mode="iso690.mode" select="./pubdate[not(@role='issuing')]">
  1159. <xsl:with-param name="sep" select="$patdate.sep"/>
  1160. </xsl:apply-templates>
  1161. </xsl:template>
  1162. <!-- Country or issuing office -->
  1163. <xsl:template match="address/country" mode="iso690.mode">
  1164. <xsl:param name="patcountry.sep">
  1165. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'patcountry.sep'"/></xsl:call-template>
  1166. </xsl:param>
  1167. <i>
  1168. <xsl:apply-templates mode="iso690.mode"/>
  1169. </i>
  1170. <xsl:value-of select="$patcountry.sep"/>
  1171. </xsl:template>
  1172. <!-- Kind of patent document -->
  1173. <xsl:template match="bibliomisc[@role='patenttype']" mode="iso690.mode">
  1174. <xsl:param name="pattype.sep">
  1175. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'pattype.sep'"/></xsl:call-template>
  1176. </xsl:param>
  1177. <i>
  1178. <xsl:apply-templates mode="iso690.mode"/>
  1179. </i>
  1180. <xsl:value-of select="$pattype.sep"/>
  1181. </xsl:template>
  1182. <!-- Number -->
  1183. <xsl:template match="biblioid[@class='other' and @otherclass='patentnum']|bibliomisc[@role='patentnum']" mode="iso690.mode">
  1184. <xsl:param name="patnum.sep">
  1185. <xsl:call-template name="gentext.template"><xsl:with-param name="context" select="'iso690'"/><xsl:with-param name="name" select="'patnum.sep'"/></xsl:call-template>
  1186. </xsl:param>
  1187. <xsl:apply-templates mode="iso690.mode"/>
  1188. <xsl:value-of select="$patnum.sep"/>
  1189. </xsl:template>
  1190. <!-- ==================================================================== -->
  1191. <!-- Supplementary templates -->
  1192. <xsl:template name="iso690.endsep">
  1193. <xsl:param name="text"/>
  1194. <xsl:param name="sep" select=". "/>
  1195. <xsl:choose>
  1196. <xsl:when test="substring($text,string-length($text))!=substring($sep,1,1)">
  1197. <xsl:value-of select="$sep"/>
  1198. </xsl:when>
  1199. <xsl:when test="substring($text,string-length($text))=' '">
  1200. </xsl:when>
  1201. <xsl:otherwise>
  1202. <xsl:value-of select="' '"/>
  1203. </xsl:otherwise>
  1204. </xsl:choose>
  1205. </xsl:template>
  1206. <!-- ==================================================================== -->
  1207. <xsl:template match="*" mode="iso690.mode">
  1208. <xsl:apply-templates select="."/><!-- try the default mode -->
  1209. </xsl:template>
  1210. <!-- ==================================================================== -->
  1211. </xsl:stylesheet>