1.1 --- a/XSLForms/XSL/Schema.xsl Sat Jun 21 01:38:50 2008 +0200
1.2 +++ b/XSLForms/XSL/Schema.xsl Sun Dec 11 21:45:19 2005 +0000
1.3 @@ -155,11 +155,16 @@
1.4 <xsl:variable name="field-element" select="substring-before(@template:multiple-choice-field, ',')"/>
1.5 <xsl:variable name="field-attr-info" select="substring-after(@template:multiple-choice-field, ',')"/>
1.6 <xsl:variable name="field-attr" select="substring-before($field-attr-info, ',')"/>
1.7 - <xsl:variable name="field-attr-type" select="substring-after($field-attr-info, ',')"/>
1.8 + <xsl:variable name="field-attr-type-info" select="substring-after($field-attr-info, ',')"/>
1.9 + <xsl:variable name="field-attr-type" select="substring-before($field-attr-type-info, ',')"/>
1.10 + <xsl:variable name="field-source-type" select="substring-after($field-attr-type-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 + <xsl:if test="$field-source-type = 'dynamic'">
1.16 + <xsl:attribute name="source">dynamic</xsl:attribute>
1.17 + </xsl:if>
1.18 <attribute>
1.19 <xsl:choose>
1.20 <xsl:when test="$field-attr != ''">
1.21 @@ -175,6 +180,9 @@
1.22 </xsl:when>
1.23 <xsl:otherwise>
1.24 <xsl:attribute name="type">multiple-choice</xsl:attribute>
1.25 + <xsl:if test="$field-source-type = 'dynamic'">
1.26 + <xsl:attribute name="source">dynamic</xsl:attribute>
1.27 + </xsl:if>
1.28 <attribute>
1.29 <xsl:choose>
1.30 <xsl:when test="$field-attr != ''">
1.31 @@ -193,11 +201,16 @@
1.32 <xsl:variable name="field-element" select="substring-before(@template:multiple-choice-list-field, ',')"/>
1.33 <xsl:variable name="field-list-info" select="substring-after(@template:multiple-choice-list-field, ',')"/>
1.34 <xsl:variable name="field-list-element" select="substring-before($field-list-info, ',')"/>
1.35 - <xsl:variable name="field-list-attr" select="substring-after($field-list-info, ',')"/>
1.36 + <xsl:variable name="field-list-attr-info" select="substring-after($field-list-info, ',')"/>
1.37 + <xsl:variable name="field-list-attr" select="substring-before($field-list-attr-info, ',')"/>
1.38 + <xsl:variable name="field-source-type" select="substring-after($field-list-attr-info, ',')"/>
1.39 <xsl:choose>
1.40 <xsl:when test="$field-element != '-'">
1.41 <element type="multiple-choice-list">
1.42 <xsl:attribute name="name"><xsl:value-of select="$field-element"/></xsl:attribute>
1.43 + <xsl:if test="$field-source-type = 'dynamic'">
1.44 + <xsl:attribute name="source">dynamic</xsl:attribute>
1.45 + </xsl:if>
1.46 <attribute>
1.47 <xsl:attribute name="name"><xsl:value-of select="$field-list-attr"/></xsl:attribute>
1.48 </attribute>
1.49 @@ -206,6 +219,9 @@
1.50 </xsl:when>
1.51 <xsl:otherwise>
1.52 <xsl:attribute name="type">multiple-choice-list</xsl:attribute>
1.53 + <xsl:if test="$field-source-type = 'dynamic'">
1.54 + <xsl:attribute name="source">dynamic</xsl:attribute>
1.55 + </xsl:if>
1.56 <attribute>
1.57 <xsl:attribute name="name"><xsl:value-of select="$field-list-attr"/></xsl:attribute>
1.58 </attribute>
1.59 @@ -244,10 +260,19 @@
1.60 <xsl:variable name="field-element" select="substring-before(@template:multiple-choice-value, ',')"/>
1.61 <xsl:variable name="field-attr-info" select="substring-after(@template:multiple-choice-value, ',')"/>
1.62 <xsl:variable name="field-attr" select="substring-before($field-attr-info, ',')"/>
1.63 - <xsl:variable name="field-set-attr" select="substring-after($field-attr-info, ',')"/>
1.64 + <xsl:variable name="field-set-attr-info" select="substring-after($field-attr-info, ',')"/>
1.65 + <xsl:variable name="field-set-attr" select="substring-before($field-set-attr-info, ',')"/>
1.66 + <xsl:variable name="field-contents" select="substring-after($field-set-attr-info, ',')"/>
1.67 <xsl:attribute name="name"><xsl:value-of select="$field-element"/></xsl:attribute>
1.68 <xsl:attribute name="expr">@<xsl:value-of select="$field-attr"/> = ../@<xsl:value-of select="$field-attr"/></xsl:attribute>
1.69 - <xsl:attribute name="expr-attr"><xsl:value-of select="$field-set-attr"/></xsl:attribute>
1.70 + <xsl:choose>
1.71 + <xsl:when test="$field-set-attr != ''">
1.72 + <xsl:attribute name="expr-attr"><xsl:value-of select="$field-set-attr"/></xsl:attribute>
1.73 + </xsl:when>
1.74 + <xsl:otherwise>
1.75 + <xsl:attribute name="expr-attr"><xsl:value-of select="$field-set-attr-info"/></xsl:attribute>
1.76 + </xsl:otherwise>
1.77 + </xsl:choose>
1.78 <attribute>
1.79 <xsl:attribute name="name"><xsl:value-of select="$field-attr"/></xsl:attribute>
1.80 </attribute>
1.81 @@ -258,12 +283,21 @@
1.82 <xsl:variable name="field-element" select="substring-before(@template:multiple-choice-list-value, ',')"/>
1.83 <xsl:variable name="field-attr-info" select="substring-after(@template:multiple-choice-list-value, ',')"/>
1.84 <xsl:variable name="field-attr" select="substring-before($field-attr-info, ',')"/>
1.85 - <xsl:variable name="field-set-attr" select="substring-after($field-attr-info, ',')"/>
1.86 + <xsl:variable name="field-set-attr-info" select="substring-after($field-attr-info, ',')"/>
1.87 + <xsl:variable name="field-set-attr" select="substring-before($field-set-attr-info, ',')"/>
1.88 + <xsl:variable name="field-contents" select="substring-after($field-set-attr-info, ',')"/>
1.89 <xsl:attribute name="name"><xsl:value-of select="$field-element"/></xsl:attribute>
1.90 <xsl:attribute name="expr">@value-is-set</xsl:attribute>
1.91 <!-- Special attribute corresponding with the expression. -->
1.92 <xsl:attribute name="expr-name">value-is-set</xsl:attribute>
1.93 - <xsl:attribute name="expr-attr"><xsl:value-of select="$field-set-attr"/></xsl:attribute>
1.94 + <xsl:choose>
1.95 + <xsl:when test="$field-set-attr != ''">
1.96 + <xsl:attribute name="expr-attr"><xsl:value-of select="$field-set-attr"/></xsl:attribute>
1.97 + </xsl:when>
1.98 + <xsl:otherwise>
1.99 + <xsl:attribute name="expr-attr"><xsl:value-of select="$field-set-attr-info"/></xsl:attribute>
1.100 + </xsl:otherwise>
1.101 + </xsl:choose>
1.102 <attribute>
1.103 <xsl:attribute name="name"><xsl:value-of select="$field-attr"/></xsl:attribute>
1.104 </attribute>