source: trunk/bibnemomaf01_xml.xsl @ 2

Last change on this file since 2 was 2, checked in by smasson, 17 years ago

initial import

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