[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 | |
---|
| 7 | <!-- |
---|
| 8 | module : |
---|
| 9 | creation of category elements for form |
---|
| 10 | |
---|
| 11 | update : |
---|
| 12 | $Id$ |
---|
| 13 | fplod 2008-05-06T09:42:31Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 14 | creation |
---|
| 15 | --> |
---|
| 16 | |
---|
| 17 | <xsl:template name="category"> |
---|
| 18 | <xsl:param name="id"/> |
---|
| 19 | <xsl:param name="visu_modif"/> |
---|
| 20 | <xsl:text>
</xsl:text> |
---|
| 21 | |
---|
| 22 | <xsl:element name="html:fieldset"> |
---|
| 23 | <xsl:attribute name="xml:id">field_category1_<xsl:value-of select="$id"/></xsl:attribute> |
---|
| 24 | <xsl:text>
</xsl:text> |
---|
| 25 | <xsl:element name="html:legend"> |
---|
| 26 | Category 1 |
---|
| 27 | </xsl:element> |
---|
| 28 | <xsl:text>
</xsl:text> |
---|
| 29 | <xsl:element name="html:input"> |
---|
| 30 | <xsl:attribute name="name">category1_choice1_<xsl:value-of select="$id"/></xsl:attribute> |
---|
| 31 | <xsl:attribute name="type">checkbox</xsl:attribute> |
---|
| 32 | <xsl:if test="$visu_modif= 'visu'"> |
---|
| 33 | <xsl:attribute name="readonly">1</xsl:attribute> |
---|
| 34 | </xsl:if> |
---|
| 35 | <xsl:if test="./value = 'yes'"> |
---|
| 36 | <xsl:attribute name="checked">1</xsl:attribute> |
---|
| 37 | </xsl:if> |
---|
| 38 | <xsl:attribute name="value">choice1</xsl:attribute> |
---|
| 39 | <xsl:value-of select="'choice1'"/> |
---|
| 40 | </xsl:element> |
---|
| 41 | <xsl:element name="html:input"> |
---|
| 42 | <xsl:attribute name="name">category1_choice2_<xsl:value-of select="$id"/></xsl:attribute> |
---|
| 43 | <xsl:attribute name="type">checkbox</xsl:attribute> |
---|
| 44 | <xsl:if test="$visu_modif= 'visu'"> |
---|
| 45 | <xsl:attribute name="readonly">1</xsl:attribute> |
---|
| 46 | </xsl:if> |
---|
| 47 | <xsl:if test="./value = 'yes'"> |
---|
| 48 | <xsl:attribute name="checked">1</xsl:attribute> |
---|
| 49 | </xsl:if> |
---|
| 50 | <xsl:attribute name="value">choice2</xsl:attribute> |
---|
| 51 | <xsl:value-of select="'choice2'"/> |
---|
| 52 | </xsl:element> |
---|
| 53 | </xsl:element> |
---|
| 54 | <xsl:element name="html:fieldset"> |
---|
| 55 | <xsl:attribute name="xml:id">field_category2_<xsl:value-of select="$id"/></xsl:attribute> |
---|
| 56 | <xsl:text>
</xsl:text> |
---|
| 57 | <xsl:element name="html:legend"> |
---|
| 58 | Category 2 |
---|
| 59 | </xsl:element> |
---|
| 60 | <xsl:text>
</xsl:text> |
---|
| 61 | <xsl:element name="html:input"> |
---|
| 62 | <xsl:attribute name="name">category2_choice1_<xsl:value-of select="$id"/></xsl:attribute> |
---|
| 63 | <xsl:attribute name="type">checkbox</xsl:attribute> |
---|
| 64 | <xsl:if test="$visu_modif= 'visu'"> |
---|
| 65 | <xsl:attribute name="readonly">1</xsl:attribute> |
---|
| 66 | </xsl:if> |
---|
| 67 | <xsl:if test="./value = 'yes'"> |
---|
| 68 | <xsl:attribute name="checked">1</xsl:attribute> |
---|
| 69 | </xsl:if> |
---|
| 70 | <xsl:attribute name="value">choice1</xsl:attribute> |
---|
| 71 | <xsl:value-of select="'choice1'"/> |
---|
| 72 | </xsl:element> |
---|
| 73 | <xsl:element name="html:input"> |
---|
| 74 | <xsl:attribute name="name">category2_choice2_<xsl:value-of select="$id"/></xsl:attribute> |
---|
| 75 | <xsl:attribute name="type">checkbox</xsl:attribute> |
---|
| 76 | <xsl:if test="$visu_modif= 'visu'"> |
---|
| 77 | <xsl:attribute name="readonly">1</xsl:attribute> |
---|
| 78 | </xsl:if> |
---|
| 79 | <xsl:if test="./value = 'yes'"> |
---|
| 80 | <xsl:attribute name="checked">1</xsl:attribute> |
---|
| 81 | </xsl:if> |
---|
| 82 | <xsl:attribute name="value">choice2</xsl:attribute> |
---|
| 83 | <xsl:value-of select="'choice2'"/> |
---|
| 84 | </xsl:element> |
---|
| 85 | </xsl:element> |
---|
| 86 | </xsl:template> |
---|
| 87 | </xsl:stylesheet> |
---|