1.1 --- a/XSLForms/XSL/Schema.xsl Tue Oct 04 23:47:04 2005 +0000
1.2 +++ b/XSLForms/XSL/Schema.xsl Tue Oct 04 23:47:41 2005 +0000
1.3 @@ -82,7 +82,7 @@
1.4
1.5 <!-- Match attributes. -->
1.6
1.7 - <xsl:template match="*[not(@template:element) and (@template:attribute or @template:attribute-field or @template:attribute-area or @template:attribute-button or @template:selector-field or @template:multiple-choice-field or @template:multiple-choice-list-field or @template:multiple-choice-value or @template:multiple-choice-list-value)]">
1.8 + <xsl:template match="*[not(@template:element) and (@template:attribute or @template:attribute-field or @template:attribute-area or @template:attribute-button or @template:attribute-list-button or @template:selector-field or @template:multiple-choice-field or @template:multiple-choice-list-field or @template:multiple-choice-value or @template:multiple-choice-list-value) or @template:multiple-choice-list-element]">
1.9 <xsl:call-template name="enter-attribute"/>
1.10 </xsl:template>
1.11
1.12 @@ -100,7 +100,15 @@
1.13 </xsl:when>
1.14 <xsl:when test="@template:attribute-area">
1.15 <attribute>
1.16 - <xsl:attribute name="name"><xsl:value-of select="@template:attribute-area"/></xsl:attribute>
1.17 + <xsl:variable name="field-attr" select="substring-before(@template:attribute-area, ',')"/>
1.18 + <xsl:choose>
1.19 + <xsl:when test="$field-attr != ''">
1.20 + <xsl:attribute name="name"><xsl:value-of select="$field-attr"/></xsl:attribute>
1.21 + </xsl:when>
1.22 + <xsl:otherwise>
1.23 + <xsl:attribute name="name"><xsl:value-of select="@template:attribute-area"/></xsl:attribute>
1.24 + </xsl:otherwise>
1.25 + </xsl:choose>
1.26 </attribute>
1.27 </xsl:when>
1.28 <xsl:when test="@template:attribute-button">
1.29 @@ -109,6 +117,12 @@
1.30 <xsl:attribute name="name"><xsl:value-of select="$field-attr"/></xsl:attribute>
1.31 </attribute>
1.32 </xsl:when>
1.33 + <xsl:when test="@template:attribute-list-button">
1.34 + <attribute>
1.35 + <xsl:variable name="field-attr" select="substring-before(@template:attribute-list-button, ',')"/>
1.36 + <xsl:attribute name="name"><xsl:value-of select="$field-attr"/></xsl:attribute>
1.37 + </attribute>
1.38 + </xsl:when>
1.39 <xsl:when test="@template:selector-field">
1.40 <xsl:variable name="field-name" select="substring-before(@template:selector-field, ',')"/>
1.41 <xsl:variable name="affected-element" select="substring-after(@template:selector-field, ',')"/>
1.42 @@ -170,6 +184,32 @@
1.43 </xsl:otherwise>
1.44 </xsl:choose>
1.45 </xsl:when>
1.46 + <xsl:when test="@template:multiple-choice-list-element">
1.47 + <xsl:variable name="element" select="substring-before(@template:multiple-choice-list-element, ',')"/>
1.48 + <xsl:variable name="element-list-info" select="substring-after(@template:multiple-choice-list-element, ',')"/>
1.49 + <xsl:variable name="element-list-element" select="substring-before($element-list-info, ',')"/>
1.50 + <xsl:variable name="element-list-attr" select="substring-after($element-list-info, ',')"/>
1.51 + <xsl:choose>
1.52 + <xsl:when test="$element != '-'">
1.53 + <element type="multiple-choice-list">
1.54 + <xsl:attribute name="name"><xsl:value-of select="$element"/></xsl:attribute>
1.55 + <element type="multiple-choice-list-value">
1.56 + <xsl:attribute name="name"><xsl:value-of select="$element-list-element"/></xsl:attribute>
1.57 + <xsl:attribute name="expr-name">value-is-set</xsl:attribute>
1.58 + <xsl:apply-templates select="*"/>
1.59 + </element>
1.60 + </element>
1.61 + </xsl:when>
1.62 + <xsl:otherwise>
1.63 + <xsl:attribute name="type">multiple-choice-list</xsl:attribute>
1.64 + <element type="multiple-choice-list-value">
1.65 + <xsl:attribute name="name"><xsl:value-of select="$element-list-element"/></xsl:attribute>
1.66 + <xsl:attribute name="expr-name">value-is-set</xsl:attribute>
1.67 + <xsl:apply-templates select="*"/>
1.68 + </element>
1.69 + </xsl:otherwise>
1.70 + </xsl:choose>
1.71 + </xsl:when>
1.72 <xsl:when test="@template:multiple-choice-value">
1.73 <element type="multiple-choice-value">
1.74 <xsl:variable name="field-element" select="substring-before(@template:multiple-choice-value, ',')"/>