source: trunk/form_db.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: 7.0 KB
Line 
1<?xml version="1.0" encoding="iso-8859-1"?>
2<xsl:stylesheet
3version="1.0"
4xmlns:d="http://docbook.org/ns/docbook"
5xmlns:html="http://www.w3.org/1999/xhtml"
6xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
7
8<!--rst
9NAME
10====
11
12creation du formulaire
13
14EVOLUTIONS
15==========
16
17$Id$
18
19- fplod 2008-09-17T09:49:51Z aedon.locean-ipsl.upmc.fr (Darwin)
20
21  * project name from main.xml file instead of a fixed one
22
23- fplod 2008-04-29T08:57:43Z aedon.locean-ipsl.upmc.fr (Darwin)
24
25  * chgt for dbk5
26
27- fplod 2007-10-17T08:07:50Z aedon.locean-ipsl.upmc.fr (Darwin)
28
29  * improve sort (diacriticals)
30
31- fplod 2007-05-18T14:56:32Z aedon.locean-ipsl.upmc.fr (Darwin)
32
33  * modif gestion de id
34
35- fplod 2007-05-15T07:41:16Z aedon.locean-ipsl.upmc.fr (Darwin)
36
37  * factorisation de biblioentry
38
39- fplod 2007-04-27T10:53:20Z aedon.locean-ipsl.upmc.fr (Darwin)
40
41  * inclusion de php d'après http://www.cygwin.com/ml/docbook-apps/2005-q1/msg00484.html
42
43- fplod 2007-04-26T12:08:09Z aedon.locean-ipsl.upmc.fr (Darwin)
44
45  * creation
46-->
47
48<xsl:include href="personal_db.xsl"/>
49<xsl:include href="compilers_db.xsl"/>
50<xsl:include href="platforms_db.xsl"/>
51<xsl:include href="components_db.xsl"/>
52<xsl:include href="comments_db.xsl"/>
53<xsl:include href="newreferences_db.xsl"/>
54<xsl:include href="processors_db.xsl"/>
55<xsl:include href="biblioentry_xml.xsl"/>
56
57<xsl:template name="form_db">
58<!-- ++ template ou existant visu ou modif -->
59 <xsl:param name="user"/>
60 <xsl:param name="author_id"/>
61 <xsl:param name="visu_modif"/>
62 <xsl:param name="bibmode"/>
63
64 <xsl:text>&#xA;</xsl:text>
65 <xsl:element name="html:form">
66  <xsl:choose>
67   <xsl:when test="$visu_modif= 'modif'">
68    <xsl:attribute name="action">
69     <xsl:value-of select="$link.mailto.url"/><xsl:text>?subject=[</xsl:text><xsl:value-of select="document('main.xml')/d:article/d:title"/><xsl:text>]</xsl:text>
70     <!-- value is completed in form_html.xsl because of php sequence ++ -->
71    </xsl:attribute>
72    <xsl:attribute name="method">post</xsl:attribute>
73    <xsl:attribute name="enctype">text/plain</xsl:attribute>
74    <xsl:text>&#xA;</xsl:text>
75    <xsl:element name="html:input">
76     <xsl:attribute name="name">message</xsl:attribute>
77     <xsl:attribute name="type">hidden</xsl:attribute>
78     <xsl:attribute name="value"><xsl:text>Thank you for your contribution to </xsl:text><xsl:value-of select="document('main.xml')/d:article/d:title"/></xsl:attribute>
79    </xsl:element>
80    <xsl:text>&#xA;</xsl:text>
81    <xsl:element name="html:input">
82     <xsl:attribute name="name">server</xsl:attribute>
83     <xsl:attribute name="type">hidden</xsl:attribute>
84     <!-- value is set in form_html.xsl because of php sequence ++ -->
85    </xsl:element>
86    <xsl:text>&#xA;</xsl:text>
87    <xsl:element name="html:input">
88     <xsl:attribute name="name">phpversion</xsl:attribute>
89     <xsl:attribute name="type">hidden</xsl:attribute>
90     <!-- value is set in form_html.xsl because of php sequence ++ -->
91    </xsl:element>
92    <xsl:text>&#xA;</xsl:text>
93    <xsl:element name="html:input">
94     <xsl:attribute name="name">timestamp</xsl:attribute>
95     <xsl:attribute name="type">hidden</xsl:attribute>
96     <!-- value is set in form_html.xsl because of php sequence ++ -->
97    </xsl:element>
98   </xsl:when>
99  </xsl:choose>
100  <xsl:text>&#xA;</xsl:text>
101  <xsl:element name="html:input">
102   <xsl:attribute name="name">author_id</xsl:attribute>
103   <xsl:attribute name="type">hidden</xsl:attribute>
104   <xsl:attribute name="value"><xsl:value-of select="$author_id"/></xsl:attribute>
105  </xsl:element>
106
107  <xsl:call-template name="personal">
108   <xsl:with-param name="user" select="$user"/>
109   <xsl:with-param name="author_id" select="$author_id"/>
110   <xsl:with-param name="visu_modif" select="'modif'"/>
111  </xsl:call-template>
112  <xsl:call-template name="components">
113   <xsl:with-param name="user" select="$user"/>
114   <xsl:with-param name="author_id" select="$author_id"/>
115   <xsl:with-param name="visu_modif" select="'modif'"/>
116  </xsl:call-template>
117  <xsl:call-template name="platforms">
118   <xsl:with-param name="user" select="$user"/>
119   <xsl:with-param name="author_id" select="$author_id"/>
120   <xsl:with-param name="visu_modif" select="'modif'"/>
121  </xsl:call-template>
122  <xsl:call-template name="processors">
123   <xsl:with-param name="user" select="$user"/>
124   <xsl:with-param name="author_id" select="$author_id"/>
125   <xsl:with-param name="visu_modif" select="'modif'"/>
126  </xsl:call-template>
127  <xsl:call-template name="compilers">
128   <xsl:with-param name="user" select="$user"/>
129   <xsl:with-param name="author_id" select="$author_id"/>
130   <xsl:with-param name="visu_modif" select="'modif'"/>
131  </xsl:call-template>
132  <xsl:choose>
133   <xsl:when test="$bibmode= 'yes'">
134    <xsl:text>&#xA;</xsl:text>
135    <xsl:element name="orderedlist">
136  <!--
137    <xsl:for-each select="/descendant::d:biblioentry[descendant::d:author=$author_name]">
138  -->
139    <xsl:for-each select="//d:biblioentry">
140     <xsl:sort order="descending" data-type="number" select="./d:biblioset/d:pubdate"/>
141
142     <xsl:for-each select="descendant::d:author">
143      <xsl:sort order="ascending" data-type="text" select="translate(./d:personname,'abcdefghijklmnopqrstuvwxyz éèçàùëöñó', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_EECAUEONO')"/>
144      <xsl:variable name="author_id2">
145<xsl:call-template name="surname_id">
146 <xsl:with-param name="surname" select="d:personname/d:surname"/>
147</xsl:call-template>
148<xsl:text>_</xsl:text>
149<xsl:call-template name="firstname_id">
150 <xsl:with-param name="firstname" select="d:personname/d:firstname"/>
151</xsl:call-template>
152      </xsl:variable>
153<!--
154     <xsl:message terminate="no">
155      ref #<xsl:value-of select="position()"/>
156      _id appel <xsl:value-of select="$author_id"/>
157      _id fabrique <xsl:value-of select="$author_id2"/>
158      egal ? <xsl:value-of select="$author_id2 = $author_id"/>
159     </xsl:message>
160-->
161      <xsl:if test="$author_id2 = $author_id">
162  <xsl:call-template name="one_biblioentry">
163   <xsl:with-param name="visu_modif" select="'modif'"/>
164   <xsl:with-param name="my_biblioentry" select="ancestor::d:biblioentry"/>
165        <!-- ++ <xsl:with-param name="id" select="@xml:id"/> -->
166  </xsl:call-template>
167
168      </xsl:if>
169     </xsl:for-each>
170    </xsl:for-each>
171    </xsl:element>
172   </xsl:when>
173  </xsl:choose>
174  <xsl:call-template name="comments">
175   <xsl:with-param name="author_id" select="$author_id"/>
176   <xsl:with-param name="visu_modif" select="'modif'"/>
177  </xsl:call-template>
178  <xsl:call-template name="newreferences">
179   <xsl:with-param name="author_id" select="$author_id"/>
180   <xsl:with-param name="visu_modif" select="'modif'"/>
181  </xsl:call-template>
182
183  <xsl:choose>
184   <xsl:when test="$visu_modif= 'modif'">
185    <xsl:text>&#xA;</xsl:text>
186    <xsl:element name="html:input">
187     <xsl:attribute name="type">submit</xsl:attribute>
188     <xsl:attribute name="value">Mail</xsl:attribute>
189    </xsl:element>
190    <xsl:text>&#xA;</xsl:text>
191    <xsl:element name="html:input">
192     <xsl:attribute name="type">reset</xsl:attribute>
193     <xsl:attribute name="value">reset</xsl:attribute>
194    </xsl:element>
195   </xsl:when>
196  </xsl:choose>
197 </xsl:element>
198</xsl:template>
199
200</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.