[2] | 1 | <?xml version="1.0" encoding="iso-8859-1"?> |
---|
[76] | 2 | <xsl:stylesheet |
---|
| 3 | version="1.0" |
---|
[56] | 4 | xmlns:d="http://docbook.org/ns/docbook" |
---|
| 5 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
---|
[2] | 6 | |
---|
| 7 | <!-- |
---|
| 8 | module : |
---|
| 9 | production d'un fichier de commande gnuplot avec données incorporées pour |
---|
| 10 | le graphe publications/année |
---|
| 11 | |
---|
| 12 | update : |
---|
[33] | 13 | $Id$ |
---|
[56] | 14 | fplod 2008-04-30T06:50:45Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 15 | chgt for dbk5 in |
---|
[2] | 16 | fplod 2007-05-21T12:52:07Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 17 | d'après /Users/pinsard/ES/src/estimation/src/estimation_graph1_gnuplot.xsl |
---|
| 18 | creation |
---|
| 19 | --> |
---|
| 20 | |
---|
| 21 | <xsl:output |
---|
| 22 | method="text" |
---|
| 23 | encoding="ISO-8859-1" |
---|
| 24 | indent="yes"/> |
---|
| 25 | |
---|
| 26 | <xsl:include href="biblioentry_xml.xsl"/> |
---|
| 27 | |
---|
[56] | 28 | <xsl:variable name="list_years" select="///d:pubdate[not( self::node() = following::d:pubdate )]"/> |
---|
[2] | 29 | |
---|
[56] | 30 | <xsl:template match="d:bibliography"> |
---|
[2] | 31 | # |
---|
| 32 | # $ gnuplot graph1_<xsl:value-of select="years"/>.gnu |
---|
[76] | 33 | # |
---|
[2] | 34 | # source : |
---|
| 35 | # ++/graph1_<xsl:value-of select="years"/>.gnu |
---|
[76] | 36 | # |
---|
[2] | 37 | # update : |
---|
| 38 | # <xsl:value-of select="$makedate"/> |
---|
| 39 | # |
---|
| 40 | reset |
---|
| 41 | # |
---|
| 42 | # codage iso pour les diacritiques |
---|
| 43 | set encoding iso_8859_1 |
---|
| 44 | # |
---|
| 45 | set size 1.0, 1.0 |
---|
| 46 | set origin 0.0, 0.0 |
---|
| 47 | # |
---|
| 48 | # pas de légendes |
---|
| 49 | set nokey |
---|
| 50 | # |
---|
| 51 | # definition of axes |
---|
| 52 | set xlabel "Year" |
---|
| 53 | set xdata time |
---|
| 54 | set timefmt "%Y" |
---|
| 55 | set format x "%Y" |
---|
| 56 | #++set xrange ++ year min year max |
---|
| 57 | set ylabel "Nb of publications" |
---|
| 58 | # titre sur le graphique |
---|
[34] | 59 | set title "nb of publications by year date : <xsl:value-of select="$makedate"/>" |
---|
[2] | 60 | # |
---|
| 61 | #set term svg dynamic |
---|
| 62 | #set output "years.svg" |
---|
| 63 | #++set output "fichier_svg" |
---|
| 64 | set term png |
---|
| 65 | set output "<xsl:value-of select="$path"/>/years.png" |
---|
| 66 | |
---|
[76] | 67 | plot '-' using 1:2 with linespoints |
---|
[2] | 68 | <!-- loop on years --> |
---|
| 69 | <xsl:for-each select="$list_years"> |
---|
| 70 | <xsl:sort order="ascending" data-type="number" select="."/> |
---|
| 71 | <xsl:call-template name="one_year"> |
---|
| 72 | <xsl:with-param name="year" select="."/> |
---|
| 73 | </xsl:call-template> |
---|
| 74 | </xsl:for-each> |
---|
| 75 | <xsl:text>e</xsl:text> |
---|
| 76 | <xsl:text>
</xsl:text> |
---|
| 77 | </xsl:template> |
---|
| 78 | |
---|
| 79 | <xsl:template name="one_year"> |
---|
| 80 | <xsl:param name="year"/> |
---|
[76] | 81 | <xsl:value-of select="$year"/> |
---|
[2] | 82 | <xsl:text> </xsl:text> |
---|
[76] | 83 | <xsl:value-of select="count(/descendant::d:biblioentry[child::d:biblioset[child::d:pubdate=$year]]) "/> |
---|
[2] | 84 | <xsl:text>
</xsl:text> |
---|
| 85 | </xsl:template> |
---|
| 86 | |
---|
| 87 | </xsl:stylesheet> |
---|