1 | <?xml version="1.0" encoding="iso-8859-1"?> |
---|
2 | <xsl:stylesheet |
---|
3 | version="1.0" |
---|
4 | xmlns:d="http://docbook.org/ns/docbook" |
---|
5 | xmlns:xl="http://www.w3.org/1999/xlink" |
---|
6 | xmlns:html="http://www.w3.org/1999/xhtml" |
---|
7 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
---|
8 | |
---|
9 | <!-- |
---|
10 | module : |
---|
11 | traitement d'une référence bibliographique (biblioentry) |
---|
12 | |
---|
13 | update : |
---|
14 | $Id$ |
---|
15 | fplod 2008-05-07T09:06:53Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
16 | improvements for conference |
---|
17 | fplod 2008-05-06T09:35:00Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
18 | add category choices |
---|
19 | fplod 2008-04-29T15:41:56Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
20 | chgt for dbk5 in |
---|
21 | fplod 2008-04-29T09:10:31Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
22 | chgt for dbk5 out |
---|
23 | fplod 2007-06-20T17:18:02Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
24 | <bibliomisc role="id"> replaced by <biblioid class="doi"> |
---|
25 | fplod 2007-05-16T14:01:44Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
26 | correction in order to write doi only once |
---|
27 | fplod 2007-05-16T10:27:34Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
28 | remove biblioentry/date and publisher |
---|
29 | add biblioentry/biblioset/bibliomisc |
---|
30 | fplod 2007-05-15T07:37:46Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
31 | factorisation de biblioentry |
---|
32 | fplod 2007-05-14T15:48:04Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
33 | correction to add biblioentry/date (replace biblioentry/biblioset/pubdate) |
---|
34 | when "in press" |
---|
35 | fplod 2007-05-04T07:59:34Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
36 | factorisation de bibnemomaf01_xml.xsl, bibnemomaf02_xml.xsl,bibnemomaf04_xml.xsl |
---|
37 | --> |
---|
38 | |
---|
39 | <xsl:include href="correction_db.xsl"/> |
---|
40 | <xsl:include href="category_form.xsl"/> |
---|
41 | <xsl:include href="message_lang.xsl"/> |
---|
42 | |
---|
43 | <xsl:template name="one_biblioentry"> |
---|
44 | <xsl:param name="visu_modif"/> |
---|
45 | <xsl:param name="my_biblioentry"/> |
---|
46 | <xsl:element name="listitem"> |
---|
47 | <xsl:element name="para"> |
---|
48 | <xsl:apply-templates select="$my_biblioentry/d:authorgroup"/> |
---|
49 | <xsl:text>, </xsl:text> |
---|
50 | <xsl:if test="$my_biblioentry/descendant::d:pubdate"> |
---|
51 | <xsl:apply-templates select="$my_biblioentry/descendant::d:pubdate"/> |
---|
52 | </xsl:if> |
---|
53 | <xsl:if test="$my_biblioentry/descendant::d:date"> |
---|
54 | <xsl:apply-templates select="$my_biblioentry/descendant::d:date"/> |
---|
55 | </xsl:if> |
---|
56 | <xsl:text> : </xsl:text> |
---|
57 | <xsl:apply-templates select="$my_biblioentry/d:title"/> |
---|
58 | <xsl:text>, </xsl:text> |
---|
59 | <xsl:choose> |
---|
60 | <xsl:when test="$my_biblioentry/descendant::d:biblioset[@relation='journal']"> |
---|
61 | <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset/child::d:title"/> |
---|
62 | <xsl:if test="$my_biblioentry/descendant::d:publishername"> |
---|
63 | <xsl:text>, </xsl:text> |
---|
64 | <xsl:apply-templates select="$my_biblioentry/descendant::d:publishername"/> |
---|
65 | </xsl:if> |
---|
66 | <xsl:if test="$my_biblioentry/descendant::d:publisher/d:address"> |
---|
67 | <xsl:text>, </xsl:text> |
---|
68 | <xsl:apply-templates select="$my_biblioentry/descendant::d:publisher/d:address"/> |
---|
69 | </xsl:if> |
---|
70 | <xsl:if test="$my_biblioentry/descendant::d:volumenum"> |
---|
71 | <xsl:text>, </xsl:text> |
---|
72 | <xsl:apply-templates select="$my_biblioentry/descendant::d:volumenum"/> |
---|
73 | <xsl:if test="$my_biblioentry/descendant::d:issuenum"> |
---|
74 | <xsl:text>, </xsl:text> |
---|
75 | <xsl:apply-templates select="$my_biblioentry/descendant::d:issuenum"/> |
---|
76 | </xsl:if> |
---|
77 | </xsl:if> |
---|
78 | <xsl:if test="$my_biblioentry/descendant::d:pagenums"> |
---|
79 | <xsl:text>, </xsl:text> |
---|
80 | <xsl:apply-templates select="$my_biblioentry/descendant::d:pagenums"/> |
---|
81 | </xsl:if> |
---|
82 | <xsl:if test="$my_biblioentry/descendant::d:biblioset/child::d:bibliomisc"> |
---|
83 | <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset/child::d:bibliomisc"/> |
---|
84 | </xsl:if> |
---|
85 | </xsl:when> |
---|
86 | <xsl:when test="$my_biblioentry/descendant::d:biblioset[@relation='conference']"> |
---|
87 | <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset/descendant::d:conftitle"/> |
---|
88 | <xsl:if test="$my_biblioentry/descendant::d:biblioset/descendant::d:confnum"> |
---|
89 | <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset/descendant::d:confnum"/> |
---|
90 | </xsl:if> |
---|
91 | <xsl:text>, </xsl:text> |
---|
92 | <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset/descendant::d:confdates"/> |
---|
93 | <xsl:text>, </xsl:text> |
---|
94 | <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset/descendant::d:address"/> |
---|
95 | <xsl:text>, </xsl:text> |
---|
96 | <xsl:apply-templates select="$my_biblioentry/descendant::d:biblioset/descendant::d:publishername"/> |
---|
97 | <xsl:if test="$my_biblioentry/descendant::d:pagenums"> |
---|
98 | <xsl:text>, </xsl:text> |
---|
99 | <xsl:apply-templates select="$my_biblioentry/descendant::d:pagenums"/> |
---|
100 | </xsl:if> |
---|
101 | </xsl:when> |
---|
102 | <xsl:otherwise> |
---|
103 | <xsl:message terminate="no"> |
---|
104 | eee : unknown biblioset relation for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/> |
---|
105 | eee : <xsl:value-of select="$my_biblioentry/descendant::d:biblioset/@relation"/> |
---|
106 | </xsl:message> |
---|
107 | <xsl:apply-templates select="$my_biblioentry/descendant::d:publishername"/> |
---|
108 | </xsl:otherwise> |
---|
109 | </xsl:choose> |
---|
110 | <xsl:apply-templates select="$my_biblioentry/d:biblioid"/> |
---|
111 | </xsl:element> |
---|
112 | <xsl:if test="$visu_modif= 'modif'"> |
---|
113 | <xsl:call-template name="correction"> |
---|
114 | <xsl:with-param name="id" select="$my_biblioentry/@xml:id"/> |
---|
115 | </xsl:call-template> |
---|
116 | </xsl:if> |
---|
117 | <xsl:if test="$visu_modif= 'category'"> |
---|
118 | <xsl:call-template name="category"> |
---|
119 | <xsl:with-param name="id" select="$my_biblioentry/@xml:id"/> |
---|
120 | </xsl:call-template> |
---|
121 | </xsl:if> |
---|
122 | </xsl:element> |
---|
123 | </xsl:template> |
---|
124 | |
---|
125 | <xsl:template match="d:authorgroup"> |
---|
126 | <xsl:apply-templates select="d:author"/> |
---|
127 | <xsl:apply-templates select="d:corpauthor"/> |
---|
128 | </xsl:template> |
---|
129 | |
---|
130 | <xsl:template match="d:author"> |
---|
131 | <!-- |
---|
132 | 1er auteur Nom, prénom les autres Prenom Nom |
---|
133 | une virgule entre les auteurs sauf entre les deux derniers |
---|
134 | --> |
---|
135 | <xsl:if test="d:personname/d:surname = ''"> |
---|
136 | <xsl:message> |
---|
137 | eee : empty surname for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/> |
---|
138 | </xsl:message> |
---|
139 | </xsl:if> |
---|
140 | <xsl:if test="d:personname/d:firstname= ''"> |
---|
141 | <xsl:message> |
---|
142 | eee : empty firstname for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/> |
---|
143 | </xsl:message> |
---|
144 | </xsl:if> |
---|
145 | <xsl:if test="d:personname/d:firstname= '.'"> |
---|
146 | <xsl:message> |
---|
147 | eee : firstname = '.' for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/> |
---|
148 | </xsl:message> |
---|
149 | </xsl:if> |
---|
150 | <xsl:choose> |
---|
151 | <xsl:when test="position()=1"> |
---|
152 | <xsl:value-of select="d:personname/d:surname"/><xsl:text>, </xsl:text> |
---|
153 | <xsl:value-of select="d:personname/d:firstname"/> |
---|
154 | </xsl:when> |
---|
155 | <xsl:otherwise> |
---|
156 | <xsl:value-of select="d:personname/d:firstname"/><xsl:text> </xsl:text> |
---|
157 | <xsl:value-of select="d:personname/d:surname"/> |
---|
158 | </xsl:otherwise> |
---|
159 | </xsl:choose> |
---|
160 | |
---|
161 | <!-- |
---|
162 | une virgule entre les auteurs sauf entre les deux derniers |
---|
163 | --> |
---|
164 | <xsl:choose> |
---|
165 | <xsl:when test="count(following-sibling::*) > 1"> <!-- plusieurs suivants --> |
---|
166 | <xsl:text>, </xsl:text> |
---|
167 | </xsl:when> |
---|
168 | <xsl:when test="count(following-sibling::*) = 1"> |
---|
169 | <!-- un suivant --> |
---|
170 | <xsl:call-template name="and"> |
---|
171 | <xsl:with-param name="language" select="/d:bibliography/@xml:lang"/> |
---|
172 | </xsl:call-template> |
---|
173 | </xsl:when> |
---|
174 | </xsl:choose> |
---|
175 | </xsl:template> |
---|
176 | |
---|
177 | <xsl:template match="d:corpauthor"> |
---|
178 | <!-- |
---|
179 | une virgule entre les auteurs sauf entre les deux derniers |
---|
180 | --> |
---|
181 | <xsl:choose> |
---|
182 | <xsl:when test="count(following-sibling::*) > 1"> <!-- plusieurs suivants --> |
---|
183 | <xsl:text>, </xsl:text> |
---|
184 | </xsl:when> |
---|
185 | <xsl:when test="count(following-sibling::*) = 1"> |
---|
186 | <xsl:text> and </xsl:text> <!-- un suivant --> |
---|
187 | </xsl:when> |
---|
188 | </xsl:choose> |
---|
189 | <xsl:value-of select="normalize-space(.)"/> |
---|
190 | </xsl:template> |
---|
191 | <xsl:template match="d:biblioentry/d:title"> |
---|
192 | <xsl:value-of select="normalize-space(.)"/> |
---|
193 | </xsl:template> |
---|
194 | |
---|
195 | <xsl:template match="d:biblioset[@relation='journal']/d:title"> |
---|
196 | <xsl:value-of select="normalize-space(.)"/> |
---|
197 | </xsl:template> |
---|
198 | |
---|
199 | <xsl:template match="d:publishername"> |
---|
200 | <xsl:value-of select="normalize-space(.)"/> |
---|
201 | </xsl:template> |
---|
202 | |
---|
203 | <xsl:template match="d:biblioset[@relation='journal']/d:pubdate"> |
---|
204 | <xsl:value-of select="normalize-space(.)"/> |
---|
205 | </xsl:template> |
---|
206 | <xsl:template match="d:biblioset[@relation='conference']/d:pubdate"> |
---|
207 | <xsl:value-of select="normalize-space(.)"/> |
---|
208 | </xsl:template> |
---|
209 | <xsl:template match="d:date"> |
---|
210 | <xsl:message terminate="no"> |
---|
211 | eee : date |
---|
212 | <xsl:value-of select="normalize-space(.)"/> exists in node |
---|
213 | <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/> |
---|
214 | eee : try to put information in biblioset |
---|
215 | </xsl:message> |
---|
216 | </xsl:template> |
---|
217 | |
---|
218 | <xsl:template match="d:biblioset[@relation='journal']/d:volumenum"> |
---|
219 | <xsl:value-of select="normalize-space(.)"/> |
---|
220 | </xsl:template> |
---|
221 | |
---|
222 | <xsl:template match="d:biblioset[@relation='journal']/d:issuenum"> |
---|
223 | <xsl:value-of select="normalize-space(.)"/> |
---|
224 | </xsl:template> |
---|
225 | |
---|
226 | <xsl:template match="d:biblioset[@relation='journal']/d:pagesnum"> |
---|
227 | <xsl:value-of select="normalize-space(.)"/> |
---|
228 | </xsl:template> |
---|
229 | |
---|
230 | <xsl:template match="d:biblioset[@relation='conference']/d:publisher/d:publishername"> |
---|
231 | <xsl:value-of select="normalize-space(.)"/> |
---|
232 | </xsl:template> |
---|
233 | <xsl:template match="d:conftitle"> |
---|
234 | <xsl:value-of select="normalize-space(.)"/> |
---|
235 | </xsl:template> |
---|
236 | <xsl:template match="d:confdates"> |
---|
237 | <xsl:value-of select="normalize-space(.)"/> |
---|
238 | </xsl:template> |
---|
239 | <xsl:template match="d:confnum"> |
---|
240 | <xsl:value-of select="normalize-space(.)"/> |
---|
241 | </xsl:template> |
---|
242 | <xsl:template match="d:address"> |
---|
243 | <xsl:value-of select="normalize-space(.)"/> |
---|
244 | </xsl:template> |
---|
245 | |
---|
246 | <xsl:template match="d:biblioid"> |
---|
247 | <xsl:choose> |
---|
248 | <xsl:when test="@class='doi'"> |
---|
249 | <xsl:choose> |
---|
250 | <xsl:when test=". = '???'"> |
---|
251 | <xsl:message> iii : no doi found for |
---|
252 | <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/> |
---|
253 | </xsl:message> |
---|
254 | </xsl:when> |
---|
255 | <xsl:otherwise> |
---|
256 | <!-- transformer 10.1029/2003GL018906 en un lien sur http://dx.doi.org/10.1029/2003GL018906 par exemple |
---|
257 | --> |
---|
258 | <xsl:text>, </xsl:text> |
---|
259 | <xsl:element name="link"> |
---|
260 | <xsl:attribute name="xl:href"> |
---|
261 | <xsl:text>http://dx.doi.org/</xsl:text> |
---|
262 | <xsl:value-of select="normalize-space(.)"/> |
---|
263 | </xsl:attribute> |
---|
264 | <xsl:text>doi:</xsl:text><xsl:value-of select="normalize-space(.)"/> |
---|
265 | </xsl:element> |
---|
266 | </xsl:otherwise> |
---|
267 | </xsl:choose> |
---|
268 | </xsl:when> |
---|
269 | <xsl:when test="@class='isbn'"> |
---|
270 | <xsl:text>, ISBN : </xsl:text><xsl:value-of select="normalize-space(.)"/> |
---|
271 | </xsl:when> |
---|
272 | <xsl:when test="@class='other'"> |
---|
273 | <xsl:text>, </xsl:text><xsl:value-of select="@otherclass"/><xsl:text> : </xsl:text><xsl:value-of select="normalize-space(.)"/> |
---|
274 | </xsl:when> |
---|
275 | <xsl:otherwise> |
---|
276 | <xsl:message terminate="no"> |
---|
277 | eee : unknown biblioid class for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/> |
---|
278 | eee : <xsl:value-of select="normalize-space(.)"/> |
---|
279 | </xsl:message> |
---|
280 | </xsl:otherwise> |
---|
281 | </xsl:choose> |
---|
282 | </xsl:template> |
---|
283 | |
---|
284 | <xsl:template match="d:bibliomisc"> |
---|
285 | <xsl:choose> |
---|
286 | <xsl:when test="contains(.,'In Press')"> |
---|
287 | <xsl:text>, </xsl:text> |
---|
288 | <xsl:value-of select="normalize-space(.)"/> |
---|
289 | </xsl:when> |
---|
290 | <xsl:when test="contains(.,'In press')"> |
---|
291 | <xsl:text>, </xsl:text> |
---|
292 | <xsl:value-of select="normalize-space(.)"/> |
---|
293 | </xsl:when> |
---|
294 | <xsl:when test="contains(.,'in press')"> |
---|
295 | <xsl:text>, </xsl:text> |
---|
296 | <xsl:value-of select="normalize-space(.)"/> |
---|
297 | </xsl:when> |
---|
298 | <xsl:when test="contains(.,'in revision')"> |
---|
299 | <xsl:text>, </xsl:text> |
---|
300 | <xsl:value-of select="normalize-space(.)"/> |
---|
301 | </xsl:when> |
---|
302 | <xsl:when test="contains(.,'submitted')"> |
---|
303 | <xsl:text>, </xsl:text> |
---|
304 | <xsl:value-of select="normalize-space(.)"/> |
---|
305 | </xsl:when> |
---|
306 | <xsl:otherwise> |
---|
307 | <xsl:message> |
---|
308 | eee : unknown bibliomisc purpose for <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/> |
---|
309 | eee : <xsl:value-of select="normalize-space(.)"/> |
---|
310 | </xsl:message> |
---|
311 | </xsl:otherwise> |
---|
312 | </xsl:choose> |
---|
313 | </xsl:template> |
---|
314 | |
---|
315 | </xsl:stylesheet> |
---|