|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] A simple xsl:if question from a newbie
Hi All,
A question from a XSL-newbie.
I need to compare the contents of two different
elements "Starttime" and "Time". I have tried somthing
like this but wihtout any luck.
My XML-file looks somthing like this
(It's actually generated by the cocoon servlet)
----XML-----
<page>
<Time>
19-11-2000
</Time>
<ROWSET>
<ROW id=0>
<Starttime>
19-11-2000 15:03
</Starttime>
<Body>
blablablablabla
</Body>
</ROW>
<ROW id=1>
<Starttime>
15-11-2000 13:40
</Starttime>
<Body>
some stuf
</Body>
</ROW>
<ROW id=2>
<Starttime>
19-11-2000 10:00
</Starttime>
<Body>
some more stuf
</Body>
</ROW>
</ROWSET>
</page>
------------
Here's my XSL file
----XSL-----
<xsl:for-each select="ROWSET/ROW">
<xsl:if test="substring(Starttime, 1, 10) = {Time}">
<xsl:value-of select="Body"/>
</xsl:if>
</xsl:for-each>
-----------
Unfortunately the condition never returns true.
Is there anyone who's got some suggestions as to
why???
Any help is apperciated
-Nicki
______________________________________________________
Do You Yahoo!?
Få en gratis @yahoo.dk-adresse på http://mail.yahoo.dk
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








