[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: problem of result returned by variable
On 8/22/06, corine amel zayanie <corine_amel@xxxxxxxx> wrote:
problem of result returned by variable I explain my problem between <!-- --> The context node here is the root / </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"/> The context here is still the root / so .//DEP and .//ANI are document wide </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"> The context node is now each A in the document <xsl:choose> <xsl:when test=".//DEP = $requete/DEP and .//ANI= $requete/ANI">
Either way if you are checking the same global condition you should really make it a global variable. cheers andrew
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|