source: trunk/biblioentry_rest.xsl

Last change on this file was 355, checked in by pinsard, 10 years ago

fix thanks to coding rules; typo; dupe empty lines

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