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

Trouble understanding the Test expression in xsl:if

Subject: Trouble understanding the Test expression in xsl:if
From: Keith Gilbert <kgilbert@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 27 May 2009 14:28:05 -0500
 Trouble understanding the Test expression in xsl:if
I'm having trouble getting my head around this:

My shortened XML data:

	<product>red delicious</product>

My simplified XSLT:

<xsl:template match="category">

<xsl:template match="category_name">
	<xsl:if test="category_name = apples">
		<xsl:call-template name=apple_template/>

For the life of me I can't figure out how to evaluate the value of "category_name" in the xsl:if line. I understand (I think) how to use xsl:value-of, but that doesn't seem to work inside the xsl:if. Any thoughts?

~ Keith

Current Thread


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.
First Name
Last Name
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.