source: trunk/compilers_db.xsl @ 325

Last change on this file since 325 was 325, checked in by pinsard, 11 years ago

improvments of doc + some doctest features

  • Property svn:keywords set to Id
File size: 3.0 KB
RevLine 
[2]1<?xml version="1.0" encoding="iso-8859-1"?>
[55]2<xsl:stylesheet
3version="1.0"
4xmlns:html="http://www.w3.org/1999/xhtml"
5xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
[2]6
[323]7<!--rst
8.. _compilers_db.xsl:
9
10================
11compilers_db.xsl
12================
13
14DESCRIPTION
15===========
16
[2]17creation des élements compilers de formulaire
18
[323]19EVOLUTIONS
20==========
21
[33]22$Id$
[323]23
24- fplod 2008-04-29T09:03:58Z aedon.locean-ipsl.upmc.fr (Darwin)
25
26  * chgt for dbk5
27
28- fplod 2007-05-18T10:25:06Z aedon.locean-ipsl.upmc.fr (Darwin)
29
30  * correction pour cause de dysfonctionnement sous firefox (mais ok sous safari) :
[325]31    Le 1er choix est modifié si on clique sur un des choix suivant
[323]32
33- fplod 2007-04-26T10:13:37Z aedon.locean-ipsl.upmc.fr (Darwin)
34
35  * creation
36
[2]37-->
38
39<xsl:template name="compilers">
[31]40 <xsl:param name="user"/>
[55]41 <xsl:param name="author_id"/>
[2]42 <xsl:param name="visu_modif"/>
43
44  <xsl:text>&#xA;</xsl:text>
[55]45  <xsl:element name="html:fieldset">
46   <xsl:attribute name="xml:id">compilers_<xsl:value-of select="$author_id"/></xsl:attribute>
[2]47   <xsl:text>&#xA;</xsl:text>
48   <xsl:text>&#xA;</xsl:text>
[55]49   <xsl:element name="html:legend">
[2]50    Used compilers
51   </xsl:element>
52   <xsl:text>&#xA;</xsl:text>
53   <xsl:text>&#xA;</xsl:text>
54   <!-- ne plait pas à firefox ++
[55]55   <xsl:element name="html:label">
[2]56   -->
[31]57    <xsl:for-each select="$user/compilers/compiler">
[2]58     <xsl:sort order="ascending" data-type="text" select="@code"/>
59     <xsl:text>&#xA;</xsl:text>
60     <xsl:comment><xsl:value-of select="./value"/></xsl:comment>
61     <xsl:choose>
62      <xsl:when test="@code != 'zzz_other'">
63      <xsl:text>&#xA;</xsl:text>
[55]64       <xsl:element name="html:input">
[2]65        <xsl:attribute name="name">
66         <xsl:value-of select="name()"/><xsl:text>_</xsl:text><xsl:value-of select="@code"/>
67        </xsl:attribute>
68        <xsl:attribute name="type">checkbox</xsl:attribute>
69        <xsl:attribute name="value"><xsl:value-of select="./name"/></xsl:attribute>
70        <xsl:if test="$visu_modif= 'visu'">
71         <xsl:attribute name="readonly">1</xsl:attribute>
72        </xsl:if>
73        <xsl:if test="./value = 'yes'">
74         <xsl:attribute name="checked">1</xsl:attribute>
75        </xsl:if>
76        <xsl:value-of select="./name"/>
77       </xsl:element>
78      </xsl:when>
79      <xsl:when  test="@code = 'zzz_other'">
80       <xsl:text>&#xA;</xsl:text>
[55]81       <xsl:element name="html:label">
[2]82        Other :
83        <xsl:text>&#xA;</xsl:text>
[55]84        <xsl:element name="html:input">
[2]85         <xsl:attribute name="name">
86          <xsl:value-of select="name()"/><xsl:text>_</xsl:text><xsl:value-of select="@code"/>
87         </xsl:attribute>
88         <xsl:attribute name="type">text</xsl:attribute>
89         <xsl:attribute name="value"><xsl:value-of select="./value"/></xsl:attribute>
90        </xsl:element>
91       </xsl:element>
92      </xsl:when>
93     </xsl:choose>
94    </xsl:for-each>
95   <!-- ne plait pas à firefox ++
96   </xsl:element>
97   -->
98   <xsl:text>&#xA;</xsl:text>
99  </xsl:element>
100  <xsl:text>&#xA;</xsl:text>
101</xsl:template>
102</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.