Hello,
I'm Using Sablotron 5.0
 
With this XML flux:
<flux_xml>
<TABLEAU ID="C2TAB147">
    <TGROUP COLS="6" ALIGN="CENTER" CHAROFF="50" CHAR="">
        <TBODY VALIGN="TOP">
            ...
        </TBODY>
    </TGROUP>
</TABLEAU>
</flux_xml>
 
With this XSL steelsheet
<xsl:template name="GENERATE.COLGROUPE">
<xsl:param name="COLS" select="1"/>
<xsl:param name="COUNT" select="1"/>
<xsl:choose>
    <xsl:when test="$COUNT>$COLS"><p><xsl:value-of select="$COUNT"/> sup�rieur � <xsl:value-of select="$COLS"/></p></xsl:when>
<xsl:otherwise>
    <xsl:call-template name="GENERATE.COLGROUPE">
        <xsl:with-param name="COLS" select="$COLS"/>
        <xsl:with-param name="COUNT" select="$COUNT+1"/>
    </xsl:call-template>
</xsl:otherwise>
 </xsl:choose>
</xsl:template>
 
when I use this call
<xsl:call-template name="GENERATE.COLGROUPE">
    <xsl:with-param name="COLS" select="@COLS"/>
</xsl:call-template>
 
Sablotron loops because the test <xsl:when test="$COUNT>$COLS"> is not correct.
 
If I use this call
<xsl:call-template name="GENERATE.COLGROUPE">
    <xsl:with-param name="COLS" select="6"/>
</xsl:call-template>
 
There is no loop.
 
So i think there's a bug with <xsl:with-param name="COLS" select="@COLS"/>
 
Do you know this probl�me, if yes is there a solution?
 
 Thanks for all your help!

 
 
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<flux_xml>
	<TABLEAU ID="C2TAB147">
		<TGROUP COLS="6" ALIGN="CENTER" CHAROFF="50" CHAR="">
			<TBODY VALIGN="TOP">
				<ROW>
					<ENTRY COLNAME="1" MOREROWS="0" ROTATE="0" VALIGN="TOP" ALIGN="CENTER">Admis</ENTRY>
				</ROW>
				<ROW>
					<ENTRY COLNAME="1" MOREROWS="0" ROTATE="0" VALIGN="TOP" ALIGN="CENTER">Admis</ENTRY>
				</ROW>
			</TBODY>
		</TGROUP>
	</TABLEAU>
</flux_xml>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
	<xsl:apply-templates/>
</xsl:template>
<xsl:template match="TGROUP">
	<xsl:call-template name="GENERATE.COLGROUPE">
<!--		<xsl:with-param name="COLS" select="@COLS"/>-->
		<xsl:with-param name="COLS" select="6"/>
	</xsl:call-template>
</xsl:template>
<xsl:template name="GENERATE.COLGROUPE">
  <xsl:param name="COLS" select="1"/>
  <xsl:param name="COUNT" select="1"/>
COLS : <xsl:value-of select="$COLS"/>
COUNT : <xsl:value-of select="$COUNT"/><BR/>
  <xsl:choose>
    <xsl:when test="$COUNT>$COLS"><p><xsl:value-of select="$COUNT"/> supérieur à<xsl:value-of select="$COLS"/></p></xsl:when>
    <xsl:otherwise>
      <xsl:call-template name="GENERATE.COLGROUPE">
        <xsl:with-param name="COLS" select="$COLS"/>
        <xsl:with-param name="COUNT" select="$COUNT+1"/>
      </xsl:call-template>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>
</xsl:stylesheet>

Reply via email to