|
Subject:
|
XSLT - test the value is true or false
|
|
Posted By:
|
haixia
|
Post Date:
|
8/21/2006 12:59:52 PM
|
Hi,
I am trying to test if the value of Time=Open Date, if yes, then print out Title and price. Can some one tell me how to compare the value? This is what I did, but it did not work. <xsl:if test="Category/Book/Time='Open Date'"/>
Ex: <Category> <Book> <Title>XSLT</Title> <Time>Open Date</Time> <Price>10.88</Price> </Book> </Category>
Thanks, Hx
|
|
Reply By:
|
mhkay
|
Reply Date:
|
8/21/2006 1:38:18 PM
|
The code you have shown is correct, so your error must be in code that you haven't shown. Perhaps the context node was wrong.
Michael Kay http://www.saxonica.com/ Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
|