Changeset 16


Ignore:
Timestamp:
06/08/07 10:48:40 (17 years ago)
Author:
pinsard
Message:

add total nb of publications in years table. see ticket:6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bibnemomaf01_xml.xsl

    r6 r16  
    1111$Id$ 
    1212++ plein de trucs 
     13fplod 2007-06-08T08:36:48Z aedon.locean-ipsl.upmc.fr (Darwin) 
     14add total nb of publications in one cell. quite interesting usage of 
     15XPATH to determine mininum and maximum value of a element ! 
    1316fplod 2007-05-21T14:06:53Z aedon.locean-ipsl.upmc.fr (Darwin) 
    1417ajout de plot nbpub/years 
     
    5255  <xsl:attribute name="colsep">1</xsl:attribute> 
    5356  <xsl:attribute name="rowsep">1</xsl:attribute> 
     57  <xsl:for-each select="///pubdate[not( self::node() = following::pubdate )]"> 
     58   <xsl:sort order="descending" data-type="number" select="."/> 
     59   <xsl:element name="colspec"> 
     60    <xsl:attribute name="colname">year_<xsl:value-of select="."/></xsl:attribute> 
     61   </xsl:element> 
     62  </xsl:for-each> 
    5463  <xsl:element name="tbody"> 
    5564   <xsl:element name="row"> 
     
    5766     <xsl:sort order="descending" data-type="number" select="."/> 
    5867     <xsl:element name="entry"> 
     68      <xsl:attribute name="colname"><xsl:text>year_</xsl:text><xsl:value-of select="."/></xsl:attribute> 
    5969      <xsl:element name="ulink"> 
    6070       <xsl:attribute name="url"><xsl:text>#year_</xsl:text><xsl:value-of select="."/></xsl:attribute> 
     
    6878     <xsl:sort order="descending" data-type="number" select="."/> 
    6979     <xsl:element name="entry"> 
     80      <xsl:attribute name="colname"><xsl:text>year_</xsl:text><xsl:value-of select="."/></xsl:attribute> 
    7081      <xsl:element name="emphasis"> 
    7182       <xsl:attribute name="role">bold</xsl:attribute> 
     
    7889     </xsl:element> 
    7990    </xsl:for-each> 
     91   </xsl:element> 
     92   <xsl:variable name="year_min"> 
     93    <xsl:value-of select="///pubdate[not(. &gt; ///pubdate)]"/> 
     94   </xsl:variable> 
     95   <xsl:variable name="year_max"> 
     96    <xsl:value-of select="///pubdate[not(. &lt; ///pubdate)]"/> 
     97   </xsl:variable> 
     98   <xsl:element name="row"> 
     99    <xsl:element name="entry"> 
     100     <xsl:attribute name="namest"><xsl:value-of select="concat('year_',$year_max)"/></xsl:attribute> 
     101      <xsl:attribute name="nameend"><xsl:value-of select="concat('year_',$year_min)"/></xsl:attribute> 
     102     <xsl:element name="emphasis"> 
     103      <xsl:attribute name="role">bold</xsl:attribute> 
     104       <xsl:value-of select="count(/descendant::biblioentry)"/> 
     105     </xsl:element> 
     106    </xsl:element> 
    80107   </xsl:element> 
    81108  </xsl:element> 
Note: See TracChangeset for help on using the changeset viewer.