AlaK4X
Linux lhjmq-records 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64



Your IP : 3.138.34.93


Current Path : /var/www/lhjmq-records.qc.ca/public_html/xsl/records/generator/xsl/
Upload File :
Current File : /var/www/lhjmq-records.qc.ca/public_html/xsl/records/generator/xsl/generator02.xsl

<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">


	<xsl:template name="counter">
		<xsl:param name="ctn" />
		<xsl:param name="max_ctn" />
		<xsl:param name="nodes_label" />
		<xsl:param name="nodes_value" />

		<xsl:if test="$ctn &lt; $max_ctn">
			<div>
				<xsl:call-template name="counter">
					<xsl:with-param name="ctn" select="$ctn + 1" />
					<xsl:with-param name="max_ctn" select="$max_ctn" />
					<xsl:with-param name="nodes_label" select="$nodes_label" />
					<xsl:with-param name="nodes_value" select="$nodes_value" />
				</xsl:call-template>
				&lt;item value="<xsl:value-of select="$nodes_value" />" label="<xsl:value-of select="$nodes_label" />" reftable="<xsl:value-of select="$ctn" />" /&gt;
			</div>
		</xsl:if>
	</xsl:template>


	<xsl:template match="/">

		<!-- main_tool_selectors_items1.xml -->

		<div>
			<div>&lt;lists&gt;</div>
			<div style="padding-left:25px;">&lt;ligue&gt;</div>
			<xsl:for-each select="document('../xml/main_tool_selectors.xml')//ligue/items1/item/items2/item/items3">

				<div style="padding-left:50px;">&lt;items3&gt;</div>
				<xsl:for-each select="./item">

					<div style="padding-left:75px;">
						<xsl:call-template name="counter">
							<xsl:with-param name="ctn" select="0" />
							<xsl:with-param name="max_ctn" select="count(.)" />
							<xsl:with-param name="nodes_label" select="@label" />
							<xsl:with-param name="nodes_value" select="@value" />
						</xsl:call-template>
					</div>

				</xsl:for-each>
				<div style="padding-left:50px;">&lt;/items3&gt;</div>

			</xsl:for-each>
			<div style="padding-left:25px;">&lt;/ligue&gt;</div>
			<div>&lt;/lists&gt;</div>
		</div>

	</xsl:template>

</xsl:stylesheet>