source: trunk/template_db.xsl @ 110

Last change on this file since 110 was 108, checked in by pinsard, 14 years ago

usage of option directive

  • Property svn:keywords set to Id
File size: 3.6 KB
Line 
1<?xml version="1.0" encoding="iso-8859-1"?>
2<xsl:stylesheet
3version="1.0"
4xmlns:html="http://www.w3.org/1999/xhtml"
5xmlns:d="http://docbook.org/ns/docbook"
6xmlns:xl="http://www.w3.org/1999/xlink"
7xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
8
9<!--rst
10
11.. _template_db.xsl:
12
13===============
14template_db.xsl
15===============
16
17création du prototype de formulaire utilisateur
18
19EVOLUTIONS
20==========
21
22$Id$
23
24- fplod 2008-09-17T09:49:51Z aedon.locean-ipsl.upmc.fr (Darwin)
25
26  * project name from main.xml file instead of a fixed one
27
28- fplod 2008-04-30T13:30:47Z aedon.locean-ipsl.upmc.fr (Darwin)
29
30  * language inherited from biblio.xml
31
32- fplod 2008-04-29T10:28:37Z aedon.locean-ipsl.upmc.fr (Darwin)
33
34  * chgt for dbk5
35
36- fplod 2007-04-26T09:31:32Z aedon.locean-ipsl.upmc.fr (Darwin)
37
38  * creation
39
40-->
41
42<xsl:output
43 method="xml"
44 indent="yes"
45 encoding="ISO-8859-1"
46 omit-xml-declaration="no"/>
47
48<xsl:include href="form_db.xsl"/>
49
50<xsl:template match="users">
51
52 <xsl:apply-templates select="user[child::userid='template']"/>
53</xsl:template>
54
55<xsl:template match="user[child::userid='template']">
56<xsl:variable name="project">
57 <xsl:value-of select="document('main.xml')//d:keyword[@xml:id='project']"/>
58</xsl:variable>
59
60<xsl:element name="article">
61<xsl:attribute name="version">5.0</xsl:attribute>
62<xsl:attribute name="xmlns">http://docbook.org/ns/docbook</xsl:attribute>
63<xsl:attribute name="xml:lang"><xsl:value-of select="/d:bibliography/@xml:lang"/></xsl:attribute>
64<xsl:attribute name="xml:id">template_form</xsl:attribute>
65
66 <title><xsl:value-of select="$project"/> - Template</title>
67<info>
68<authorgroup>
69<author><personname><firstname>Sébastien</firstname> <surname>Masson</surname></personname></author>
70<author><personname><firstname>Françoise</firstname> <surname>Pinsard</surname></personname></author>
71<!--++-->
72</authorgroup>
73<keywordset>
74<keyword><xsl:value-of select="$project"/></keyword>
75</keywordset>
76<!-- ++ date -->
77</info>
78 <xsl:text>&#xA;</xsl:text>
79
80 <xsl:comment>
81  template form from template userid in user.xml.
82<xsl:call-template name="para_lastupdate_user">
83 <xsl:with-param name="language" select="document('biblio.xml')/d:bibliography/@xml:lang"/>
84
85 <xsl:with-param name="date" select="ancestor::users/child::date"/>
86</xsl:call-template>
87 </xsl:comment>
88
89 <xsl:text>&#xA;</xsl:text>
90 <xsl:element name="sect1">
91  <xsl:attribute name="xml:id">intro</xsl:attribute>
92  <title>Context</title>
93  <xsl:element name="para">
94   The mail sent by filling this form will be used to update
95<link xl:href="main.php"><xsl:value-of select="$project"/>-Publications-Papers</link>
96and <link xl:href="user.html"><xsl:value-of select="$project"/> Users</link>.
97  </xsl:element>
98 </xsl:element>
99 <xsl:text>&#xA;</xsl:text>
100 <xsl:element name="sect1">
101  <xsl:attribute name="xml:id"><xsl:value-of select="userid"/></xsl:attribute>
102  <xsl:text>&#xA;</xsl:text>
103  <xsl:choose>
104   <xsl:when test="userid != 'template'">
105    <xsl:element name="title">
106     <xsl:value-of select="personname/firstname"/> <xsl:text> </xsl:text> <xsl:value-of select="personname/surname"/>
107    </xsl:element>
108   </xsl:when>
109   <xsl:otherwise>
110    <xsl:element name="title">Template</xsl:element>
111   </xsl:otherwise>
112  </xsl:choose>
113  <xsl:text>&#xA;</xsl:text>
114  <xsl:element name="para">
115   <xsl:value-of select="email"/>
116  </xsl:element>
117  <xsl:text>&#xA;</xsl:text>
118  <xsl:call-template name="form_db">
119   <xsl:with-param name="author_id" select="userid"/>
120   <xsl:with-param name="user" select="."/>
121   <xsl:with-param name="visu_modif" select="'modif'"/>
122   <xsl:with-param name="bibmode" select="'no'"/>
123  </xsl:call-template>
124 <xsl:text>&#xA;</xsl:text>
125 </xsl:element>
126</xsl:element>
127</xsl:template>
128
129</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.