source: trunk/components_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: 3.7 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 des élements components de 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-29T09:06:37Z aedon.locean-ipsl.upmc.fr (Darwin)
24
25  * chgt fot dbk5
26
27- fplod 2007-06-08T09:07:12Z aedon.locean-ipsl.upmc.fr (Darwin)
28
29  * bug fix for components_date
30
31- fplod 2007-05-18T10:25:06Z aedon.locean-ipsl.upmc.fr (Darwin)
32
33  * correction pour cause de dysfonctionnement sous firefox (mais ok sous safari) : Le 1er choix est modifié si on clique sur un des choix suivant
34
35- fplod 2007-04-27T15:16:34Z aedon.locean-ipsl.upmc.fr (Darwin)
36
37  * ajout date
38
39- fplod 2007-04-26T10:07:08Z aedon.locean-ipsl.upmc.fr (Darwin)
40
41  * creation
42-->
43
44<xsl:template name="components">
45 <xsl:param name="user"/>
46 <xsl:param name="author_id"/>
47 <xsl:param name="visu_modif"/>
48
49<xsl:variable name="project">
50 <xsl:value-of select="document('main.xml')//d:keyword[@xml:id='project']"/>
51</xsl:variable>
52
53  <xsl:text>&#xA;</xsl:text>
54  <xsl:element name="html:fieldset">
55   <xsl:attribute name="xml:id">components_<xsl:value-of select="$author_id"/></xsl:attribute>
56   <xsl:text>&#xA;</xsl:text>
57   <xsl:element name="html:legend">
58    Used <xsl:value-of select="$project"/> components
59   </xsl:element>
60   <xsl:text>&#xA;</xsl:text>
61   <!-- ne plait pas à firefox  ++
62    <xsl:element name="html:label">
63   -->
64    <xsl:for-each select="$user/components/component">
65     <xsl:sort order="ascending" data-type="text" select="@code"/>
66     <xsl:text>&#xA;</xsl:text>
67     <xsl:comment><xsl:value-of select="./value"/></xsl:comment>
68     <xsl:choose>
69      <xsl:when test="@code != 'zzz_other'">
70       <xsl:text>&#xA;</xsl:text>
71       <xsl:element name="html:input">
72        <xsl:attribute name="name">
73         <xsl:value-of select="name()"/><xsl:text>_</xsl:text><xsl:value-of select="@code"/>
74        </xsl:attribute>
75        <xsl:attribute name="type">checkbox</xsl:attribute>
76        <xsl:attribute name="value"><xsl:value-of select="./name"/></xsl:attribute>
77        <xsl:if test="$visu_modif= 'visu'">
78         <xsl:attribute name="readonly">1</xsl:attribute>
79        </xsl:if>
80        <xsl:if test="./value = 'yes'">
81         <xsl:attribute name="checked">1</xsl:attribute>
82        </xsl:if>
83        <xsl:value-of select="./name"/>
84       </xsl:element>
85      </xsl:when>
86      <xsl:when  test="@code = 'zzz_other'">
87       <xsl:text>&#xA;</xsl:text>
88       <xsl:element name="html:label">
89       Other :
90        <xsl:text>&#xA;</xsl:text>
91        <xsl:element name="html:input">
92         <xsl:attribute name="name">
93          <xsl:value-of select="name()"/><xsl:text>_</xsl:text><xsl:value-of select="@code"/>
94         </xsl:attribute>
95         <xsl:attribute name="type">text</xsl:attribute>
96          <xsl:attribute name="value"><xsl:value-of select="./value"/></xsl:attribute>
97        </xsl:element>
98       </xsl:element>
99      </xsl:when>
100     </xsl:choose>
101    </xsl:for-each>
102   <!-- ne plait pas à firefox  ++
103    </xsl:element>
104   -->
105   <xsl:text>&#xA;</xsl:text>
106   <xsl:element name="html:label">
107    <xsl:text>Since (YYYYMM) :</xsl:text>
108    <xsl:text>&#xA;</xsl:text>
109    <xsl:element name="html:input">
110     <xsl:attribute name="name">components_date</xsl:attribute>
111     <xsl:attribute name="type">text</xsl:attribute>
112     <xsl:attribute name="value"><xsl:value-of select="$user/components/components_date"/></xsl:attribute>
113    </xsl:element>
114   </xsl:element>
115  </xsl:element>
116  <xsl:text>&#xA;</xsl:text>
117</xsl:template>
118
119</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.