source: trunk/compilers_db.xsl @ 49

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

improvements of .xsl files headers

  • Property svn:keywords set to Id
File size: 2.6 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 compilers 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<E9> si on clique sur un des choix suivant
13fplod 2007-04-26T10:13:37Z aedon.locean-ipsl.upmc.fr (Darwin)
14creation
15-->
16
17<xsl:template name="compilers">
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">compilers</xsl:attribute>
24   <xsl:text>&#xA;</xsl:text>
25   <xsl:text>&#xA;</xsl:text>
26   <xsl:element name="legend">
27    Used compilers
28   </xsl:element>
29   <xsl:text>&#xA;</xsl:text>
30   <xsl:text>&#xA;</xsl:text>
31   <!-- ne plait pas à firefox ++
32   <xsl:element name="label">
33   -->
34    <xsl:for-each select="$user/compilers/compiler">
35     <xsl:sort order="ascending" data-type="text" select="@code"/>
36     <xsl:text>&#xA;</xsl:text>
37     <xsl:comment><xsl:value-of select="./value"/></xsl:comment>
38     <xsl:choose>
39      <xsl:when test="@code != 'zzz_other'">
40      <xsl:text>&#xA;</xsl:text>
41       <xsl:element name="input">
42        <xsl:attribute name="name">
43         <xsl:value-of select="name()"/><xsl:text>_</xsl:text><xsl:value-of select="@code"/>
44        </xsl:attribute>
45        <xsl:attribute name="type">checkbox</xsl:attribute>
46        <xsl:attribute name="value"><xsl:value-of select="./name"/></xsl:attribute>
47        <xsl:if test="$visu_modif= 'visu'">
48         <xsl:attribute name="readonly">1</xsl:attribute>
49        </xsl:if>
50        <xsl:if test="./value = 'yes'">
51         <xsl:attribute name="checked">1</xsl:attribute>
52        </xsl:if>
53        <xsl:value-of select="./name"/>
54       </xsl:element>
55      </xsl:when>
56      <xsl:when  test="@code = 'zzz_other'">
57       <xsl:text>&#xA;</xsl:text>
58       <xsl:element name="label">
59        Other :
60        <xsl:text>&#xA;</xsl:text>
61        <xsl:element name="input">
62         <xsl:attribute name="name">
63          <xsl:value-of select="name()"/><xsl:text>_</xsl:text><xsl:value-of select="@code"/>
64         </xsl:attribute>
65         <xsl:attribute name="type">text</xsl:attribute>
66         <xsl:attribute name="value"><xsl:value-of select="./value"/></xsl:attribute>
67        </xsl:element>
68       </xsl:element>
69      </xsl:when>
70     </xsl:choose>
71    </xsl:for-each>
72   <!-- ne plait pas à firefox ++
73   </xsl:element>
74   -->
75   <xsl:text>&#xA;</xsl:text>
76  </xsl:element>
77  <xsl:text>&#xA;</xsl:text>
78</xsl:template>
79</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.