1.1 --- a/XSLForms/XSL/PrepareMacro.xsl Sat Oct 01 16:24:46 2005 +0000
1.2 +++ b/XSLForms/XSL/PrepareMacro.xsl Sat Oct 01 16:25:19 2005 +0000
1.3 @@ -7,7 +7,8 @@
1.4
1.5 <xsl:template match="*[@template:attribute-field]">
1.6 <xsl:copy>
1.7 - <xsl:apply-templates select="@*[local-name() != 'attribute-field']"/>
1.8 + <!-- Remove attribute-field and replace name and value. -->
1.9 + <xsl:apply-templates select="@*[local-name() != 'attribute-field' and local-name() != 'name' and local-name() != 'value']"/>
1.10 <xsl:attribute name="template:attribute"><xsl:value-of select="@template:attribute-field"/></xsl:attribute>
1.11 <xsl:attribute name="name">{template:this-attribute()}</xsl:attribute>
1.12 <xsl:attribute name="value">{$this-value}</xsl:attribute>
1.13 @@ -18,7 +19,8 @@
1.14 <xsl:template match="*[@template:selector-field]">
1.15 <xsl:variable name="field-name" select="@template:selector-field"/>
1.16 <xsl:copy>
1.17 - <xsl:apply-templates select="@*[local-name() != 'selector-field']"/>
1.18 + <!-- Remove selector-field and replace name. -->
1.19 + <xsl:apply-templates select="@*[local-name() != 'selector-field' and local-name() != 'name']"/>
1.20 <xsl:attribute name="name"><xsl:value-of select="$field-name"/>={template:this-element()}</xsl:attribute>
1.21 <xsl:apply-templates select="*|node()"/>
1.22 </xsl:copy>
1.23 @@ -28,7 +30,8 @@
1.24 <xsl:variable name="field-element" select="substring-before(@template:multiple-choice-field, ',')"/>
1.25 <xsl:variable name="field-attr" select="substring-after(@template:multiple-choice-field, ',')"/>
1.26 <xsl:copy>
1.27 - <xsl:apply-templates select="@*[local-name() != 'multiple-choice-field']"/>
1.28 + <!-- Remove multiple-choice-field and replace name. -->
1.29 + <xsl:apply-templates select="@*[local-name() != 'multiple-choice-field' and local-name() != 'name']"/>
1.30 <xsl:attribute name="template:element"><xsl:value-of select="$field-element"/></xsl:attribute>
1.31 <xsl:attribute name="name">{template:new-attribute('<xsl:value-of select="$field-attr"/>')}</xsl:attribute>
1.32 <xsl:apply-templates select="*|node()"/>
1.33 @@ -41,7 +44,8 @@
1.34 <xsl:variable name="field-attr" select="substring-before($field-attr-info, ',')"/>
1.35 <xsl:variable name="field-set-attr" select="substring-after($field-attr-info, ',')"/>
1.36 <xsl:copy>
1.37 - <xsl:apply-templates select="@*[local-name() != 'multiple-choice-value']"/>
1.38 + <!-- Remove multiple-choice-value and replace value. -->
1.39 + <xsl:apply-templates select="@*[local-name() != 'multiple-choice-value' and local-name() != 'value']"/>
1.40 <xsl:attribute name="template:element"><xsl:value-of select="$field-element"/></xsl:attribute>
1.41 <xsl:attribute name="template:expr">@<xsl:value-of select="$field-attr"/> = ../@<xsl:value-of select="$field-attr"/></xsl:attribute>
1.42 <xsl:attribute name="template:expr-attr"><xsl:value-of select="$field-set-attr"/></xsl:attribute>