1.1 --- a/XSLForms/XSL/Schema.xsl Tue Oct 04 23:47:41 2005 +0000
1.2 +++ b/XSLForms/XSL/Schema.xsl Wed Oct 05 01:04:12 2005 +0000
1.3 @@ -140,13 +140,22 @@
1.4 </xsl:when>
1.5 <xsl:when test="@template:multiple-choice-field">
1.6 <xsl:variable name="field-element" select="substring-before(@template:multiple-choice-field, ',')"/>
1.7 - <xsl:variable name="field-attr" select="substring-after(@template:multiple-choice-field, ',')"/>
1.8 + <xsl:variable name="field-attr-info" select="substring-after(@template:multiple-choice-field, ',')"/>
1.9 + <xsl:variable name="field-attr" select="substring-before($field-attr-info, ',')"/>
1.10 + <xsl:variable name="field-attr-type" select="substring-after($field-attr-info, ',')"/>
1.11 <xsl:choose>
1.12 <xsl:when test="$field-element != '-'">
1.13 <element type="multiple-choice">
1.14 <xsl:attribute name="name"><xsl:value-of select="$field-element"/></xsl:attribute>
1.15 <attribute>
1.16 - <xsl:attribute name="name"><xsl:value-of select="$field-attr"/></xsl:attribute>
1.17 + <xsl:choose>
1.18 + <xsl:when test="$field-attr != ''">
1.19 + <xsl:attribute name="name"><xsl:value-of select="$field-attr"/></xsl:attribute>
1.20 + </xsl:when>
1.21 + <xsl:otherwise>
1.22 + <xsl:attribute name="name"><xsl:value-of select="$field-attr-info"/></xsl:attribute>
1.23 + </xsl:otherwise>
1.24 + </xsl:choose>
1.25 </attribute>
1.26 <xsl:apply-templates select="*"/>
1.27 </element>
1.28 @@ -154,7 +163,14 @@
1.29 <xsl:otherwise>
1.30 <xsl:attribute name="type">multiple-choice</xsl:attribute>
1.31 <attribute>
1.32 - <xsl:attribute name="name"><xsl:value-of select="$field-attr"/></xsl:attribute>
1.33 + <xsl:choose>
1.34 + <xsl:when test="$field-attr != ''">
1.35 + <xsl:attribute name="name"><xsl:value-of select="$field-attr"/></xsl:attribute>
1.36 + </xsl:when>
1.37 + <xsl:otherwise>
1.38 + <xsl:attribute name="name"><xsl:value-of select="$field-attr-info"/></xsl:attribute>
1.39 + </xsl:otherwise>
1.40 + </xsl:choose>
1.41 </attribute>
1.42 <xsl:apply-templates select="*"/>
1.43 </xsl:otherwise>