source: trunk/superbibmany02_xml.xsl @ 164

Last change on this file since 164 was 152, checked in by pinsard, 12 years ago

going on with restsuperbibmany01_xml.xsl

  • Property svn:keywords set to Id
File size: 6.2 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:with-param name="mode" select="'dbk'"/>
120</xsl:call-template>
121
122<xsl:call-template name="para_lastupdate_user">
123 <xsl:with-param name="language" select="@xml:lang"/>
124 <xsl:with-param name="date" select="document('user.xml')/users/date"/>
125 <xsl:with-param name="mode" select="'dbk'"/>
126</xsl:call-template>
127
128<xsl:call-template name="table_authors">
129 <xsl:with-param name="linktype" select="'external'"/>
130</xsl:call-template>
131
132</sect1>
133
134<!-- loop on author_ids -->
135<xsl:for-each select="$list_author_ids">
136 <xsl:sort order="ascending" data-type="text" select="translate(.,'abcdefghijklmnopqrstuvwxyz éèçàùëöñó', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_EECAUEONO')"/>
137 <xsl:variable name="author_id2">
138<xsl:call-template name="surname_id">
139 <xsl:with-param name="surname" select="d:personname/d:surname"/>
140</xsl:call-template>
141<xsl:text>_</xsl:text>
142<xsl:call-template name="firstname_id">
143 <xsl:with-param name="firstname" select="d:personname/d:firstname"/>
144</xsl:call-template>
145</xsl:variable>
146<!--
147<xsl:message terminate="no">
148 noeud courant <xsl:value-of select="name(.)"/>
149 author <xsl:value-of select="."/>
150 author_id2 <xsl:value-of select="$author_id2"/>
151</xsl:message>
152-->
153 <xsl:call-template name="one_author_id">
154  <xsl:with-param name="author_id" select="$author_id2"/>
155  <xsl:with-param name="author_name" select="."/>
156 </xsl:call-template>
157</xsl:for-each>
158
159</xsl:element>
160</xsl:template>
161
162<xsl:template match="d:info/d:date"/>
163<xsl:template match="d:bibliography/d:title"/>
164
165<xsl:template name="one_author_id">
166 <xsl:param name="author_id"/>
167 <xsl:param name="author_name"/>
168 <xsl:element name="sect1">
169  <xsl:attribute name="xml:id">
170   <xsl:value-of select="$author_id"/>
171  </xsl:attribute>
172  <xsl:element name="title">
173<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)"/>
174  </xsl:element>
175  <xsl:element name="para">
176   The mail sent by filling this form will be used to update
177<link xl:href="../../one/main.php"><xsl:value-of select="$project"/> Publications-Papers</link>
178and <link xl:href="../../one/user.html"><xsl:value-of select="$project"/> Users</link>.
179  </xsl:element>
180
181  <xsl:choose>
182   <xsl:when test="document('user.xml')/users/user[descendant::userid=$author_id]/userid = $author_id">
183    <xsl:call-template name="form_db">
184     <xsl:with-param name="author_id" select="$author_id"/>
185     <xsl:with-param name="user" select="document('user.xml')/users/user[descendant::userid=$author_id]"/>
186     <xsl:with-param name="visu_modif" select="'modif'"/>
187     <xsl:with-param name="bibmode" select="'yes'"/>
188    </xsl:call-template>
189   </xsl:when>
190   <xsl:otherwise>
191    <xsl:call-template name="form_db">
192     <xsl:with-param name="author_id" select="$author_id"/>
193     <xsl:with-param name="user" select="document('user.xml')/users/user[descendant::userid='template']"/>
194     <xsl:with-param name="visu_modif" select="'modif'"/>
195     <xsl:with-param name="bibmode" select="'yes'"/>
196    </xsl:call-template>
197   </xsl:otherwise>
198  </xsl:choose>
199 </xsl:element>
200</xsl:template>
201
202</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.