source: trunk/bibnemomaf01_xml.xsl @ 7

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

add nb of publications by year. see ticket:3

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