source: trunk/compilers_db.xsl @ 8

Last change on this file since 8 was 2, checked in by smasson, 17 years ago

initial import

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