<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<xsl:template match="/">
		<xsl:call-template name="combo">
			<xsl:with-param name="limit" select="number(root/text())"/>
		</xsl:call-template>
	</xsl:template>

	<xsl:template name="combo">
		<xsl:param name="count" select="1"/>
		<xsl:param name="limit"/>
		<xsl:choose>
			<xsl:when test="$count = 1">
				<select>
					<option>1</option>
					<xsl:if test="$limit &gt; 1">
						<xsl:call-template name="combo">
							<xsl:with-param name="count" select="$count + 1"/>
							<xsl:with-param name="limit" select="$limit"/>
						</xsl:call-template>
					</xsl:if>
				</select>
			</xsl:when>
			<xsl:when test="$count &lt;= $limit">
				<option>
					<xsl:value-of select="$count"/>
				</option>
				<xsl:call-template name="combo">
					<xsl:with-param name="count" select="$count + 1"/>
					<xsl:with-param name="limit" select="$limit"/>
				</xsl:call-template>
			</xsl:when>
		</xsl:choose>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2005. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="Scenario1" userelativepaths="yes" externalpreview="no" url="x.xml" htmlbaseurl="" outputurl="" processortype="internal" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/><MapperBlockPosition></MapperBlockPosition></MapperMetaTag>
</metaInformation>
-->