[79] | 1 | <?xml version="1.0" encoding="iso-8859-1"?> |
---|
| 2 | <xsl:stylesheet |
---|
| 3 | version="1.0" |
---|
| 4 | xmlns:html="http://www.w3.org/1999/xhtml" |
---|
| 5 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
---|
| 6 | |
---|
[323] | 7 | <!--rst |
---|
| 8 | |
---|
| 9 | .. _category_form.xsl: |
---|
| 10 | |
---|
| 11 | ================= |
---|
| 12 | category_form.xsl |
---|
| 13 | ================= |
---|
| 14 | |
---|
| 15 | DESCRIPTION |
---|
| 16 | =========== |
---|
| 17 | |
---|
[79] | 18 | creation of category elements for form |
---|
| 19 | |
---|
[323] | 20 | EVOLUTIONS |
---|
| 21 | ========== |
---|
| 22 | |
---|
[79] | 23 | $Id$ |
---|
[323] | 24 | |
---|
| 25 | - fplod 2008-05-06T09:42:31Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 26 | |
---|
| 27 | * creation |
---|
| 28 | |
---|
[79] | 29 | --> |
---|
| 30 | |
---|
| 31 | <xsl:template name="category"> |
---|
| 32 | <xsl:param name="id"/> |
---|
| 33 | <xsl:param name="visu_modif"/> |
---|
| 34 | <xsl:text>
</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>
</xsl:text> |
---|
| 39 | <xsl:element name="html:legend"> |
---|
| 40 | Category 1 |
---|
| 41 | </xsl:element> |
---|
| 42 | <xsl:text>
</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>
</xsl:text> |
---|
| 71 | <xsl:element name="html:legend"> |
---|
| 72 | Category 2 |
---|
| 73 | </xsl:element> |
---|
| 74 | <xsl:text>
</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> |
---|