source: trunk/biblioentry_xml.xsl @ 74

Last change on this file since 74 was 74, checked in by pinsard, 16 years ago

add documents in before.sh, add -l parameter in install.sh, several improvement for bibtex bibliography

  • Property svn:keywords set to Id
File size: 24.8 KB
Line 
1<?xml version="1.0" encoding="iso-8859-1"?>
2<xsl:stylesheet
3version="1.0"
4xmlns:d="http://docbook.org/ns/docbook"
5xmlns:xl="http://www.w3.org/1999/xlink"
6xmlns:html="http://www.w3.org/1999/xhtml"
7xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
8
9<!--
10module :
11traitement d'une référence bibliographique (biblioentry)
12
13update :
14$Id$
15fplod 2008-05-15T09:18:54Z aedon.locean-ipsl.upmc.fr (Darwin)
16correction on separators between authors for bibtex
17fplod 2008-05-14T08:51:10Z aedon.locean-ipsl.upmc.fr (Darwin)
18introducting bibtex (latex) output
19fplod 2008-05-13T15:24:49Z aedon.locean-ipsl.upmc.fr (Darwin)
20add parameter type (default raw)
21fplod 2008-05-13T09:17:14Z aedon.locean-ipsl.upmc.fr (Darwin)
22bibliomisc is written after biblioid
23fplod 2008-05-07T09:06:53Z aedon.locean-ipsl.upmc.fr (Darwin)
24improvements for conference
25fplod 2008-05-06T09:35:00Z aedon.locean-ipsl.upmc.fr (Darwin)
26add category choices
27fplod 2008-04-29T15:41:56Z aedon.locean-ipsl.upmc.fr (Darwin)
28chgt for dbk5 in
29fplod 2008-04-29T09:10:31Z aedon.locean-ipsl.upmc.fr (Darwin)
30chgt for dbk5 out
31fplod 2007-06-20T17:18:02Z aedon.locean-ipsl.upmc.fr (Darwin)
32<bibliomisc role="id"> replaced by <biblioid class="doi">
33fplod 2007-05-16T14:01:44Z aedon.locean-ipsl.upmc.fr (Darwin)
34correction in order to write doi only once
35fplod 2007-05-16T10:27:34Z aedon.locean-ipsl.upmc.fr (Darwin)
36remove biblioentry/date and publisher
37add biblioentry/biblioset/bibliomisc
38fplod 2007-05-15T07:37:46Z aedon.locean-ipsl.upmc.fr (Darwin)
39factorisation de biblioentry
40fplod 2007-05-14T15:48:04Z aedon.locean-ipsl.upmc.fr (Darwin)
41correction to add biblioentry/date (replace biblioentry/biblioset/pubdate)
42when "in press"
43fplod 2007-05-04T07:59:34Z aedon.locean-ipsl.upmc.fr (Darwin)
44factorisation de bibnemomaf01_xml.xsl, bibnemomaf02_xml.xsl,bibnemomaf04_xml.xsl
45-->
46
47<xsl:include href="correction_db.xsl"/>
48<xsl:include href="category_form.xsl"/>
49<xsl:include href="message_lang.xsl"/>
50
51<xsl:template name="one_biblioentry">
52 <xsl:param name="visu_modif"/>
53 <xsl:param name="type"/>
54 <xsl:param name="my_biblioentry"/>
55 <xsl:choose>
56  <xsl:when test="$type = 'bibtex'">
57   <xsl:choose>
58    <xsl:when test="$my_biblioentry/descendant::d:biblioset[@relation='journal']">
59     <xsl:text>@article{</xsl:text>
60    </xsl:when>
61    <xsl:when test="$my_biblioentry/descendant::d:biblioset[@relation='conference']">
62     <xsl:text>@inproceedings{</xsl:text>
63    </xsl:when>
64    <xsl:when test="$my_biblioentry/descendant::d:biblioset[@relation='book']">
65     <xsl:text>@book{</xsl:text>
66    </xsl:when>
67    <xsl:when test="$my_biblioentry/descendant::d:biblioset[@relation='manual']">
68     <xsl:text>@manual{</xsl:text>
69    </xsl:when>
70    <xsl:otherwise>
71     <xsl:message terminate="yes">
72eee : unknown biblioset 1 relation for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/>
73eee : <xsl:value-of select="$my_biblioentry/descendant::d:biblioset/@relation"/>
74     </xsl:message>
75    </xsl:otherwise>
76   </xsl:choose>
77   <xsl:value-of select="$my_biblioentry/@xml:id"/>
78  </xsl:when> <!-- end of bibtex specific header for biblioentry -->
79 </xsl:choose>
80 <xsl:element name="listitem">
81  <xsl:element name="para">
82   <xsl:choose>
83    <xsl:when test="$type = 'bibtex'">
84     <xsl:apply-templates select="$my_biblioentry/d:authorgroup" mode="bibtex"/>
85    </xsl:when>
86    <xsl:otherwise>
87     <xsl:apply-templates select="$my_biblioentry/d:authorgroup" mode="raw"/>
88    </xsl:otherwise>
89   </xsl:choose>
90   <xsl:if test="$my_biblioentry/descendant::d:pubdate">
91    <xsl:choose>
92     <xsl:when test="$type = 'bibtex'">
93      <xsl:apply-templates select="$my_biblioentry/descendant::d:pubdate" mode="bibtex"/>
94     </xsl:when>
95     <xsl:otherwise>
96      <xsl:apply-templates select="$my_biblioentry/descendant::d:pubdate" mode="raw"/>
97     </xsl:otherwise>
98    </xsl:choose>
99   </xsl:if>
100    <xsl:if test="$my_biblioentry/descendant::d:date">
101     <xsl:apply-templates select="$my_biblioentry/descendant::d:date"/>
102    </xsl:if>
103   <xsl:choose>
104    <xsl:when test="$type = 'bibtex'">
105     <xsl:apply-templates select="$my_biblioentry/d:title" mode="bibtex"/>
106    </xsl:when>
107    <xsl:otherwise>
108     <xsl:apply-templates select="$my_biblioentry/d:title" mode="raw"/>
109    </xsl:otherwise>
110   </xsl:choose>
111    <xsl:choose>
112     <xsl:when test="$my_biblioentry/descendant::d:biblioset[@relation='journal']">
113      <xsl:choose>
114       <xsl:when test="$type = 'bibtex'">
115        <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset/child::d:title" mode="bibtex"/>
116       </xsl:when>
117       <xsl:otherwise>
118        <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset/child::d:title" mode="raw"/>
119       </xsl:otherwise>
120      </xsl:choose>
121      <xsl:if test="$my_biblioentry/descendant::d:publishername">
122       <xsl:choose>
123        <xsl:when test="$type = 'bibtex'">
124         <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset/child::d:publishername" mode="bibtex"/>
125        </xsl:when>
126        <xsl:otherwise>
127         <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset/child::d:publishername" mode="raw"/>
128        </xsl:otherwise>
129       </xsl:choose>
130      </xsl:if>
131      <xsl:if test="$my_biblioentry/descendant::d:publisher/d:address">
132       <xsl:choose>
133        <xsl:when test="$type = 'bibtex'">
134         <xsl:apply-templates select="$my_biblioentry/descendant::d:publisher/d:address" mode="bibtex"/>
135        </xsl:when>
136        <xsl:otherwise>
137         <xsl:apply-templates select="$my_biblioentry/descendant::d:publisher/d:address" mode="raw"/>
138        </xsl:otherwise>
139       </xsl:choose>
140      </xsl:if>
141      <xsl:if test="$my_biblioentry/descendant::d:volumenum">
142       <xsl:choose>
143        <xsl:when test="$type = 'bibtex'">
144         <xsl:apply-templates select="$my_biblioentry/descendant::d:volumenum" mode="bibtex"/>
145        </xsl:when>
146        <xsl:otherwise>
147         <xsl:apply-templates select="$my_biblioentry/descendant::d:volumenum" mode="raw"/>
148        </xsl:otherwise>
149       </xsl:choose>
150       <xsl:if test="$my_biblioentry/descendant::d:issuenum">
151        <xsl:choose>
152         <xsl:when test="$type = 'bibtex'">
153          <xsl:apply-templates select="$my_biblioentry/descendant::d:issuenum" mode="bibtex"/>
154         </xsl:when>
155         <xsl:otherwise>
156          <xsl:apply-templates select="$my_biblioentry/descendant::d:issuenum" mode="raw"/>
157         </xsl:otherwise>
158        </xsl:choose>
159        </xsl:if>
160       </xsl:if>
161      <xsl:if test="$my_biblioentry/descendant::d:pagenums">
162       <xsl:choose>
163        <xsl:when test="$type = 'bibtex'">
164         <xsl:apply-templates select="$my_biblioentry/descendant::d:pagenums" mode="bibtex"/>
165        </xsl:when>
166        <xsl:otherwise>
167         <xsl:apply-templates select="$my_biblioentry/descendant::d:pagenums" mode="raw"/>
168        </xsl:otherwise>
169       </xsl:choose>
170      </xsl:if>
171      <xsl:if test="$my_biblioentry/d:biblioid">
172       <xsl:choose>
173        <xsl:when test="$type = 'bibtex'">
174         <xsl:apply-templates select="$my_biblioentry/d:biblioid" mode="bibtex"/>
175        </xsl:when>
176        <xsl:otherwise>
177        <xsl:apply-templates select="$my_biblioentry/d:biblioid" mode="raw"/>
178        </xsl:otherwise>
179       </xsl:choose>
180      </xsl:if>
181      <xsl:if test="$my_biblioentry/descendant::d:biblioset/child::d:bibliomisc">
182       <xsl:choose>
183        <xsl:when test="$type = 'bibtex'">
184         <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset/child::d:bibliomisc" mode="bibtex"/>
185        </xsl:when>
186        <xsl:otherwise>
187        <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset/child::d:bibliomisc" mode="raw"/>
188        </xsl:otherwise>
189       </xsl:choose>
190      </xsl:if>
191     </xsl:when>
192     <xsl:when test="$my_biblioentry/descendant::d:biblioset[@relation='conference']">
193      <xsl:choose>
194       <xsl:when test="$type = 'bibtex'">
195        <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset[@relation='conference']/child::d:title" mode="bibtex"/>
196       </xsl:when>
197       <xsl:otherwise>
198        <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset/child::d:title" mode="raw"/>
199       </xsl:otherwise>
200      </xsl:choose>
201      <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset/descendant::d:conftitle"/>
202      <xsl:if test="$my_biblioentry/descendant::d:biblioset/descendant::d:confnum">
203       <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset/descendant::d:confnum"/>
204      </xsl:if>
205      <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset/descendant::d:confdates"/>
206       <xsl:choose>
207        <xsl:when test="$type = 'bibtex'">
208         <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset/descendant::d:address" mode="bibtex"/>
209        </xsl:when>
210        <xsl:otherwise>
211         <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset/descendant::d:address" mode="raw"/>
212        </xsl:otherwise>
213       </xsl:choose>
214       <xsl:choose>
215        <xsl:when test="$type = 'bibtex'">
216         <xsl:apply-templates select="$my_biblioentry/descendant::d:publishername" mode="bibtex"/>
217        </xsl:when>
218        <xsl:otherwise>
219         <xsl:apply-templates select="$my_biblioentry/descendant::d:publishername" mode="raw"/>
220        </xsl:otherwise>
221       </xsl:choose>
222      <xsl:if test="$my_biblioentry/descendant::d:pagenums">
223       <xsl:choose>
224        <xsl:when test="$type = 'bibtex'">
225         <xsl:apply-templates select="$my_biblioentry/descendant::d:pagenums" mode="bibtex"/>
226        </xsl:when>
227        <xsl:otherwise>
228         <xsl:apply-templates select="$my_biblioentry/descendant::d:pagenums" mode="raw"/>
229        </xsl:otherwise>
230       </xsl:choose>
231      </xsl:if>
232     </xsl:when>
233     <xsl:when test="$my_biblioentry/descendant::d:biblioset[@relation='book']">
234      <xsl:choose>
235       <xsl:when test="$type = 'bibtex'">
236        <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset[@relation='book']/child::d:title" mode="bibtex"/>
237       </xsl:when>
238       <xsl:otherwise>
239        <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset/child::d:title" mode="raw"/>
240       </xsl:otherwise>
241      </xsl:choose>
242       <xsl:choose>
243        <xsl:when test="$type = 'bibtex'">
244         <xsl:apply-templates select="$my_biblioentry/descendant::d:publishername" mode="bibtex"/>
245        </xsl:when>
246        <xsl:otherwise>
247         <xsl:apply-templates select="$my_biblioentry/descendant::d:publishername" mode="raw"/>
248        </xsl:otherwise>
249       </xsl:choose>
250      <xsl:if test="$my_biblioentry/descendant::d:pagenums">
251       <xsl:choose>
252        <xsl:when test="$type = 'bibtex'">
253         <xsl:apply-templates select="$my_biblioentry/descendant::d:pagenums" mode="bibtex"/>
254        </xsl:when>
255        <xsl:otherwise>
256         <xsl:apply-templates select="$my_biblioentry/descendant::d:pagenums" mode="raw"/>
257        </xsl:otherwise>
258       </xsl:choose>
259      </xsl:if>
260       <xsl:choose>
261        <xsl:when test="$type = 'bibtex'">
262         <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioid" mode="bibtex"/>
263        </xsl:when>
264        <xsl:otherwise>
265         <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioid" mode="raw"/>
266        </xsl:otherwise>
267       </xsl:choose>
268      </xsl:when>
269     <xsl:when test="$my_biblioentry/descendant::d:biblioset[@relation='manual']">
270      <xsl:choose>
271       <xsl:when test="$type = 'bibtex'">
272        <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset[@relation='manual']/child::d:title" mode="bibtex"/>
273       </xsl:when>
274       <xsl:otherwise>
275        <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset/child::d:title" mode="raw"/>
276       </xsl:otherwise>
277      </xsl:choose>
278       <xsl:choose>
279        <xsl:when test="$type = 'bibtex'">
280         <xsl:apply-templates select="$my_biblioentry/descendant::d:publishername" mode="bibtex"/>
281        </xsl:when>
282        <xsl:otherwise>
283         <xsl:apply-templates select="$my_biblioentry/descendant::d:publishername" mode="raw"/>
284        </xsl:otherwise>
285       </xsl:choose>
286       <xsl:choose>
287        <xsl:when test="$type = 'bibtex'">
288         <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioid" mode="bibtex"/>
289        </xsl:when>
290        <xsl:otherwise>
291         <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioid" mode="raw"/>
292        </xsl:otherwise>
293       </xsl:choose>
294     </xsl:when>
295     <xsl:otherwise>
296      <xsl:message terminate="no">
297eee : unknown biblioset 2 relation for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/>
298eee : <xsl:value-of select="$my_biblioentry/descendant::d:biblioset/@relation"/>
299      </xsl:message>
300       <xsl:choose>
301        <xsl:when test="$type = 'bibtex'">
302         <xsl:apply-templates select="$my_biblioentry/descendant::d:publishername" mode="bibtex"/>
303        </xsl:when>
304        <xsl:otherwise>
305         <xsl:apply-templates select="$my_biblioentry/descendant::d:publishername" mode="raw"/>
306        </xsl:otherwise>
307       </xsl:choose>
308     </xsl:otherwise>
309    </xsl:choose>
310  </xsl:element>
311  <xsl:if test="$visu_modif= 'modif'">
312   <xsl:call-template name="correction">
313    <xsl:with-param name="id" select="$my_biblioentry/@xml:id"/>
314   </xsl:call-template>
315  </xsl:if>
316  <xsl:if test="$visu_modif= 'category'">
317   <xsl:call-template name="category">
318    <xsl:with-param name="id" select="$my_biblioentry/@xml:id"/>
319   </xsl:call-template>
320  </xsl:if>
321 </xsl:element>
322 <xsl:choose>
323  <xsl:when test="$type = 'bibtex'">
324  <xsl:text>}</xsl:text>
325  </xsl:when>
326 </xsl:choose>
327</xsl:template>
328
329<xsl:template match="d:authorgroup" mode="raw">
330 <xsl:apply-templates select="d:author" mode="raw"/>
331 <xsl:apply-templates select="d:corpauthor" mode="raw"/>
332</xsl:template>
333
334<xsl:template match="d:authorgroup" mode="bibtex">
335 <xsl:text>, </xsl:text>
336 <xsl:text>author = {</xsl:text>
337 <xsl:apply-templates select="d:author" mode="bibtex"/>
338 <xsl:apply-templates select="d:corpauthor" mode="bibtex"/>
339 <xsl:text>}</xsl:text>
340</xsl:template>
341
342<xsl:template match="d:author|d:corpauthor" mode="raw">
343<!--
3441er auteur Nom, prénom les autres Prenom Nom
345une virgule entre les auteurs sauf entre les deux derniers
346-->
347  <xsl:if test="d:personname/d:surname = ''">
348   <xsl:message>
349eee : empty surname for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/>
350   </xsl:message>
351  </xsl:if>
352  <xsl:if test="d:personname/d:firstname= ''">
353   <xsl:message>
354eee : empty firstname for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/>
355   </xsl:message>
356  </xsl:if>
357  <xsl:if test="d:personname/d:firstname= '.'">
358   <xsl:message>
359eee : firstname = '.' for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/>
360   </xsl:message>
361  </xsl:if>
362<!--
363   <xsl:message>
364position de l'auteur <xsl:value-of select="d:personname/d:surname"/> :
365<xsl:value-of select="position()"/> / <xsl:value-of select="count(following-sibling::*)"/>
366</xsl:message>
367-->
368
369  <xsl:choose>
370   <xsl:when test="position()=1">
371    <xsl:value-of select="d:personname/d:surname"/><xsl:text>, </xsl:text>
372    <xsl:value-of select="d:personname/d:firstname"/>
373   </xsl:when>
374   <xsl:otherwise>
375    <xsl:value-of select="d:personname/d:firstname"/><xsl:text> </xsl:text>
376    <xsl:value-of select="d:personname/d:surname"/>
377   </xsl:otherwise>
378  </xsl:choose>
379
380<!--
381une virgule entre les auteurs sauf entre les deux derniers
382-->
383  <xsl:choose>
384   <xsl:when test="count(following-sibling::*)  &gt; 1"> <!-- plusieurs suivants -->
385    <xsl:text>, </xsl:text>
386   </xsl:when>
387   <xsl:when test="count(following-sibling::*)  = 1">
388<!--
389   <xsl:message>ANDDDDD</xsl:message>
390-->
391    <!-- un suivant -->
392    <xsl:call-template name="and">
393     <xsl:with-param name="language" select="/d:bibliography/@xml:lang"/>
394    </xsl:call-template>
395   </xsl:when>
396  </xsl:choose>
397</xsl:template>
398
399<xsl:template match="d:author|d:corpauthor" mode="bibtex">
400<!--
4011er auteur Nom prénom les autres Prenom Nom
402and entre les auteurs
403-->
404 <xsl:value-of select="d:personname/d:firstname"/><xsl:text> </xsl:text>
405 <xsl:value-of select="d:personname/d:surname"/>
406
407<!--
408and entre les auteurs
409-->
410  <xsl:choose>
411   <xsl:when test="count(following-sibling::*)  &gt; 0"> <!-- un suivant-->
412    <xsl:text> and </xsl:text>
413   </xsl:when>
414  </xsl:choose>
415</xsl:template>
416
417<xsl:template match="d:biblioentry/d:title" mode="raw">
418 <xsl:text> : </xsl:text>
419 <xsl:value-of select="normalize-space(.)"/>
420</xsl:template>
421
422<xsl:template match="d:biblioentry/d:title" mode="bibtex">
423 <xsl:text>, title = {</xsl:text>
424 <xsl:value-of select="normalize-space(.)"/>
425 <xsl:text>}</xsl:text>
426</xsl:template>
427
428<xsl:template match="d:biblioset[@relation='journal']/d:title" mode="raw">
429 <xsl:text>, </xsl:text>
430 <xsl:value-of select="normalize-space(.)"/>
431</xsl:template>
432
433<xsl:template match="d:biblioset[@relation='journal']/d:title" mode="bibtex">
434 <xsl:text>, journal = {</xsl:text>
435 <xsl:value-of select="normalize-space(.)"/>
436 <xsl:text>}</xsl:text>
437</xsl:template>
438
439<xsl:template match="d:biblioset[@relation='conference']/d:title" mode="raw">
440 <xsl:text>, </xsl:text>
441 <xsl:value-of select="normalize-space(.)"/>
442</xsl:template>
443
444<xsl:template match="d:biblioset[@relation='conference']/d:title" mode="bibtex">
445 <xsl:text>, booktitle = {</xsl:text>
446 <xsl:value-of select="normalize-space(.)"/>
447 <xsl:text>}</xsl:text>
448</xsl:template>
449
450<xsl:template match="d:publishername" mode="raw">
451 <xsl:text>, </xsl:text>
452 <xsl:value-of select="normalize-space(.)"/>
453</xsl:template>
454
455<xsl:template match="d:publishername" mode="bibtex">
456 <xsl:text>, publisher = {</xsl:text>
457 <xsl:value-of select="normalize-space(.)"/>
458 <xsl:text>}</xsl:text>
459</xsl:template>
460
461<xsl:template match="d:pubdate" mode="raw">
462 <xsl:text>, </xsl:text>
463 <xsl:value-of select="normalize-space(.)"/>
464</xsl:template>
465
466<xsl:template match="d:pubdate" mode="bibtex">
467 <xsl:text>, year = {</xsl:text>
468 <xsl:value-of select="normalize-space(.)"/>
469 <xsl:text>}</xsl:text>
470</xsl:template>
471
472<xsl:template match="d:date">
473 <xsl:message terminate="no">
474   eee : date
475   <xsl:value-of select="normalize-space(.)"/> exists in node
476   <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/>
477   eee : try to put information in biblioset
478 </xsl:message>
479</xsl:template>
480
481<xsl:template match="d:volumenum" mode="raw">
482 <xsl:text>, </xsl:text>
483 <xsl:value-of select="normalize-space(.)"/>
484</xsl:template>
485
486<xsl:template match="d:volumenum" mode="bibtex">
487 <xsl:text>, volume = {</xsl:text>
488 <xsl:value-of select="normalize-space(.)"/>
489 <xsl:text>}</xsl:text>
490</xsl:template>
491
492<xsl:template match="d:issuenum" mode="raw">
493 <xsl:text>, </xsl:text>
494 <xsl:value-of select="normalize-space(.)"/>
495</xsl:template>
496
497<xsl:template match="d:issuenum" mode="bibtex">
498 <xsl:text>, number = {</xsl:text>
499 <xsl:value-of select="normalize-space(.)"/>
500 <xsl:text>}</xsl:text>
501</xsl:template>
502
503<xsl:template match="d:pagenums" mode="raw">
504 <xsl:text>, </xsl:text>
505 <xsl:value-of select="normalize-space(.)"/>
506</xsl:template>
507
508<xsl:template match="d:pagenums" mode="bibtex">
509 <xsl:text>, pages = {</xsl:text>
510 <xsl:value-of select="normalize-space(.)"/>
511 <xsl:text>}</xsl:text>
512</xsl:template>
513
514<xsl:template match="d:biblioid[@class='isbn']" mode="raw">
515 <xsl:text>, ISBN : </xsl:text>
516 <xsl:value-of select="normalize-space(.)"/>
517</xsl:template>
518
519<xsl:template match="d:biblioid[@class='isbn']" mode="bibtex">
520 <xsl:text>, isbn = {</xsl:text>
521 <xsl:value-of select="normalize-space(.)"/>
522 <xsl:text>}</xsl:text>
523</xsl:template>
524
525<xsl:template match="d:biblioid[@class='uri']" mode="raw">
526 <xsl:text>, </xsl:text>
527 <xsl:element name="link">
528  <xsl:attribute name="xl:href"><xsl:value-of select="normalize-space(.)"/></xsl:attribute>
529 </xsl:element>
530</xsl:template>
531
532<xsl:template match="d:biblioid[@class='uri']" mode="bibtex">
533 <xsl:text>, uri = {</xsl:text>
534 <xsl:value-of select="normalize-space(.)"/>
535 <xsl:text>}</xsl:text>
536</xsl:template>
537
538<xsl:template match="d:biblioid[@class='other']" mode="raw">
539 <xsl:text>, </xsl:text>
540 <xsl:value-of select="@otherclass"/>
541 <xsl:text> : </xsl:text>
542 <xsl:value-of select="normalize-space(.)"/>
543</xsl:template>
544
545<xsl:template match="d:biblioid[@class='other']" mode="bibtex">
546 <xsl:text>, note = {</xsl:text>
547 <xsl:value-of select="@otherclass"/>
548 <xsl:text> : </xsl:text>
549 <xsl:value-of select="normalize-space(.)"/>
550 <xsl:text>}</xsl:text>
551</xsl:template>
552
553<xsl:template match="d:biblioid[@class='doi']" mode="bibtex">
554   <xsl:choose>
555    <xsl:when test=". = '???'">
556     <xsl:message> iii : no doi found for
557      <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/>
558     </xsl:message>
559    </xsl:when>
560    <xsl:otherwise>
561     <!-- ++ transformer 10.1029/2003GL018906 en un lien sur http://dx.doi.org/10.1029/2003GL018906 par exemple
562  -->
563      <xsl:text>, doi = {</xsl:text> <!-- ++ pas sûre, peut-être seulement note = {doi:..} -->
564      <xsl:value-of select="normalize-space(.)"/>
565    </xsl:otherwise>
566   </xsl:choose>
567 <xsl:text>}</xsl:text>
568</xsl:template>
569
570<xsl:template match="d:biblioid[@class='doi']" mode="raw">
571   <xsl:choose>
572    <xsl:when test=". = '???'">
573     <xsl:message> iii : no doi found for
574      <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/>
575     </xsl:message>
576    </xsl:when>
577    <xsl:otherwise>
578     <!-- transformer 10.1029/2003GL018906 en un lien sur http://dx.doi.org/10.1029/2003GL018906 par exemple -->
579     <xsl:text>, </xsl:text>
580     <xsl:element name="link">
581      <xsl:attribute name="xl:href">
582       <xsl:text>http://dx.doi.org/</xsl:text>
583       <xsl:value-of select="normalize-space(.)"/>
584      </xsl:attribute>
585      <xsl:text>doi:</xsl:text><xsl:value-of select="normalize-space(.)"/>
586     </xsl:element>
587    </xsl:otherwise>
588   </xsl:choose>
589 <xsl:value-of select="normalize-space(.)"/>
590 <xsl:text>, </xsl:text>
591</xsl:template>
592
593
594<xsl:template match="d:conftitle">
595 <xsl:text>, </xsl:text>
596 <xsl:value-of select="normalize-space(.)"/>
597</xsl:template>
598
599<xsl:template match="d:confdates">
600 <xsl:text>, </xsl:text>
601 <xsl:value-of select="normalize-space(.)"/>
602</xsl:template>
603
604<xsl:template match="d:confnum">
605 <xsl:text>, </xsl:text>
606 <xsl:value-of select="normalize-space(.)"/>
607</xsl:template>
608
609<xsl:template match="d:address" mode="raw">
610 <xsl:text>, </xsl:text>
611 <xsl:value-of select="normalize-space(.)"/>
612</xsl:template>
613
614<xsl:template match="d:address" mode="bibtex">
615 <xsl:text>, address = {</xsl:text>
616 <xsl:value-of select="normalize-space(.)"/>
617 <xsl:text>}</xsl:text>
618</xsl:template>
619
620<xsl:template match="d:biblioid" mode="raw">
621<xsl:choose>
622<xsl:when test="@class='doi'">
623 <xsl:apply-templates select="." mode="raw"/>
624</xsl:when>
625<xsl:when test="@class='isbn'">
626 <xsl:apply-templates select="." mode="raw"/>
627</xsl:when>
628<xsl:when test="@class='uri'">
629 <xsl:apply-templates select="." mode="raw"/>
630</xsl:when>
631<xsl:when test="@class='other'">
632 <xsl:apply-templates select="." mode="raw"/>
633</xsl:when>
634<xsl:otherwise>
635 <xsl:message terminate="yes">
636eee : unknown biblioid class for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/>
637eee : class : <xsl:value-of select="normalize-space(@class)"/>
638eee : value : <xsl:value-of select="normalize-space(.)"/>
639 </xsl:message>
640</xsl:otherwise>
641</xsl:choose>
642</xsl:template>
643
644<xsl:template match="d:biblioid" mode="bibtex">
645<xsl:choose>
646<xsl:when test="@class='doi'">
647 <xsl:apply-templates select="." mode="bibtex"/>
648</xsl:when>
649<xsl:when test="@class='isbn'">
650 <xsl:apply-templates select="." mode="bibtex"/>
651</xsl:when>
652<xsl:when test="@class='uri'">
653 <xsl:apply-templates select="." mode="bibtex"/>
654</xsl:when>
655<xsl:when test="@class='other'">
656 <xsl:apply-templates select="." mode="bibtex"/>
657</xsl:when>
658<xsl:otherwise>
659 <xsl:message terminate="yes">
660eee : unknown biblioid class for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/>
661eee : class : <xsl:value-of select="normalize-space(@class)"/>
662eee : value : <xsl:value-of select="normalize-space(.)"/>
663 </xsl:message>
664</xsl:otherwise>
665</xsl:choose>
666</xsl:template>
667
668<xsl:template match="d:bibliomisc" mode="raw">
669<xsl:choose>
670<xsl:when test="contains(.,'In Press') or contains(.,'In press') or contains(.,'in press') or contains(.,'in revision') or contains(.,'submitted')">
671 <xsl:value-of select="normalize-space(.)"/>
672 <xsl:text>, </xsl:text>
673</xsl:when>
674<xsl:otherwise>
675 <xsl:message terminate="no">
676eee : unknown bibliomisc purpose for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/>
677eee : <xsl:value-of select="normalize-space(.)"/>
678 </xsl:message>
679 <xsl:text>, </xsl:text>
680 <xsl:value-of select="normalize-space(.)"/>
681</xsl:otherwise>
682</xsl:choose>
683</xsl:template>
684
685<xsl:template match="d:bibliomisc" mode="bibtex">
686<xsl:choose>
687<xsl:when test="contains(.,'In Press') or contains(.,'In press') or contains(.,'in press') or contains(.,'in revision') or contains(.,'submitted')">
688   <xsl:text>, note = {</xsl:text>
689 <xsl:value-of select="normalize-space(.)"/>
690   <xsl:text>}</xsl:text>
691</xsl:when>
692<xsl:otherwise>
693 <xsl:message terminate="no">
694eee : unknown bibliomisc purpose for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/>
695eee : <xsl:value-of select="normalize-space(.)"/>
696 </xsl:message>
697 <xsl:text>, note = {</xsl:text>
698 <xsl:value-of select="normalize-space(.)"/>
699 <xsl:text>}</xsl:text>
700</xsl:otherwise>
701</xsl:choose>
702</xsl:template>
703
704</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.