source: trunk/superbib02_xml.xsl @ 100

Last change on this file since 100 was 95, checked in by pinsard, 14 years ago

add rest2web for manuals production (and start sphinx but not yet ok)

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