[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: problem of result returned by variable

Subject: Re: problem of result returned by variable
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 22 Aug 2006 15:07:00 +0100
Re:   problem of result returned by variable
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.