Changeset 151
- Timestamp:
- 02/28/12 18:08:25 (12 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/biblioentry_rest.xsl
r150 r151 8 8 9 9 <!-- 10 module : 11 traitement d'une référence bibliographique (biblioentry) 12 13 update : 10 11 DESCRIPTION 12 =========== 13 14 traitement d'une référence bibliographique (biblioentry) en ReST 15 16 EVOLUTIONS 17 ========== 18 14 19 $Id$ 15 fplod 2008-05-15T09:18:54Z aedon.locean-ipsl.upmc.fr (Darwin) 16 correction on separators between authors for bibtex 17 fplod 2008-05-14T08:51:10Z aedon.locean-ipsl.upmc.fr (Darwin) 18 introducting bibtex (latex) output 19 fplod 2008-05-13T15:24:49Z aedon.locean-ipsl.upmc.fr (Darwin) 20 add parameter type (default raw) 21 fplod 2008-05-13T09:17:14Z aedon.locean-ipsl.upmc.fr (Darwin) 22 bibliomisc is written after biblioid 23 fplod 2008-05-07T09:06:53Z aedon.locean-ipsl.upmc.fr (Darwin) 24 improvements for conference 25 fplod 2008-05-06T09:35:00Z aedon.locean-ipsl.upmc.fr (Darwin) 26 add category choices 27 fplod 2008-04-29T15:41:56Z aedon.locean-ipsl.upmc.fr (Darwin) 28 chgt for dbk5 in 29 fplod 2008-04-29T09:10:31Z aedon.locean-ipsl.upmc.fr (Darwin) 30 chgt for dbk5 out 31 fplod 2007-06-20T17:18:02Z aedon.locean-ipsl.upmc.fr (Darwin) 32 <bibliomisc role="id"> replaced by <biblioid class="doi"> 33 fplod 2007-05-16T14:01:44Z aedon.locean-ipsl.upmc.fr (Darwin) 34 correction in order to write doi only once 35 fplod 2007-05-16T10:27:34Z aedon.locean-ipsl.upmc.fr (Darwin) 36 remove biblioentry/date and publisher 37 add biblioentry/biblioset/bibliomisc 38 fplod 2007-05-15T07:37:46Z aedon.locean-ipsl.upmc.fr (Darwin) 39 factorisation de biblioentry 40 fplod 2007-05-14T15:48:04Z aedon.locean-ipsl.upmc.fr (Darwin) 41 correction to add biblioentry/date (replace biblioentry/biblioset/pubdate) 42 when "in press" 43 fplod 2007-05-04T07:59:34Z aedon.locean-ipsl.upmc.fr (Darwin) 44 factorisation de bibnemomaf01_xml.xsl, bibnemomaf02_xml.xsl,bibnemomaf04_xml.xsl 20 21 $URL$ 22 23 - fplod 20120228 24 25 * creation from biblioentry_rest.xsl 26 45 27 --> 46 28 … … 49 31 <xsl:include href="message_lang.xsl"/> 50 32 51 <xsl:template name="one_biblioentry ">33 <xsl:template name="one_biblioentry_rest"> 52 34 <xsl:param name="visu_modif"/> 53 35 <xsl:param name="type"/> … … 416 398 417 399 <xsl:template match="d:biblioentry/d:title" mode="raw"> 418 <xsl:text> : </xsl:text> 419 <xsl:value-of select="normalize-space(.)"/> 400 <xsl:text> : *</xsl:text> 401 <xsl:value-of select="normalize-space(.)"/> 402 <xsl:text>*</xsl:text> 420 403 </xsl:template> 421 404 … … 438 421 439 422 <xsl:template match="d:biblioset[@relation='conference']/d:title" mode="raw"> 440 <xsl:text>, </xsl:text> 441 <xsl:value-of select="normalize-space(.)"/> 423 <xsl:text>, *</xsl:text> 424 <xsl:value-of select="normalize-space(.)"/> 425 <xsl:text>*</xsl:text> 442 426 </xsl:template> 443 427 … … 525 509 <xsl:template match="d:biblioid[@class='uri']" mode="raw"> 526 510 <xsl:text>, </xsl:text> 527 <xsl:element name="link"> 528 <xsl:attribute name="xl:href"><xsl:value-of select="normalize-space(.)"/></xsl:attribute> 529 </xsl:element> 511 <xsl:value-of select="normalize-space(.)"/> 530 512 </xsl:template> 531 513 … … 548 530 <xsl:text> : </xsl:text> 549 531 <xsl:value-of select="normalize-space(.)"/> 550 <xsl:text>}</xsl:text>551 </xsl:template>552 553 <xsl:template match="d:biblioid[@class='doi']" mode="bibtex">554 <xsl:choose>555 <xsl:when test=". = '???'">556 <xsl:message> iii : no doi found for557 <xsl:value-of select="ancestor::d:biblioentry/@xml:id"/>558 </xsl:message>559 </xsl:when>560 <xsl:otherwise>561 <!-- ++ transformer 10.1029/2003GL018906 en un lien sur http://dx.doi.org/10.1029/2003GL018906 par exemple562 -->563 <xsl:text>, doi = {</xsl:text> <!-- ++ pas sûre, peut-être seulement note = {doi:..} -->564 <xsl:value-of select="normalize-space(.)"/>565 </xsl:otherwise>566 </xsl:choose>567 532 <xsl:text>}</xsl:text> 568 533 </xsl:template> … … 577 542 <xsl:otherwise> 578 543 <!-- transformer 10.1029/2003GL018906 en un lien sur http://dx.doi.org/10.1029/2003GL018906 par exemple --> 579 <xsl:text>, </xsl:text> 580 <xsl:element name="link"> 581 <xsl:attribute name="xl:href"> 582 <xsl:text>http://dx.doi.org/</xsl:text> 544 <xsl:text>,`</xsl:text> 583 545 <xsl:value-of select="normalize-space(.)"/> 584 </xsl:attribute> 585 <xsl:text>doi:</xsl:text><xsl:value-of select="normalize-space(.)"/> 586 </xsl:element> 546 <xsl:text> <http://dx.doi.org/</xsl:text><xsl:value-of select="normalize-space(.)"/><xsl:text>>`_</xsl:text> 587 547 </xsl:otherwise> 588 548 </xsl:choose> -
trunk/makefile
r150 r151 25 25 # 26 26 # - fplod 20120227 27 # 27 # 28 28 # * move demo1 and nemo1 in tests 29 29 # … … 32 32 # * add "Check SUPERBIB requirements in main.xml : " usage of checkmain.sh 33 33 # only procedure instructions 34 # 34 # 35 35 # - fplod 20110701T105417Z cratos.locean-ipsl.upmc.fr (Linux) 36 36 # … … 140 140 --param generate.section.toc.level '0' \ 141 141 --param citerefentry.link '1' 142 143 XSLPARAMRST = \ 144 --param makedate "'$(MAKEDATE)'" 142 145 143 146 IMAGES = \ … … 329 332 330 333 $(DIRSPHINX)/$(PRODUCT)01.rst : \ 331 $(DIRTMP)/ $(PRODUCT)01.xml \334 $(DIRTMP)/biblio.xml \ 332 335 $(DIRWWW)/images/years.png \ 333 $(DIRSRC)/$(PRODUCT).css \334 $(DIRSRC)/style.css \335 336 $(DIRSRC)/$(PRODUCT)01_rest.xsl \ 337 $(DIRSRC)/biblioentry_rest.xsl \ 336 338 $(DIRSRC)/db_rest.xsl \ 337 339 $(DIRSRC)/message_lang.xsl \ 338 340 $(DIRTMP)/titlepage.$(PRODUCT).xsl 339 341 @xsltproc \ 340 $(XSLPARAM HTML) \342 $(XSLPARAMRST) \ 341 343 --output $@ \ 342 344 $(DIRSRC)/$(PRODUCT)01_rest.xsl \ … … 369 371 $(DIRSPHINX)/$(PRODUCT)02.rst : \ 370 372 $(DIRTMP)/$(PRODUCT)02.xml \ 371 $(DIRSRC)/$(PRODUCT).css \ 372 $(DIRSRC)/style.css \ 373 $(DIRSRC)/$(PRODUCT)01_rest.xsl \ 373 $(DIRSRC)/$(PRODUCT)02_rest.xsl \ 374 $(DIRSRC)/biblioentry_rest.xsl \ 374 375 $(DIRSRC)/db_rest.xsl \ 375 376 $(DIRSRC)/message_lang.xsl \ 376 377 $(DIRTMP)/titlepage.$(PRODUCT).xsl 377 378 @xsltproc \ 378 $(XSLPARAM HTML) \379 --output $@ \ 380 $(DIRSRC)/$(PRODUCT)0 1_rest.xsl \379 $(XSLPARAMRST) \ 380 --output $@ \ 381 $(DIRSRC)/$(PRODUCT)02_rest.xsl \ 381 382 $< 382 383 … … 394 395 $< 395 396 396 $(DIRSPHINX)/$(PRODUCT)02/ : 397 $(DIRSPHINX)/$(PRODUCT)02/ : 397 398 @echo "not yet" 398 399 … … 442 443 $< 443 444 444 $(DIRSPHINX)/$(PRODUCT)01/ : 445 $(DIRSPHINX)/$(PRODUCT)01/ : 445 446 @echo "not yet" 446 447 … … 568 569 569 570 $(DIRTMP)/main_full.xml : \ 570 $(DIR SRC)/main.xml \571 $(DIRTMP)/main.xml \ 571 572 $(DIRSRC)/select_form.php \ 572 573 $(DIRTMP)/select_id.xml … … 589 590 $(DIRSPHINX)/user.rst: \ 590 591 $(DIRTMP)/user_db.xml \ 591 $(DIRSRC)/db_rest.xsl \592 592 $(DIRSRC)/user_rest.xsl \ 593 593 $(DIRSRC)/message_lang.xsl \ … … 595 595 $(DIRSRC)/form_rest.xsl 596 596 @xsltproc \ 597 $(XSLPARAM HTML) \597 $(XSLPARAMRST) \ 598 598 --output $@ \ 599 599 $(DIRSRC)/user_rest.xsl \ -
trunk/superbib01_rest.xsl
r116 r151 1 <?xml version= '1.0' encoding='ISO-8859-1'?>1 <?xml version="1.0" encoding="iso-8859-1"?> 2 2 <xsl:stylesheet 3 version="1.0" 3 4 xmlns:d="http://docbook.org/ns/docbook" 4 xmlns:x sl="http://www.w3.org/1999/XSL/Transform"5 version="1.0">5 xmlns:xl="http://www.w3.org/1999/xlink" 6 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 6 7 7 8 <!--rst 8 9 9 .. _superbib01_rest.xsl: 10 11 =================== 12 superbib01_rest.xsl 13 =================== 14 15 transformation docbook en un rest 10 .. _superbib01_xml.xsl: 11 12 ================== 13 superbib01_xml.xsl 14 ================== 15 16 produce a DocBook 5 with bibliograhy references sorted by years 17 18 SEE ALSO 19 ======== 20 21 :ref:`biblioentry_rest.xsl` 16 22 17 23 TODO 18 24 ==== 19 25 20 make it work 26 link sur top chaque section 27 :ref:`top` ../../images/globalicondl11x10_up.gif 28 29 tableau d'années 21 30 22 31 EVOLUTIONS … … 24 33 25 34 $Id$ 26 $URL$ 27 28 - fplod 20110629T131028Z aedon.locean-ipsl.upmc.fr (Darwin) 29 30 * création 35 36 - fplod 2001228 37 38 * recreation 31 39 32 40 --> 33 41 34 <xsl:import href="db_rest.xsl"/> 35 36 <xsl:output method="text"/> 37 38 <xsl:include href="titlepage.superbib.xsl"/> 39 <xsl:include href="message_lang.xsl"/> 40 41 <xsl:template match="*" mode="book.titlepage.mode"/> 42 <xsl:param name="generate.toc"> 43 article nop 44 </xsl:param> 45 <xsl:param name="css.decoration" select="0"/> 46 <xsl:param name="section.autolabel" select="0"/> 47 42 <xsl:output 43 method="text" 44 indent="yes"/> 45 46 <xsl:include href="biblioentry_rest.xsl"/> 47 48 <xsl:variable name="list_years" select="///d:pubdate[not( self::node() = following::d:pubdate )]"/> 49 50 <xsl:variable name="project"> 51 <xsl:value-of select="document('main.xml')//d:keyword[@xml:id='project']"/> 52 </xsl:variable> 53 54 <xsl:template name="years"> 48 55 <!-- 49 Personalisation de bas de page 56 creation of an informatable of nb years 57 each entry of the table is a link #year_xxxx 50 58 --> 51 <xsl:template name="user.footer.content"> 52 <xsl:call-template name="para_lastupdate"> 53 <xsl:with-param name="language" select="/article/@xml:lang"/> 54 <xsl:with-param name="date" select="$makedate"/> 55 <xsl:with-param name="mode" select="'rest'"/> 56 </xsl:call-template> 57 58 <hr/> 59 <para> 60 <xsl:call-template name="back"> 61 <xsl:with-param name="language" select="/article/@xml:lang"/> 62 </xsl:call-template> 63 <xsl:text> </xsl:text> 64 <xsl:element name="a"> 65 <xsl:attribute name="href"> 66 <xsl:value-of select="document('main.xml')//d:bibliosource[@xml:id='homepage']"/> 67 </xsl:attribute> 68 <xsl:value-of select="document('main.xml')//d:keyword[@xml:id='project']"/> home page 59 <xsl:element name="informaltable"> 60 <xsl:attribute name="xml:id">years</xsl:attribute> 61 <xsl:attribute name="summary">years of publications</xsl:attribute> 62 <xsl:element name="tgroup"> 63 <xsl:variable name="nb_cols" select="count($list_years)"/> 64 <xsl:attribute name="cols"><xsl:value-of select="$nb_cols"/></xsl:attribute> 65 <xsl:attribute name="align">center</xsl:attribute> 66 <xsl:attribute name="colsep">1</xsl:attribute> 67 <xsl:attribute name="rowsep">1</xsl:attribute> 68 <xsl:for-each select="///d:pubdate[not( self::node() = following::d:pubdate )]"> 69 <xsl:sort order="descending" data-type="number" select="."/> 70 <xsl:element name="colspec"> 71 <xsl:attribute name="colname">year_<xsl:value-of select="."/></xsl:attribute> 72 </xsl:element> 73 </xsl:for-each> 74 <xsl:element name="tbody"> 75 <xsl:element name="row"> 76 <xsl:for-each select="///d:pubdate[not( self::node() = following::d:pubdate )]"> 77 <xsl:sort order="descending" data-type="number" select="."/> 78 <xsl:element name="entry"> 79 <xsl:attribute name="colname"><xsl:text>year_</xsl:text><xsl:value-of select="."/></xsl:attribute> 80 <xsl:element name="link"> 81 <xsl:attribute name="xl:href"><xsl:text>#year_</xsl:text><xsl:value-of select="."/></xsl:attribute> 82 <xsl:value-of select="."/> 83 </xsl:element> 84 </xsl:element> 85 </xsl:for-each> 86 </xsl:element> 87 <xsl:element name="row"> 88 <xsl:for-each select="///d:pubdate[not( self::node() = following::d:pubdate )]"> 89 <xsl:sort order="descending" data-type="number" select="."/> 90 <xsl:element name="entry"> 91 <xsl:attribute name="colname"><xsl:text>year_</xsl:text><xsl:value-of select="."/></xsl:attribute> 92 <xsl:element name="emphasis"> 93 <xsl:attribute name="role">bold</xsl:attribute> 94 <xsl:variable name="nb_current"> 95 <xsl:variable name="current_year"><xsl:value-of select="."/></xsl:variable> 96 <xsl:value-of select="count(/descendant::d:biblioentry[child::d:biblioset[child::d:pubdate=$current_year]])"/> 97 </xsl:variable> 98 <xsl:value-of select="$nb_current"/> 99 </xsl:element> 100 </xsl:element> 101 </xsl:for-each> 102 </xsl:element> 103 <xsl:variable name="year_min"> 104 <xsl:value-of select="///d:pubdate[not(. > ///d:pubdate)]"/> 105 </xsl:variable> 106 <xsl:variable name="year_max"> 107 <xsl:value-of select="///d:pubdate[not(. < ///d:pubdate)]"/> 108 </xsl:variable> 109 <xsl:element name="row"> 110 <xsl:element name="entry"> 111 <xsl:attribute name="namest"><xsl:value-of select="concat('year_',$year_max)"/></xsl:attribute> 112 <xsl:attribute name="nameend"><xsl:value-of select="concat('year_',$year_min)"/></xsl:attribute> 113 <xsl:element name="emphasis"> 114 <xsl:attribute name="role">bold</xsl:attribute> 115 <xsl:value-of select="count(/descendant::d:biblioentry)"/> 116 </xsl:element> 117 </xsl:element> 118 </xsl:element> 69 119 </xsl:element> 70 </para>71 120 </xsl:element> 121 </xsl:element> 72 122 </xsl:template> 73 123 124 <xsl:template match="d:bibliography"> 125 126 <xsl:value-of select="$project"/> - Publications - Papers by years 127 ================================================================== 128 129 .. _top: 130 131 This page intents to provide an exhaustive list of the papers that have used 132 <xsl:value-of select="$project"/> and/or results from them. 133 Obvioulsy many papers are missing. 134 If you find omissions or mistakes please ask some modification via 135 :ref:`main` 136 137 You can also see **<xsl:value-of select="$project"/> - Publications - Papers** sorted by 138 authors in :ref:`superbib02` 139 or in :ref:`superbib01many` several 140 one by author) 141 142 <xsl:call-template name="para_lastupdate_bib"> 143 <xsl:with-param name="language" select="@xml:lang"/> 144 <xsl:with-param name="date" select="d:info/d:date"/> 145 </xsl:call-template> 146 147 <xsl:call-template name="years"/> 148 149 .. _fig_pubbyyears: 150 151 .. figure:: ../../images/years.png 152 :alt:[years.png] 153 154 Nb of publications by years 155 156 .. _intro: 157 158 Introduction 159 ============ 160 161 This document provide bibliography sorted by year. 162 163 <!-- loop on years --> 164 <xsl:for-each select="$list_years"> 165 <xsl:sort order="descending" data-type="number" select="."/> 166 <xsl:call-template name="one_year"> 167 <xsl:with-param name="year" select="."/> 168 </xsl:call-template> 169 </xsl:for-each> 170 </xsl:template> 171 172 <xsl:template match="d:info/d:date"/> 173 <xsl:template match="d:bibliography/d:title"/> 174 175 <xsl:template name="one_year"> 176 <xsl:param name="year"/> 177 <!-- 178 <xsl:message>call template avec <xsl:value-of select="$year"/></xsl:message> 179 <xsl:message>noeud courant <xsl:value-of select="name(.)"/></xsl:message> 180 <xsl:message> 181 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])"/> 182 </xsl:message> 183 --> 184 185 .. _<xsl:value-of select="concat('year_',$year)"/>: 186 187 <xsl:value-of select="$year"/> 188 ========= 189 190 191 <xsl:for-each select="/descendant::d:biblioentry[child::d:biblioset[child::d:pubdate=$year]]|/descendant::d:biblioentry[child::d:date=$year]"> 192 <xsl:sort order="ascending" data-type="text" select="translate(./authorgroup/author/personname,'abcdefghijklmnopqrstuvwxyz éèçàùëöñó','ABCDEFGHIJKLMNOPQRSTUVWXYZ_EECAUEONO')"/> 193 <xsl:text>
</xsl:text> 194 <xsl:text>- </xsl:text> 195 <xsl:call-template name="one_biblioentry_rest"> 196 <xsl:with-param name="visu_modif" select="'visu'"/> 197 <xsl:with-param name="type" select="'raw'"/> 198 <xsl:with-param name="my_biblioentry" select="."/> 199 </xsl:call-template> 200 <xsl:text>
</xsl:text> 201 </xsl:for-each> 202 </xsl:template> 203 74 204 </xsl:stylesheet> -
trunk/user_rest.xsl
r116 r151 31 31 32 32 --> 33 34 <xsl:import href="db_rest.xsl"/>35 33 36 34 <xsl:output method="text"/>
Note: See TracChangeset
for help on using the changeset viewer.