source: trunk/superbibmany02_xml.xsl @ 140

Last change on this file since 140 was 114, checked in by pinsard, 13 years ago

fix for authors survey

  • Property svn:keywords set to Id
File size: 6.1 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.. _superbibmany02_xml.xsl:
11
12======================
13superbibmany02_xml.xsl
14======================
15
16DESCRIPTION
17===========
18
19produce one DocBook 5 with a form containing bibliograhy references and general
20information of one author/user
21
22this DocBook will be chuncked for html output
23
24TODO
25====
26
27EVOLUTIONS
28==========
29
30$Id$
31
32- fplod 20110629T135204Z cratos.locean-ipsl.upmc.fr (Linux)
33
34  * authorgroup is found in main.xml
35
36- fplod 2008-09-17T10:40:43Z aedon.locean-ipsl.upmc.fr (Darwin)
37
38  * project name from main.xml file instead of a fixed one
39
40- fplod 2008-04-30T14:52:55Z aedon.locean-ipsl.upmc.fr (Darwin)
41
42  * language inherited from biblio.xml
43
44- fplod 2008-04-30T06:44:31Z aedon.locean-ipsl.upmc.fr (Darwin)
45
46  * chgt for dbk5 in
47
48- fplod 2007-10-17T08:06:40Z aedon.locean-ipsl.upmc.fr (Darwin)
49
50  * improve sort (diacriticals)
51
52- fplod 2007-05-18T14:59:29Z aedon.locean-ipsl.upmc.fr (Darwin)
53
54  * modif gestion id
55
56- fplod 2007-05-16T15:28:56Z aedon.locean-ipsl.upmc.fr (Darwin)
57
58  * correction pour homonymes partiels
59
60- fplod 2007-05-15T15:07:37Z aedon.locean-ipsl.upmc.fr (Darwin)
61
62  * modification to see user/userid="template" information if author_id
63    doesn't exit in users datafile
64
65- fplod 2007-04-16T08:10:06Z aedon.locean-ipsl.upmc.fr (Darwin)
66
67  * creation
68
69-->
70
71<xsl:output
72 method="xml"
73 indent="yes"
74 encoding="ISO-8859-1"
75 omit-xml-declaration="yes"/>
76
77
78<xsl:include href="firstname_id.xsl"/>
79<xsl:include href="surname_id.xsl"/>
80<xsl:include href="table_authors.xsl"/>
81<xsl:include href="form_db.xsl"/>
82
83<xsl:variable name="list_author_ids" select="///d:author[not( self::node() = following::d:author )]"/>
84
85<xsl:variable name="project">
86 <xsl:value-of select="document('main.xml')//d:keyword[@xml:id='project']"/>
87</xsl:variable>
88
89<xsl:template match="d:bibliography">
90
91<xsl:element name="article">
92<xsl:attribute name="version">5.0</xsl:attribute>
93<xsl:attribute name="xmlns">http://docbook.org/ns/docbook</xsl:attribute>
94<xsl:attribute name="xml:lang"><xsl:value-of select="@xml:lang"/></xsl:attribute>
95<title><xsl:value-of select="$project"/> - Known users</title>
96<info>
97<authorgroup>
98<xsl:copy-of select="document('main.xml')//d:info/d:authorgroup"/>
99</authorgroup>
100<keywordset>
101<keyword><xsl:value-of select="$project"/></keyword>
102</keywordset>
103<!-- ++ date -->
104</info>
105<sect1 xml:id="intro">
106<title>Intro</title>
107 <xsl:element name="para">
108These pages intent to provide an form for every known user of <xsl:value-of select="$project"/> with bibliography and information.
109 </xsl:element>
110<xsl:element name="para">
111   The mail sent by filling these forms will be used to update
112<link xl:href="../../one/main.php"><xsl:value-of select="$project"/>-Publications-Papers</link>
113and <link xl:href="../../one/user.html"><xsl:value-of select="$project"/> Users</link>.
114</xsl:element>
115
116<xsl:call-template name="para_lastupdate_bib">
117 <xsl:with-param name="language" select="@xml:lang"/>
118 <xsl:with-param name="date" select="d:info/d:date"/>
119</xsl:call-template>
120
121<xsl:call-template name="para_lastupdate_user">
122 <xsl:with-param name="language" select="@xml:lang"/>
123 <xsl:with-param name="date" select="document('user.xml')/users/date"/>
124</xsl:call-template>
125
126<xsl:call-template name="table_authors">
127 <xsl:with-param name="linktype" select="'external'"/>
128</xsl:call-template>
129
130</sect1>
131
132<!-- loop on author_ids -->
133<xsl:for-each select="$list_author_ids">
134 <xsl:sort order="ascending" data-type="text" select="translate(.,'abcdefghijklmnopqrstuvwxyz éèçàùëöñó', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_EECAUEONO')"/>
135 <xsl:variable name="author_id2">
136<xsl:call-template name="surname_id">
137 <xsl:with-param name="surname" select="d:personname/d:surname"/>
138</xsl:call-template>
139<xsl:text>_</xsl:text>
140<xsl:call-template name="firstname_id">
141 <xsl:with-param name="firstname" select="d:personname/d:firstname"/>
142</xsl:call-template>
143</xsl:variable>
144<!--
145<xsl:message terminate="no">
146 noeud courant <xsl:value-of select="name(.)"/>
147 author <xsl:value-of select="."/>
148 author_id2 <xsl:value-of select="$author_id2"/>
149</xsl:message>
150-->
151 <xsl:call-template name="one_author_id">
152  <xsl:with-param name="author_id" select="$author_id2"/>
153  <xsl:with-param name="author_name" select="."/>
154 </xsl:call-template>
155</xsl:for-each>
156
157</xsl:element>
158</xsl:template>
159
160<xsl:template match="d:info/d:date"/>
161<xsl:template match="d:bibliography/d:title"/>
162
163<xsl:template name="one_author_id">
164 <xsl:param name="author_id"/>
165 <xsl:param name="author_name"/>
166 <xsl:element name="sect1">
167  <xsl:attribute name="xml:id">
168   <xsl:value-of select="$author_id"/>
169  </xsl:attribute>
170  <xsl:element name="title">
171<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)"/>
172  </xsl:element>
173  <xsl:element name="para">
174   The mail sent by filling this form will be used to update
175<link xl:href="../../one/main.php"><xsl:value-of select="$project"/> Publications-Papers</link>
176and <link xl:href="../../one/user.html"><xsl:value-of select="$project"/> Users</link>.
177  </xsl:element>
178
179  <xsl:choose>
180   <xsl:when test="document('user.xml')/users/user[descendant::userid=$author_id]/userid = $author_id">
181    <xsl:call-template name="form_db">
182     <xsl:with-param name="author_id" select="$author_id"/>
183     <xsl:with-param name="user" select="document('user.xml')/users/user[descendant::userid=$author_id]"/>
184     <xsl:with-param name="visu_modif" select="'modif'"/>
185     <xsl:with-param name="bibmode" select="'yes'"/>
186    </xsl:call-template>
187   </xsl:when>
188   <xsl:otherwise>
189    <xsl:call-template name="form_db">
190     <xsl:with-param name="author_id" select="$author_id"/>
191     <xsl:with-param name="user" select="document('user.xml')/users/user[descendant::userid='template']"/>
192     <xsl:with-param name="visu_modif" select="'modif'"/>
193     <xsl:with-param name="bibmode" select="'yes'"/>
194    </xsl:call-template>
195   </xsl:otherwise>
196  </xsl:choose>
197 </xsl:element>
198</xsl:template>
199
200</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.