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