xsl-list
[Top] [All Lists]

Re: [xsl] problem of result returned by variable

2006-08-22 07:07:19

The first time you call the doc template, "." is "/" so
<xsl:with-param name="varReq1" select=".//DEP = $requete/DEP and .//ANI=
$requete/ANI"/>  
is true just if there is a DEP anywhere in the document that is equal to
any of the elements $requete/DEP and if  there is a ANI anywhere in the
document that is equal to any of the elements $requete/ANI

However in your test,  "." is an element A 
<xsl:when test=".//DEP = $requete/DEP and .//ANI= $requete/ANI">  
so the test is true just if there is a DEP anywhere in the decendents of
this A element that is equal to any of the elements $requete/DEP and if
there is a ANI anywhere in the decendents of this A element that is
equal to any of the elements $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" 
--> 

since the two expressions are comparing different sets of elements there
is no reason to expect to get the same result, but since you haven't
shown your input or what test you want to make, i can't suggest what your
coding should be.

David

--~------------------------------------------------------------------
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>