1.1 --- a/XSLForms/XSL/Input.xsl Mon Oct 31 23:55:38 2005 +0000
1.2 +++ b/XSLForms/XSL/Input.xsl Mon Oct 31 23:55:51 2005 +0000
1.3 @@ -26,6 +26,10 @@
1.4
1.5
1.6
1.7 + <xsl:param name="init-enumerations">yes</xsl:param>
1.8 +
1.9 +
1.10 +
1.11 <!-- Match the document itself. -->
1.12
1.13 <xsl:template match="/">
1.14 @@ -34,9 +38,11 @@
1.15 <axsl:output indent="yes"/>
1.16
1.17 <!-- Make document parameters for all elements appearing to use enumerations. -->
1.18 - <xsl:for-each select="//element[@type='multiple-choice' or @type='multiple-choice-list']">
1.19 - <axsl:param name="{@name}"/>
1.20 - </xsl:for-each>
1.21 + <xsl:if test="$init-enumerations = 'yes'">
1.22 + <xsl:for-each select="//element[@type='multiple-choice' or @type='multiple-choice-list']">
1.23 + <axsl:param name="{@name}"/>
1.24 + </xsl:for-each>
1.25 + </xsl:if>
1.26
1.27 <!-- Make a document-level rule. -->
1.28 <axsl:template match="/">
1.29 @@ -99,9 +105,12 @@
1.30 <xsl:choose>
1.31 <!-- Enumerations. -->
1.32 <xsl:when test="@type='multiple-choice-value' or @type='multiple-choice-list-value'">
1.33 - <xsl:call-template name="inside-enumeration">
1.34 - <xsl:with-param name="path" select="concat($path, '/', @name)"/>
1.35 - </xsl:call-template>
1.36 + <!-- Only generate enumerations if requested. -->
1.37 + <xsl:if test="$init-enumerations = 'yes'">
1.38 + <xsl:call-template name="inside-enumeration">
1.39 + <xsl:with-param name="path" select="concat($path, '/', @name)"/>
1.40 + </xsl:call-template>
1.41 + </xsl:if>
1.42 </xsl:when>
1.43 <!-- Added elements. -->
1.44 <xsl:when test="(not(@init) or @init = 'auto') and $adding-selectors = 0 or @init = 'yes'">