[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: A simple xsl:if question from a newbie
Subject: Re: A simple xsl:if question from a newbie From: Oliver Becker <obecker@xxxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 19 Jul 2000 15:33:02 +0200 (MET DST) |
Hi Nicki, > ----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??? Two points: - you have to consider (i.e. remove) whitespace characters (newlines) - Time isn't accessed correctly Something like this should work: <xsl:variable name="time" select="normalize-space(Time)" /> <xsl:for-each select="ROWSET/ROW"> <xsl:if test="substring(normalize-space(Starttime), 1, 10) = $time"> <xsl:value-of select="Body"/> </xsl:if> </xsl:for-each> Regards, Oliver /-------------------------------------------------------------------\ | ob|do Dipl.Inf. Oliver Becker | | --+-- E-Mail: obecker@xxxxxxxxxxxxxxxxxxxxxxx | | op|qo WWW: http://www.informatik.hu-berlin.de/~obecker | \-------------------------------------------------------------------/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: A simple xsl:if question from a, Linda van den Brink | Thread | javascript in xsl, Jean de Lavarene |
RE: javascript in xsl, Mary Cha | Date | Re: A simple xsl:if question from a, David Carlisle |
Month |