source: trunk/superbibmany01_xml.xsl @ 110

Last change on this file since 110 was 108, checked in by pinsard, 14 years ago

usage of option directive

  • Property svn:keywords set to Id
File size: 6.6 KB
Line 
1<?xml version="1.0" encoding="iso-8859-1"?>
2<xsl:stylesheet
3xmlns:d="http://docbook.org/ns/docbook"
4xmlns:xl="http://www.w3.org/1999/xlink"
5xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6version="1.0">
7
8<!--rst
9
10.. _superbibmany01_xml.xsl:
11
12======================
13superbibmany01_xml.xsl
14======================
15
16produce one DocBook 5 with bibliograhy references of one author in each
17
18DESCRIPTION
19===========
20
21produce one DocBook 5 with bibliograhy references of one author in each
22
23this DocBook will be chuncked for html output
24
25EVOLUTIONS
26==========
27
28$Id$
29
30- fplod 2008-09-17T09:49:51Z aedon.locean-ipsl.upmc.fr (Darwin)
31
32  * project name from main.xml file instead of a fixed one
33
34- fplod 2008-04-30T14:52:20Z aedon.locean-ipsl.upmc.fr (Darwin)
35
36  * language inherited from biblio.xml
37
38- fplod 2008-04-29T15:57:17Z aedon.locean-ipsl.upmc.fr (Darwin)
39
40  * chgt for dbk5 in
41
42- fplod 2008-04-29T08:20:09Z aedon.locean-ipsl.upmc.fr (Darwin)
43
44  * chgt for dbk5 out
45
46- fplod 2007-10-17T08:03:44Z aedon.locean-ipsl.upmc.fr (Darwin)
47
48  * improve sort (diacriticals)
49
50- fplod 2007-05-18T14:57:52Z aedon.locean-ipsl.upmc.fr (Darwin)
51
52  * modif gestion id
53
54- fplod 2007-05-16T15:19:57Z aedon.locean-ipsl.upmc.fr (Darwin)
55
56  * correction pour homonymes partiels
57
58- fplod 2007-05-04T09:23:05Z aedon.locean-ipsl.upmc.fr (Darwin)
59
60  * création à partir de bibnemomaf02_xml.xsl mais liens externes
61
62-->
63
64<xsl:output
65 method="xml"
66 indent="yes"
67 omit-xml-declaration="no"/>
68
69
70<xsl:include href="firstname_id.xsl"/>
71<xsl:include href="surname_id.xsl"/>
72<xsl:include href="table_authors.xsl"/>
73<xsl:include href="biblioentry_xml.xsl"/>
74
75<xsl:variable name="list_author_ids" select="///d:author[not( self::node() = following::d:author )]"/>
76<xsl:variable name="project">
77 <xsl:value-of select="document('main.xml')//d:keyword[@xml:id='project']"/>
78</xsl:variable>
79
80<xsl:template match="d:bibliography">
81
82<xsl:element name="article">
83<xsl:attribute name="version">5.0</xsl:attribute>
84<xsl:attribute name="xmlns">http://docbook.org/ns/docbook</xsl:attribute>
85<xsl:attribute name="xml:lang"><xsl:value-of select="@xml:lang"/></xsl:attribute>
86<title><xsl:value-of select="$project"/> - Publications - Papers by authors</title>
87<info>
88<authorgroup>
89<author><personname><firstname>Sébastien</firstname> <surname>Masson</surname></personname></author>
90<author><personname><firstname>Françoise</firstname> <surname>Pinsard</surname></personname></author>
91<!--++-->
92</authorgroup>
93<keywordset>
94<keyword><xsl:value-of select="$project"/></keyword>
95</keywordset>
96<!-- ++ date -->
97</info>
98<para>
99 This page intents to provide an exhaustive list of the papers that have used <xsl:value-of select="$project"/> and/or results from them. Obvioulsy many papers are missing. If you find omissions or mistakes please ask some modification via
100<xsl:element name="link">
101 <xsl:attribute name="xl:href">
102  <xsl:value-of select="'../../one/main.php'"/>
103 </xsl:attribute>
104 <xsl:value-of select="document('main.xml')/d:article/d:title"/>
105 <xsl:text> main page</xsl:text>
106</xsl:element>.
107</para>
108<para>
109You can also see <quote><xsl:value-of select="$project"/> - Publications - Papers</quote> sorted by
110<xsl:element name="link">
111 <xsl:attribute name="xl:href">
112  <xsl:value-of select="'../../one/superbib01.html'"/>
113 </xsl:attribute>
114<xsl:text>years</xsl:text>
115</xsl:element>.
116</para>
117<xsl:call-template name="para_lastupdate_bib">
118 <xsl:with-param name="language" select="@xml:lang"/>
119 <xsl:with-param name="date" select="d:info/d:date"/>
120</xsl:call-template>
121
122<sect1 xml:id="intro">
123<title>Introduction</title>
124<para>
125This document provide bibliography sorted by author's id (<emphasis>SURNAME_f</emphasis>).
126</para>
127
128<xsl:call-template name="table_authors">
129<xsl:with-param name="linktype" select="'external'"/>
130</xsl:call-template>
131</sect1>
132
133<!-- loop on author_ids -->
134<xsl:for-each select="$list_author_ids">
135<xsl:sort order="ascending" data-type="text" select="translate(.,'abcdefghijklmnopqrstuvwxyz éèçàùëöñó', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_EECAUEONO')"/>
136<xsl:variable name="author_id2">
137<xsl:call-template name="surname_id">
138 <xsl:with-param name="surname" select="d:personname/d:surname"/>
139</xsl:call-template>
140<xsl:text>_</xsl:text>
141<xsl:call-template name="firstname_id">
142 <xsl:with-param name="firstname" select="d:personname/d:firstname"/>
143</xsl:call-template>
144</xsl:variable>
145<!--
146<xsl:message terminate="no">
147noeud courant <xsl:value-of select="name(.)"/>
148author <xsl:value-of select="."/>
149author_id2 <xsl:value-of select="$author_id2"/>
150</xsl:message>
151-->
152<xsl:call-template name="one_author_id">
153<xsl:with-param name="author_id" select="$author_id2"/>
154<xsl:with-param name="author_name" select="."/>
155</xsl:call-template>
156</xsl:for-each>
157
158</xsl:element>
159</xsl:template>
160
161<xsl:template match="d:info/d:date"/>
162<xsl:template match="d:bibliography/d:title"/>
163
164<xsl:template name="one_author_id">
165<xsl:param name="author_id"/>
166<xsl:param name="author_name"/>
167<xsl:element name="sect1">
168<xsl:attribute name="xml:id">
169<xsl:value-of select="$author_id"/>
170</xsl:attribute>
171<xsl:element name="title">
172<xsl:value-of select="normalize-space($author_name/d:personname/d:firstname)"/><xsl:text> </xsl:text><xsl:value-of select="normalize-space($author_name/d:personname/d:surname)"/>
173</xsl:element>
174  <xsl:element name="orderedlist">
175  <!--
176    <xsl:for-each select="/descendant::d:biblioentry[descendant::d:author=$author_name]">
177  -->
178   <xsl:for-each select="//d:biblioentry">
179    <xsl:sort order="descending" data-type="number" select="./d:biblioset/d:pubdate"/>
180
181    <xsl:for-each select="descendant::d:author">
182     <xsl:sort order="ascending" data-type="text" select="translate(./d:personname,'abcdefghijklmnopqrstuvwxyz éèçàùëöñó', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_EECAUEONO')"/>
183     <xsl:variable name="author_id2">
184<xsl:call-template name="surname_id">
185 <xsl:with-param name="surname" select="d:personname/d:surname"/>
186</xsl:call-template>
187<xsl:text>_</xsl:text>
188<xsl:call-template name="firstname_id">
189 <xsl:with-param name="firstname" select="d:personname/d:firstname"/>
190</xsl:call-template>
191     </xsl:variable>
192
193<!--
194     <xsl:message terminate="no">
195      ref #<xsl:value-of select="position()"/>
196      _id appel <xsl:value-of select="$author_id"/>
197      _id fabrique <xsl:value-of select="$author_id2"/>
198      egal ? <xsl:value-of select="$author_id2 = $author_id"/>
199     </xsl:message>
200-->
201     <xsl:if test="$author_id2 = $author_id">
202  <xsl:call-template name="one_biblioentry">
203   <xsl:with-param name="visu_modif" select="'visu'"/>
204   <xsl:with-param name="type" select="'raw'"/>
205   <xsl:with-param name="my_biblioentry" select="ancestor::d:biblioentry"/>
206  </xsl:call-template>
207     </xsl:if>
208    </xsl:for-each>
209   </xsl:for-each>
210  </xsl:element>
211 </xsl:element>
212</xsl:template>
213
214</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.