1.1 --- a/XSLForms/XSL/Input.xsl Wed Oct 05 01:04:26 2005 +0000
1.2 +++ b/XSLForms/XSL/Input.xsl Wed Oct 05 16:05:06 2005 +0000
1.3 @@ -100,7 +100,7 @@
1.4 </xsl:call-template>
1.5 </xsl:when>
1.6 <!-- Added elements. -->
1.7 - <xsl:when test="$adding-selectors = 0">
1.8 + <xsl:when test="(not(@init) or @init = 'auto') and $adding-selectors = 0 or @init = 'yes'">
1.9 <xsl:element name="{@name}">
1.10 <axsl:apply-templates select="{$path}/{@name}/@*"/>
1.11 <xsl:call-template name="process-elements">
1.12 @@ -132,7 +132,7 @@
1.13 <xsl:when test="@type='multiple-choice-value' or @type='multiple-choice-list-value'">
1.14 <!-- Do not match multiple-choice values. -->
1.15 </xsl:when>
1.16 - <xsl:when test="$adding-selectors = 0">
1.17 + <xsl:when test="(not(@init) or @init = 'auto') and $adding-selectors = 0 or @init = 'yes'">
1.18 <xsl:call-template name="process-rules">
1.19 <xsl:with-param name="path" select="concat($path, '/', @name)"/>
1.20 </xsl:call-template>
2.1 --- a/XSLForms/XSL/Schema.xsl Wed Oct 05 01:04:26 2005 +0000
2.2 +++ b/XSLForms/XSL/Schema.xsl Wed Oct 05 16:05:06 2005 +0000
2.3 @@ -38,23 +38,30 @@
2.4 <xsl:template match="*[@template:element]">
2.5 <xsl:call-template name="enter-element">
2.6 <xsl:with-param name="other-elements" select="@template:element"/>
2.7 + <xsl:with-param name="other-init" select="@template:init"/>
2.8 </xsl:call-template>
2.9 </xsl:template>
2.10
2.11 <xsl:template name="enter-element">
2.12 <xsl:param name="other-elements"/>
2.13 + <xsl:param name="other-init"/>
2.14 <xsl:variable name="first-element" select="substring-before($other-elements, ',')"/>
2.15 <xsl:variable name="remaining-elements" select="substring-after($other-elements, ',')"/>
2.16 + <xsl:variable name="first-init" select="substring-before($other-init, ',')"/>
2.17 + <xsl:variable name="remaining-init" select="substring-after($other-init, ',')"/>
2.18 <xsl:choose>
2.19 <xsl:when test="$first-element = ''">
2.20 <xsl:call-template name="next-element">
2.21 <xsl:with-param name="first-element" select="$other-elements"/>
2.22 + <xsl:with-param name="first-init" select="$other-init"/>
2.23 </xsl:call-template>
2.24 </xsl:when>
2.25 <xsl:otherwise>
2.26 <xsl:call-template name="next-element">
2.27 <xsl:with-param name="first-element" select="$first-element"/>
2.28 <xsl:with-param name="remaining-elements" select="$remaining-elements"/>
2.29 + <xsl:with-param name="first-init" select="$first-init"/>
2.30 + <xsl:with-param name="remaining-init" select="$remaining-init"/>
2.31 </xsl:call-template>
2.32 </xsl:otherwise>
2.33 </xsl:choose>
2.34 @@ -63,8 +70,13 @@
2.35 <xsl:template name="next-element">
2.36 <xsl:param name="first-element"/>
2.37 <xsl:param name="remaining-elements"/>
2.38 + <xsl:param name="first-init"/>
2.39 + <xsl:param name="remaining-init"/>
2.40 <element>
2.41 <xsl:attribute name="name"><xsl:value-of select="$first-element"/></xsl:attribute>
2.42 + <xsl:if test="$first-init != ''">
2.43 + <xsl:attribute name="init"><xsl:value-of select="$first-init"/></xsl:attribute>
2.44 + </xsl:if>
2.45 <xsl:choose>
2.46 <xsl:when test="$remaining-elements = ''">
2.47 <xsl:call-template name="enter-attribute"/>
2.48 @@ -72,6 +84,7 @@
2.49 <xsl:otherwise>
2.50 <xsl:call-template name="enter-element">
2.51 <xsl:with-param name="other-elements" select="$remaining-elements"/>
2.52 + <xsl:with-param name="other-init" select="$remaining-init"/>
2.53 </xsl:call-template>
2.54 </xsl:otherwise>
2.55 </xsl:choose>