I am new to xpath .. I want to extract all the values of Age which is greater than 24 using for-each and if condition in xslt.
<PriceBooking>
<Guest>
<GuestCount Age="24" Code="10" Quantity="1"/>
<GuestCount Age="26" Code="10" Quantity="1"/>
<GuestCount Age="3" Code="10" Quantity="1"/>
</Guest>
</PriceBooking>
So far I tried with the following :-
<xsl:for-each select="PriceBooking/Guest">
<xsl:choose>
<xsl:when test="PriceBooking/Guest/GuestCount/@Age > '28'">
<Age><xsl:value-of select="PriceBooking/Guest/GuestCount/@Age"/></Age>
</xsl:when>
<xsl:otherwise>
<Sid>Failed to load</Sid>
</xsl:otherwise>
</xsl:choose>
It's always going to otherwise condition .. Please help me with the xpath