source: trunk/category_form.xsl

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

fix for XSL documentations

File size: 3.1 KB
Line 
1<?xml version="1.0" encoding="iso-8859-1"?>
2<xsl:stylesheet
3version="1.0"
4xmlns:html="http://www.w3.org/1999/xhtml"
5xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
6
7<!--rst
8
9.. _category_form.xsl:
10
11=================
12category_form.xsl
13=================
14
15DESCRIPTION
16===========
17
18creation of category elements for form
19
20EVOLUTIONS
21==========
22
23$Id$
24
25- fplod 2008-05-06T09:42:31Z aedon.locean-ipsl.upmc.fr (Darwin)
26
27  * creation
28
29-->
30
31<xsl:template name="category">
32 <xsl:param name="id"/>
33 <xsl:param name="visu_modif"/>
34 <xsl:text>&#xA;</xsl:text>
35
36 <xsl:element name="html:fieldset">
37  <xsl:attribute name="xml:id">field_category1_<xsl:value-of select="$id"/></xsl:attribute>
38  <xsl:text>&#xA;</xsl:text>
39   <xsl:element name="html:legend">
40     Category 1
41   </xsl:element>
42   <xsl:text>&#xA;</xsl:text>
43   <xsl:element name="html:input">
44    <xsl:attribute name="name">category1_choice1_<xsl:value-of select="$id"/></xsl:attribute>
45    <xsl:attribute name="type">checkbox</xsl:attribute>
46    <xsl:if test="$visu_modif= 'visu'">
47     <xsl:attribute name="readonly">1</xsl:attribute>
48    </xsl:if>
49    <xsl:if test="./value = 'yes'">
50     <xsl:attribute name="checked">1</xsl:attribute>
51    </xsl:if>
52    <xsl:attribute name="value">choice1</xsl:attribute>
53    <xsl:value-of select="'choice1'"/>
54   </xsl:element>
55   <xsl:element name="html:input">
56    <xsl:attribute name="name">category1_choice2_<xsl:value-of select="$id"/></xsl:attribute>
57    <xsl:attribute name="type">checkbox</xsl:attribute>
58    <xsl:if test="$visu_modif= 'visu'">
59     <xsl:attribute name="readonly">1</xsl:attribute>
60    </xsl:if>
61    <xsl:if test="./value = 'yes'">
62     <xsl:attribute name="checked">1</xsl:attribute>
63    </xsl:if>
64    <xsl:attribute name="value">choice2</xsl:attribute>
65    <xsl:value-of select="'choice2'"/>
66   </xsl:element>
67 </xsl:element>
68 <xsl:element name="html:fieldset">
69  <xsl:attribute name="xml:id">field_category2_<xsl:value-of select="$id"/></xsl:attribute>
70  <xsl:text>&#xA;</xsl:text>
71   <xsl:element name="html:legend">
72     Category 2
73   </xsl:element>
74   <xsl:text>&#xA;</xsl:text>
75   <xsl:element name="html:input">
76    <xsl:attribute name="name">category2_choice1_<xsl:value-of select="$id"/></xsl:attribute>
77    <xsl:attribute name="type">checkbox</xsl:attribute>
78    <xsl:if test="$visu_modif= 'visu'">
79     <xsl:attribute name="readonly">1</xsl:attribute>
80    </xsl:if>
81    <xsl:if test="./value = 'yes'">
82     <xsl:attribute name="checked">1</xsl:attribute>
83    </xsl:if>
84    <xsl:attribute name="value">choice1</xsl:attribute>
85    <xsl:value-of select="'choice1'"/>
86   </xsl:element>
87   <xsl:element name="html:input">
88    <xsl:attribute name="name">category2_choice2_<xsl:value-of select="$id"/></xsl:attribute>
89    <xsl:attribute name="type">checkbox</xsl:attribute>
90    <xsl:if test="$visu_modif= 'visu'">
91     <xsl:attribute name="readonly">1</xsl:attribute>
92    </xsl:if>
93    <xsl:if test="./value = 'yes'">
94     <xsl:attribute name="checked">1</xsl:attribute>
95    </xsl:if>
96    <xsl:attribute name="value">choice2</xsl:attribute>
97    <xsl:value-of select="'choice2'"/>
98   </xsl:element>
99 </xsl:element>
100</xsl:template>
101</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.