source: trunk/superbib02_xml.xsl @ 323

Last change on this file since 323 was 152, checked in by pinsard, 12 years ago

going on with restsuperbibmany01_xml.xsl

  • 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
69<xsl:output
70 method="xml"
71 indent="yes"
72 encoding="utf-8"
73 omit-xml-declaration="no"/>
74
75<xsl:include href="firstname_id.xsl"/>
76<xsl:include href="surname_id.xsl"/>
77<xsl:include href="table_authors.xsl"/>
78<xsl:include href="biblioentry_xml.xsl"/>
79
80<xsl:variable name="list_author_ids" select="///d:author[not( self::node() = following::d:author )]"/>
81
82<xsl:variable name="project">
83 <xsl:value-of select="document('main.xml')//d:keyword[@xml:id='project']"/>
84</xsl:variable>
85
86<xsl:template match="d:bibliography">
87
88<xsl:element name="article">
89<xsl:attribute name="version">5.0</xsl:attribute>
90<xsl:attribute name="xmlns">http://docbook.org/ns/docbook</xsl:attribute>
91<xsl:attribute name="xml:lang"><xsl:value-of select="@xml:lang"/></xsl:attribute>
92<title><xsl:value-of select="$project"/> - Publications - Papers by authors</title>
93<info>
94<authorgroup>
95<xsl:copy-of select="document('main.xml')//d:info/d:authorgroup"/>
96</authorgroup>
97<keywordset>
98<keyword><xsl:value-of select="$project"/></keyword>
99</keywordset>
100<!-- ++ date -->
101</info>
102<para xml:id="top">
103 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
104<xsl:element name="link">
105 <xsl:attribute name="xl:href">
106  <xsl:value-of select="'./main.php'"/>
107 </xsl:attribute>
108 <xsl:value-of select="document('main.xml')/d:article/d:title"/>
109 <xsl:text> main page</xsl:text>
110</xsl:element>.
111</para>
112<para>
113You can also see <quote><xsl:value-of select="$project"/> - Publications - Papers</quote> sorted by
114<xsl:element name="link">
115 <xsl:attribute name="xl:href">
116  <xsl:value-of select="'./superbib01.html'"/>
117 </xsl:attribute>
118<xsl:text>years</xsl:text>
119</xsl:element>.
120</para>
121
122<xsl:call-template name="para_lastupdate_bib">
123 <xsl:with-param name="language" select="@xml:lang"/>
124 <xsl:with-param name="date" select="d:info/d:date"/>
125 <xsl:with-param name="mode" select="'dbk'"/>
126</xsl:call-template>
127
128<sect1 xml:id="intro">
129<title>Introduction</title>
130<para>
131This document provide bibliography sorted by author's id (<emphasis>SURNAME_f</emphasis>).
132</para>
133
134<xsl:call-template name="table_authors">
135<xsl:with-param name="linktype" select="'internal'"/>
136</xsl:call-template>
137</sect1>
138
139<!-- loop on author_ids -->
140<xsl:for-each select="$list_author_ids">
141<xsl:sort order="ascending" data-type="text" select="translate(.,'abcdefghijklmnopqrstuvwxyz éèçàùëöñó', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_EECAUEONO')"/>
142<xsl:variable name="author_id2">
143<xsl:call-template name="surname_id">
144 <xsl:with-param name="surname" select="d:personname/d:surname"/>
145</xsl:call-template>
146<xsl:text>_</xsl:text>
147<xsl:call-template name="firstname_id">
148 <xsl:with-param name="firstname" select="d:personname/d:firstname"/>
149</xsl:call-template>
150</xsl:variable>
151<!--
152<xsl:message terminate="no">
153noeud courant <xsl:value-of select="name(.)"/>
154author <xsl:value-of select="ancestor::d:author"/>
155author_id2 <xsl:value-of select="$author_id2"/>
156</xsl:message>
157-->
158<xsl:call-template name="one_author_id">
159<xsl:with-param name="author_id" select="$author_id2"/>
160<xsl:with-param name="author_name" select="."/>
161</xsl:call-template>
162</xsl:for-each>
163
164</xsl:element>
165</xsl:template>
166
167<xsl:template match="d:info/d:date"/>
168<xsl:template match="d:bibliography/d:title"/>
169
170<xsl:template name="one_author_id">
171<xsl:param name="author_id"/>
172<xsl:param name="author_name"/>
173<xsl:element name="sect1">
174<xsl:attribute name="xml:id">
175<xsl:value-of select="$author_id"/>
176</xsl:attribute>
177<xsl:element name="title">
178<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)"/>
179<xsl:element name="link">
180<xsl:attribute name="xl:href"><xsl:text>#top</xsl:text></xsl:attribute>
181<xsl:element name="inlinemediaobject">
182<xsl:element name="imageobject">
183<xsl:element name="imagedata">
184<xsl:attribute name="fileref">../../images/globalicondl11x10_up.gif</xsl:attribute>
185</xsl:element>
186     </xsl:element>
187     <xsl:element name="textobject">
188      <xsl:element name="phrase">
189       <xsl:text>top</xsl:text>
190      </xsl:element>
191     </xsl:element>
192    </xsl:element>
193   </xsl:element>
194  </xsl:element>
195  <xsl:element name="orderedlist">
196   <xsl:for-each select="//d:biblioentry">
197    <xsl:sort order="descending" data-type="number" select="./d:biblioset/d:pubdate"/>
198    <xsl:for-each select="descendant::d:author">
199     <xsl:sort order="ascending" data-type="text" select="./d:personname/d:surname"/>
200     <xsl:sort order="ascending" data-type="text" select="./d:personname/d:firstname"/>
201     <xsl:variable name="author_id2">
202<xsl:call-template name="surname_id">
203 <xsl:with-param name="surname" select="d:personname/d:surname"/>
204</xsl:call-template>
205      <xsl:text>_</xsl:text>
206<xsl:call-template name="firstname_id">
207 <xsl:with-param name="firstname" select="d:personname/d:firstname"/>
208</xsl:call-template>
209     </xsl:variable>
210
211<!--
212     <xsl:message terminate="no">
213      ref #<xsl:value-of select="position()"/>
214      _id appel <xsl:value-of select="$author_id"/>
215      _id fabrique <xsl:value-of select="$author_id2"/>
216      egal ? <xsl:value-of select="$author_id2 = $author_id"/>
217     </xsl:message>
218-->
219     <xsl:if test="$author_id2 = $author_id">
220  <xsl:call-template name="one_biblioentry">
221   <xsl:with-param name="visu_modif" select="'visu'"/>
222   <xsl:with-param name="type" select="'raw'"/>
223   <xsl:with-param name="my_biblioentry" select="ancestor::d:biblioentry"/>
224  </xsl:call-template>
225     </xsl:if>
226    </xsl:for-each>
227   </xsl:for-each>
228  </xsl:element>
229 </xsl:element>
230</xsl:template>
231
232</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.