source: trunk/superbib02_xml.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: 7.0 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:xsl="http://www.w3.org/1999/XSL/Transform">
7
8<!--rst
9
10.. _superbib02_xml.xsl:
11
12==================
13superbib02_xml.xsl
14==================
15
16produce a DocBook 5 with bibliograhy references sorted by authors
17
18TODO
19====
20
21EVOLUTIONS
22==========
23
24$Id$
25
26- fplod 20110629T135204Z cratos.locean-ipsl.upmc.fr (Linux)
27
28  * authorgroup is found in main.xml
29
30- fplod 2008-09-17T10:40:43Z aedon.locean-ipsl.upmc.fr (Darwin)
31
32  * project name from main.xml file instead of a fixed one
33
34- fplod 2008-04-30T15:02:03Z aedon.locean-ipsl.upmc.fr (Darwin)
35
36  * language inherited from biblio.xml
37
38- fplod 2008-04-29T08:01:08Z aedon.locean-ipsl.upmc.fr (Darwin)
39
40  * chgt for dbk5
41
42- fplod 2007-10-17T07:49:19Z aedon.locean-ipsl.upmc.fr (Darwin)
43
44  * improve sort (diacriticals)
45
46- fplod 2007-05-18T14:31:33Z aedon.locean-ipsl.upmc.fr (Darwin)
47
48  * modif gestion id
49
50- fplod 2007-05-16T15:15:36Z aedon.locean-ipsl.upmc.fr (Darwin)
51
52  * correction pour homonymes partiels
53
54- fplod 2007-05-04T08:17:56Z aedon.locean-ipsl.upmc.fr (Darwin)
55
56  * externalisation de biblioentry
57
58- fplod 2007-04-02T08:53:30Z aedon.locean-ipsl.upmc.fr (Darwin)
59
60  * journal dans biblioset
61
62- fplod 2007-03-30T12:38:34Z aedon.locean-ipsl.upmc.fr (Darwin)
63
64  * creation
65
66-->
67
68<xsl:output
69 method="xml"
70 indent="yes"
71 encoding="utf-8"
72 omit-xml-declaration="no"/>
73
74<xsl:include href="firstname_id.xsl"/>
75<xsl:include href="surname_id.xsl"/>
76<xsl:include href="table_authors.xsl"/>
77<xsl:include href="biblioentry_xml.xsl"/>
78
79<xsl:variable name="list_author_ids" select="///d:author[not( self::node() = following::d:author )]"/>
80
81<xsl:variable name="project">
82 <xsl:value-of select="document('main.xml')//d:keyword[@xml:id='project']"/>
83</xsl:variable>
84
85<xsl:template match="d:bibliography">
86
87<xsl:element name="article">
88<xsl:attribute name="version">5.0</xsl:attribute>
89<xsl:attribute name="xmlns">http://docbook.org/ns/docbook</xsl:attribute>
90<xsl:attribute name="xml:lang"><xsl:value-of select="@xml:lang"/></xsl:attribute>
91<title><xsl:value-of select="$project"/> - Publications - Papers by authors</title>
92<info>
93<authorgroup>
94<xsl:copy-of select="document('main.xml')//d:info/d:authorgroup"/>
95</authorgroup>
96<keywordset>
97<keyword><xsl:value-of select="$project"/></keyword>
98</keywordset>
99<!-- ++ date -->
100</info>
101<para xml:id="top">
102 This page intents to provide an exhaustive list of the papers that have used <xsl:value-of select="$project"/> and/or results from them. Obvioulsy many papers are missing. If you find omissions or mistakes please ask some modification via
103<xsl:element name="link">
104 <xsl:attribute name="xl:href">
105  <xsl:value-of select="'./main.php'"/>
106 </xsl:attribute>
107 <xsl:value-of select="document('main.xml')/d:article/d:title"/>
108 <xsl:text> main page</xsl:text>
109</xsl:element>.
110</para>
111<para>
112You can also see <quote><xsl:value-of select="$project"/> - Publications - Papers</quote> sorted by
113<xsl:element name="link">
114 <xsl:attribute name="xl:href">
115  <xsl:value-of select="'./superbib01.html'"/>
116 </xsl:attribute>
117<xsl:text>years</xsl:text>
118</xsl:element>.
119</para>
120
121<xsl:call-template name="para_lastupdate_bib">
122 <xsl:with-param name="language" select="@xml:lang"/>
123 <xsl:with-param name="date" select="d:info/d:date"/>
124 <xsl:with-param name="mode" select="'dbk'"/>
125</xsl:call-template>
126
127<sect1 xml:id="intro">
128<title>Introduction</title>
129<para>
130This document provide bibliography sorted by author's id (<emphasis>SURNAME_f</emphasis>).
131</para>
132
133<xsl:call-template name="table_authors">
134<xsl:with-param name="linktype" select="'internal'"/>
135</xsl:call-template>
136</sect1>
137
138<!-- loop on author_ids -->
139<xsl:for-each select="$list_author_ids">
140<xsl:sort order="ascending" data-type="text" select="translate(.,'abcdefghijklmnopqrstuvwxyz éèçàùëöñó', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_EECAUEONO')"/>
141<xsl:variable name="author_id2">
142<xsl:call-template name="surname_id">
143 <xsl:with-param name="surname" select="d:personname/d:surname"/>
144</xsl:call-template>
145<xsl:text>_</xsl:text>
146<xsl:call-template name="firstname_id">
147 <xsl:with-param name="firstname" select="d:personname/d:firstname"/>
148</xsl:call-template>
149</xsl:variable>
150<!--
151<xsl:message terminate="no">
152noeud courant <xsl:value-of select="name(.)"/>
153author <xsl:value-of select="ancestor::d:author"/>
154author_id2 <xsl:value-of select="$author_id2"/>
155</xsl:message>
156-->
157<xsl:call-template name="one_author_id">
158<xsl:with-param name="author_id" select="$author_id2"/>
159<xsl:with-param name="author_name" select="."/>
160</xsl:call-template>
161</xsl:for-each>
162
163</xsl:element>
164</xsl:template>
165
166<xsl:template match="d:info/d:date"/>
167<xsl:template match="d:bibliography/d:title"/>
168
169<xsl:template name="one_author_id">
170<xsl:param name="author_id"/>
171<xsl:param name="author_name"/>
172<xsl:element name="sect1">
173<xsl:attribute name="xml:id">
174<xsl:value-of select="$author_id"/>
175</xsl:attribute>
176<xsl:element name="title">
177<xsl:value-of select="normalize-space($author_name/d:personname/d:firstname)"/><xsl:text> </xsl:text><xsl:value-of select="normalize-space($author_name/d:personname/d:surname)"/>
178<xsl:element name="link">
179<xsl:attribute name="xl:href"><xsl:text>#top</xsl:text></xsl:attribute>
180<xsl:element name="inlinemediaobject">
181<xsl:element name="imageobject">
182<xsl:element name="imagedata">
183<xsl:attribute name="fileref">../../images/globalicondl11x10_up.gif</xsl:attribute>
184</xsl:element>
185     </xsl:element>
186     <xsl:element name="textobject">
187      <xsl:element name="phrase">
188       <xsl:text>top</xsl:text>
189      </xsl:element>
190     </xsl:element>
191    </xsl:element>
192   </xsl:element>
193  </xsl:element>
194  <xsl:element name="orderedlist">
195   <xsl:for-each select="//d:biblioentry">
196    <xsl:sort order="descending" data-type="number" select="./d:biblioset/d:pubdate"/>
197    <xsl:for-each select="descendant::d:author">
198     <xsl:sort order="ascending" data-type="text" select="./d:personname/d:surname"/>
199     <xsl:sort order="ascending" data-type="text" select="./d:personname/d:firstname"/>
200     <xsl:variable name="author_id2">
201<xsl:call-template name="surname_id">
202 <xsl:with-param name="surname" select="d:personname/d:surname"/>
203</xsl:call-template>
204      <xsl:text>_</xsl:text>
205<xsl:call-template name="firstname_id">
206 <xsl:with-param name="firstname" select="d:personname/d:firstname"/>
207</xsl:call-template>
208     </xsl:variable>
209
210<!--
211     <xsl:message terminate="no">
212      ref #<xsl:value-of select="position()"/>
213      _id appel <xsl:value-of select="$author_id"/>
214      _id fabrique <xsl:value-of select="$author_id2"/>
215      egal ? <xsl:value-of select="$author_id2 = $author_id"/>
216     </xsl:message>
217-->
218     <xsl:if test="$author_id2 = $author_id">
219  <xsl:call-template name="one_biblioentry">
220   <xsl:with-param name="visu_modif" select="'visu'"/>
221   <xsl:with-param name="type" select="'raw'"/>
222   <xsl:with-param name="my_biblioentry" select="ancestor::d:biblioentry"/>
223  </xsl:call-template>
224     </xsl:if>
225    </xsl:for-each>
226   </xsl:for-each>
227  </xsl:element>
228 </xsl:element>
229</xsl:template>
230
231</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.