source: trunk/superbib01_xml.xsl @ 44

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

replacing bibnemomaf by product name

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