source: trunk/superbibmany02_xml.xsl @ 100

Last change on this file since 100 was 95, checked in by pinsard, 14 years ago

add rest2web for manuals production (and start sphinx but not yet ok)

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