source: trunk/bibnemomaf01_xml.xsl @ 28

Last change on this file since 28 was 28, checked in by pinsard, 17 years ago

improve diacritical authors sort in table and lists

  • Property svn:keywords set to Id
File size: 8.4 KB
Line 
1<?xml version="1.0" encoding="iso-8859-1"?>
2
3<!--
4module :
5sortir les références bibliographiques par pseudo-année
6
7source :
8/usr/home/fplod/incas/bibnemo/src/bibnemomaf/bibnemomaf01_xml.xsl sur aedon.locean-ipsl.upmc.fr
9
10update :
11$Id$
12++ plein de trucs
13fplod 2007-10-17T08:01:14Z aedon.locean-ipsl.upmc.fr (Darwin)
14improve authors sort (diacriticals)
15fplod 2007-06-08T08:36:48Z aedon.locean-ipsl.upmc.fr (Darwin)
16add total nb of publications in one cell. quite interesting usage of
17XPATH to determine mininum and maximum value of a element !
18fplod 2007-05-21T14:06:53Z aedon.locean-ipsl.upmc.fr (Darwin)
19ajout de plot nbpub/years
20fplod 2007-05-04T08:02:29Z aedon.locean-ipsl.upmc.fr (Darwin)
21externalisation de biblioentry
22passage de itemizedlist à sect1 pour homogénéisation sur présentation par auteur(et parce que je préfère)
23fplod 2007-04-02T08:53:30Z aedon.locean-ipsl.upmc.fr (Darwin)
24journal dans biblioset
25fplod 2007-03-30T12:38:34Z aedon.locean-ipsl.upmc.fr (Darwin)
26creation
27-->
28
29<xsl:stylesheet
30 id="id" version="1.0"
31 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
32
33<xsl:output
34 method="xml"
35 indent="yes"
36 encoding="ISO-8859-1"
37 omit-xml-declaration="no"
38 doctype-public="-//OASIS//DTD DocBook XML V4.5//EN"
39 doctype-system="http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"/>
40
41<xsl:include href="biblioentry_xml.xsl"/>
42
43<xsl:variable name="list_years" select="///pubdate[not( self::node() = following::pubdate )]"/>
44
45<xsl:template name="years">
46<!--
47creation of an informatable of nb years
48each entry of the table is a link #year_xxxx
49-->
50<xsl:element name="informaltable">
51 <xsl:attribute name="id">years</xsl:attribute>
52 <xsl:attribute name="summary">years of publications</xsl:attribute>
53 <xsl:element name="tgroup">
54  <xsl:variable name="nb_cols" select="count($list_years)"/>
55  <xsl:attribute name="cols"><xsl:value-of select="$nb_cols"/></xsl:attribute>
56  <xsl:attribute name="align">center</xsl:attribute>
57  <xsl:attribute name="colsep">1</xsl:attribute>
58  <xsl:attribute name="rowsep">1</xsl:attribute>
59  <xsl:for-each select="///pubdate[not( self::node() = following::pubdate )]">
60   <xsl:sort order="descending" data-type="number" select="."/>
61   <xsl:element name="colspec">
62    <xsl:attribute name="colname">year_<xsl:value-of select="."/></xsl:attribute>
63   </xsl:element>
64  </xsl:for-each>
65  <xsl:element name="tbody">
66   <xsl:element name="row">
67    <xsl:for-each select="///pubdate[not( self::node() = following::pubdate )]">
68     <xsl:sort order="descending" data-type="number" select="."/>
69     <xsl:element name="entry">
70      <xsl:attribute name="colname"><xsl:text>year_</xsl:text><xsl:value-of select="."/></xsl:attribute>
71      <xsl:element name="ulink">
72       <xsl:attribute name="url"><xsl:text>#year_</xsl:text><xsl:value-of select="."/></xsl:attribute>
73       <xsl:value-of select="."/>
74      </xsl:element>
75     </xsl:element>
76    </xsl:for-each>
77   </xsl:element>
78   <xsl:element name="row">
79    <xsl:for-each select="///pubdate[not( self::node() = following::pubdate )]">
80     <xsl:sort order="descending" data-type="number" select="."/>
81     <xsl:element name="entry">
82      <xsl:attribute name="colname"><xsl:text>year_</xsl:text><xsl:value-of select="."/></xsl:attribute>
83      <xsl:element name="emphasis">
84       <xsl:attribute name="role">bold</xsl:attribute>
85<xsl:variable name="nb_current">
86 <xsl:variable name="current_year"><xsl:value-of select="."/></xsl:variable>
87 <xsl:value-of select="count(/descendant::biblioentry[child::biblioset[child::pubdate=$current_year]])"/>
88</xsl:variable>
89       <xsl:value-of select="$nb_current"/>
90      </xsl:element>
91     </xsl:element>
92    </xsl:for-each>
93   </xsl:element>
94   <xsl:variable name="year_min">
95    <xsl:value-of select="///pubdate[not(. &gt; ///pubdate)]"/>
96   </xsl:variable>
97   <xsl:variable name="year_max">
98    <xsl:value-of select="///pubdate[not(. &lt; ///pubdate)]"/>
99   </xsl:variable>
100   <xsl:element name="row">
101    <xsl:element name="entry">
102     <xsl:attribute name="namest"><xsl:value-of select="concat('year_',$year_max)"/></xsl:attribute>
103      <xsl:attribute name="nameend"><xsl:value-of select="concat('year_',$year_min)"/></xsl:attribute>
104     <xsl:element name="emphasis">
105      <xsl:attribute name="role">bold</xsl:attribute>
106       <xsl:value-of select="count(/descendant::biblioentry)"/>
107     </xsl:element>
108    </xsl:element>
109   </xsl:element>
110  </xsl:element>
111 </xsl:element>
112</xsl:element>
113</xsl:template>
114
115<xsl:template match="bibliography">
116
117<article lang="en">
118<title>NEMO - Publications - Papers by years</title>
119<articleinfo>
120<authorgroup>
121<author><personname><firstname>Sébastien</firstname> <surname>Masson</surname></personname></author>
122<author><personname><firstname>Françoise</firstname> <surname>Pinsard</surname></personname></author>
123<!--++-->
124</authorgroup>
125<keywordset>
126<keyword>NEMO</keyword>
127</keywordset>
128<!-- ++ date -->
129</articleinfo>
130<highlights id="top">
131<para>
132This page intents to provide an exhaustive list of the papers that have used
133NEMO or OPA and/or results from them.
134Obvioulsy many papers are missing.
135If you find omissions or mistakes please ask some modification via
136<xsl:element name="ulink">
137 <xsl:attribute name="url">
138  <xsl:value-of select="'./bibnemomain.php'"/>
139 </xsl:attribute>
140 <xsl:text>Nemo Survey main page</xsl:text>
141</xsl:element>.
142</para>
143</highlights>
144<para>
145You can also see <quote>NEMO - Publications - Papers</quote> sorted by
146<xsl:text>authors</xsl:text>
147authors in
148<xsl:element name="ulink">
149 <xsl:attribute name="url">
150  <xsl:value-of select="'./bibnemomaf02.html'"/>
151 </xsl:attribute>
152 <xsl:text>one big document </xsl:text>
153</xsl:element>
154<xsl:text> or in </xsl:text>
155<xsl:element name="ulink">
156 <xsl:attribute name="url">
157  <xsl:value-of select="'../many/bibnemomaf03/index.html'"/>
158 </xsl:attribute>
159 <xsl:text>several </xsl:text>
160</xsl:element> <xsl:text> (one by author)</xsl:text>.
161</para>
162
163<para>
164Last update of the bibliography databank : <xsl:value-of select="bibliographyinfo/date"/>
165</para>
166
167<xsl:call-template name="years"/>
168
169<figure id="fig_pubbyyears"><title>Nb of publications by years</title>
170<mediaobject> 
171<imageobject> 
172<imagedata fileref="../../images/years.png" format="PNG"/>
173</imageobject>
174<textobject><phrase>[years.png]</phrase></textobject>
175</mediaobject>
176</figure>
177
178<sect1 id="intro">
179<title>Introduction</title>
180<para>
181This document provide bibliography sorted by year.
182</para>
183</sect1>
184
185   <!-- loop on years -->
186   <xsl:for-each select="$list_years">
187    <xsl:sort order="descending" data-type="number" select="."/>
188    <xsl:call-template name="one_year">
189     <xsl:with-param name="year" select="."/>
190    </xsl:call-template>
191   </xsl:for-each>
192</article>
193</xsl:template>
194
195<xsl:template match="bibliographyinfo/date"/>
196<xsl:template match="bibliography/title"/>
197
198<xsl:template name="one_year">
199<xsl:param name="year"/>
200<!--
201 <xsl:message>call template avec <xsl:value-of select="$year"/></xsl:message>
202 <xsl:message>noeud courant <xsl:value-of select="name(.)"/></xsl:message>
203-->
204 <xsl:message>
205year_<xsl:value-of select="$year"/> : <xsl:value-of select="count(/descendant::biblioentry[child::biblioset[child::pubdate=$year]]) + count(/descendant::biblioentry[child::date=$year])"/> 
206</xsl:message>
207 <xsl:element name="sect1">
208  <xsl:attribute name="id"><xsl:value-of select="concat('year_',$year)"/></xsl:attribute>
209  <xsl:element name="title">
210   <xsl:value-of select="$year"/>
211   <xsl:element name="ulink">
212   <xsl:attribute name="url"><xsl:text>#top</xsl:text></xsl:attribute>
213   <xsl:element name="inlinemediaobject">
214     <xsl:element name="imageobject">
215      <xsl:element name="imagedata">
216       <xsl:attribute name="fileref">../../images/globalicondl11x10_up.gif</xsl:attribute>
217      </xsl:element>
218     </xsl:element>
219     <xsl:element name="textobject">
220      <xsl:element name="phrase">
221       <xsl:text>top</xsl:text>
222      </xsl:element>
223     </xsl:element>
224    </xsl:element>
225   </xsl:element>
226  </xsl:element>
227  <orderedlist>
228   <xsl:for-each select="/descendant::biblioentry[child::biblioset[child::pubdate=$year]]|/descendant::biblioentry[child::date=$year]">
229    <xsl:sort order="ascending" data-type="text" select="translate(./authorgroup/author/personname,'abcdefghijklmnopqrstuvwxyz éèçàùëöñó','ABCDEFGHIJKLMNOPQRSTUVWXYZ_EECAUEONO')"/>
230    <xsl:call-template name="one_biblioentry">
231     <xsl:with-param name="visu_modif" select="'visu'"/>
232     <xsl:with-param name="my_biblioentry" select="."/>
233    </xsl:call-template>
234   </xsl:for-each>
235  </orderedlist>
236 </xsl:element>
237</xsl:template>
238
239</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.