How to use parameter variable in xslt

Posted by Abbi on Stack Overflow See other posts from Stack Overflow or by Abbi
Published on 2010-06-15T22:11:01Z Indexed on 2010/06/15 22:22 UTC
Read the original article Hit count: 201

Filed under:
|
|

Hi

I am new to xslt so please let me know whats wrong with my syntax here. If I compare with a Constant value of '880.50' I get the desired result. But if I try to do the samething with parameter being passed I get nothing. The code snippet is as under.

<xsl:template name="ShowJourneyLegs" >
  <xsl:param name="TotalFare" />  
    <Key4><xsl:value-of select='$TotalFare'/></Key4>   
    <JourneyLegKeys><xsl:value-of select="/FareSearchResponse/CompleteItineraryFares/AirFare[@Total = '880.50']/JourneyLegKeys/Key[1]"/></JourneyLegKeys>
     <JourneyLeg><xsl:value-of select="/FareSearchResponse/CompleteItineraryFares/AirFare[@Total = '$TotalFare']/JourneyLegKeys/Key[1]"/></JourneyLeg>  
</xsl:template>

© Stack Overflow or respective owner

Related posts about Xml

Related posts about xslt