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