1.1 --- a/XSLForms/XSL/Schema.xsl Wed Oct 05 01:04:26 2005 +0000
1.2 +++ b/XSLForms/XSL/Schema.xsl Wed Oct 05 16:05:06 2005 +0000
1.3 @@ -38,23 +38,30 @@
1.4 <xsl:template match="*[@template:element]">
1.5 <xsl:call-template name="enter-element">
1.6 <xsl:with-param name="other-elements" select="@template:element"/>
1.7 + <xsl:with-param name="other-init" select="@template:init"/>
1.8 </xsl:call-template>
1.9 </xsl:template>
1.10
1.11 <xsl:template name="enter-element">
1.12 <xsl:param name="other-elements"/>
1.13 + <xsl:param name="other-init"/>
1.14 <xsl:variable name="first-element" select="substring-before($other-elements, ',')"/>
1.15 <xsl:variable name="remaining-elements" select="substring-after($other-elements, ',')"/>
1.16 + <xsl:variable name="first-init" select="substring-before($other-init, ',')"/>
1.17 + <xsl:variable name="remaining-init" select="substring-after($other-init, ',')"/>
1.18 <xsl:choose>
1.19 <xsl:when test="$first-element = ''">
1.20 <xsl:call-template name="next-element">
1.21 <xsl:with-param name="first-element" select="$other-elements"/>
1.22 + <xsl:with-param name="first-init" select="$other-init"/>
1.23 </xsl:call-template>
1.24 </xsl:when>
1.25 <xsl:otherwise>
1.26 <xsl:call-template name="next-element">
1.27 <xsl:with-param name="first-element" select="$first-element"/>
1.28 <xsl:with-param name="remaining-elements" select="$remaining-elements"/>
1.29 + <xsl:with-param name="first-init" select="$first-init"/>
1.30 + <xsl:with-param name="remaining-init" select="$remaining-init"/>
1.31 </xsl:call-template>
1.32 </xsl:otherwise>
1.33 </xsl:choose>
1.34 @@ -63,8 +70,13 @@
1.35 <xsl:template name="next-element">
1.36 <xsl:param name="first-element"/>
1.37 <xsl:param name="remaining-elements"/>
1.38 + <xsl:param name="first-init"/>
1.39 + <xsl:param name="remaining-init"/>
1.40 <element>
1.41 <xsl:attribute name="name"><xsl:value-of select="$first-element"/></xsl:attribute>
1.42 + <xsl:if test="$first-init != ''">
1.43 + <xsl:attribute name="init"><xsl:value-of select="$first-init"/></xsl:attribute>
1.44 + </xsl:if>
1.45 <xsl:choose>
1.46 <xsl:when test="$remaining-elements = ''">
1.47 <xsl:call-template name="enter-attribute"/>
1.48 @@ -72,6 +84,7 @@
1.49 <xsl:otherwise>
1.50 <xsl:call-template name="enter-element">
1.51 <xsl:with-param name="other-elements" select="$remaining-elements"/>
1.52 + <xsl:with-param name="other-init" select="$remaining-init"/>
1.53 </xsl:call-template>
1.54 </xsl:otherwise>
1.55 </xsl:choose>