source: trunk/platforms_db.xsl @ 51

Last change on this file since 51 was 49, checked in by pinsard, 16 years ago

improvements of .xsl files headers

  • Property svn:keywords set to Id
File size: 2.5 KB
Line 
1<?xml version="1.0" encoding="iso-8859-1"?>
2<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
4<!--
5module :
6creation des élements platforms de formulaire
7
8update :
9$Id$
10fplod 2007-05-18T10:25:06Z aedon.locean-ipsl.upmc.fr (Darwin)
11correction pour cause de dysfonctionnement sous firefox (mais ok sous safari) :
12Le 1er choix est modifié si on clique sur un des choix suivant
13fplod 2007-04-26T10:14:40Z aedon.locean-ipsl.upmc.fr (Darwin)
14creation
15-->
16
17<xsl:template name="platforms">
18 <xsl:param name="user"/>
19 <xsl:param name="visu_modif"/>
20
21  <xsl:text>&#xA;</xsl:text>
22  <xsl:element name="fieldset">
23   <xsl:attribute name="id">platforms</xsl:attribute>
24   <xsl:text>&#xA;</xsl:text>
25   <xsl:element name="legend">
26    Used platforms
27   </xsl:element>
28   <xsl:text>&#xA;</xsl:text>
29   <!-- ne plait pas à firefox  ++
30    <xsl:element name="label">
31   -->
32    <xsl:for-each select="$user/platforms/platform">
33     <xsl:sort order="ascending" data-type="text" select="@code"/>
34     <xsl:text>&#xA;</xsl:text>
35     <xsl:comment><xsl:value-of select="./value"/></xsl:comment>
36     <xsl:choose>
37      <xsl:when test="@code != 'zzz_other'">
38       <xsl:element name="input">
39        <xsl:attribute name="name">
40         <xsl:value-of select="name()"/><xsl:text>_</xsl:text><xsl:value-of select="@code"/>
41        </xsl:attribute>
42        <xsl:attribute name="type">checkbox</xsl:attribute>
43        <xsl:attribute name="value"><xsl:value-of select="./name"/></xsl:attribute> 
44        <xsl:if test="$visu_modif= 'visu'"> 
45         <xsl:attribute name="readonly">1</xsl:attribute>
46        </xsl:if>
47        <xsl:if test="./value = 'yes'">
48         <xsl:attribute name="checked">1</xsl:attribute>
49        </xsl:if>
50        <xsl:value-of select="./name"/> 
51       </xsl:element>
52      </xsl:when>
53      <xsl:when  test="@code = 'zzz_other'">
54       <xsl:element name="label">
55        Other :
56        <xsl:element name="input">
57         <xsl:attribute name="name">
58          <xsl:value-of select="name()"/><xsl:text>_</xsl:text><xsl:value-of select="@code"/>
59         </xsl:attribute>
60         <xsl:attribute name="type">text</xsl:attribute>
61         <xsl:attribute name="value"><xsl:value-of select="./value"/></xsl:attribute> 
62        </xsl:element>
63       </xsl:element>
64      </xsl:when>
65     </xsl:choose>
66    </xsl:for-each>
67   <!-- ne plait pas à firefox  ++
68    </xsl:element>
69   -->
70   <xsl:text>&#xA;</xsl:text>
71  </xsl:element>
72  <xsl:text>&#xA;</xsl:text>
73</xsl:template>
74
75</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.