source: trunk/superbib02_xml.xsl @ 80

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

add journals and bug fixes in flat to docbook conversion tool

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