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