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