xsl-list
[Top] [All Lists]

[xsl] problem of result returned by variable

2006-08-22 06:39:09
 
I explain my problem between <!-- --> 

<xsl:output method="html" media-type="text/html; charset=ISO-8859-1" 
version="4.0"/>  
<xsl:template match="/">  
<html>  
<body>  
<table border="0" width="*" >  
<tr><th>Nombre noeud</th>  
<th>Numero du A</th>  
</tr>  
<xsl:call-template name="doc">  
<xsl:with-param name="requete" select="document('requete.xml')/requete"/>  
</xsl:call-template>  
</table>  
</body>  
</html>  
</xsl:template>  
<xsl:template name ="doc" match="LISTE-A">  
<xsl:param name="requete"/>  
<xsl:call-template name="doc2">  
<xsl:with-param name="requete" select="$requete"/>  
<xsl:with-param name="varReq1" select=".//DEP = $requete/DEP and .//ANI= 
$requete/ANI"/>  
</xsl:call-template>  
</xsl:template>  
<xsl:template name ="doc2" match="LISTE-A">  
<xsl:param name="varReq1"/>  
<xsl:param name="requete"/> 
<xsl:value-of select=".//DEP = $requete/DEP and .//ANI= $requete/ANI"/>  
<xsl:for-each select="//A">  
<xsl:choose>  
<xsl:when test=".//DEP = $requete/DEP and .//ANI= $requete/ANI">  
<!-- MY PROBLEM : WHEN I HAVE : test=".//DEP = $requete/DEP and .//ANI= 
$requete/ANI" the RESUALT is CORRECT 
WHEN I MAKE test="$varReq1" THE result is NOT CORRECT 
INSPITE OF content OF varReq1 vraiable is .//DEP = $requete/DEP and .//ANI= 
$requete/ANI 
My Question why the result is not same as the result when test=".//DEP = 
$requete/DEP and .//ANI= $requete/ANI" 
--> 
<tr><td><xsl:variable name="num">  
<xsl:number level="any" from="LISTE-A"/>  
</xsl:variable>  
<xsl:value-of select="$num"/>  
</td>  
<td><font color="#FF8040"> <xsl:value-of select="NUMERO"/></font></td>  
<td><font color="#FF8040"> dep</font></td>  
<td><font color="blue">ani</font></td></tr>  
</xsl:when>  

</xsl:choose>  
</xsl:for-each>  
</xsl:template>  
</xsl:stylesheet> 

Best regards

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>