source: trunk/superbibmany02_xml.xsl @ 76

Last change on this file since 76 was 76, checked in by pinsard, 16 years ago

no more NEMO reference in XSL files; project information (name and home page are in main.xml

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