[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: select="preceding-sibling::ROW[entered_formatted_day=$cu
On Sun, 2 Apr 2000, Thorbjoern Ravn Andersen wrote: > Which I would like rendered as > > <h2>2000-04-02</h2> > A stuff > B stuff > <h2>2000-04-01</h2> > C stuff With the help of Richard Bell <RichardBell@xxxxxxxxxxx> I ended up with the following code which does exactly what I wanted. Your help is much appreciated. Thanks! <xsl:variable name="pos" select="position()-1"/> <xsl:choose> <xsl:when test="parent::*/*[position()=$pos]/entered_formatted_day = entered_formatted_day"/> <xsl:otherwise> <h2><xsl:value-of select="entered_formatted_day"/></h2> </xsl:otherwise> </xsl:choose> (The choose was neccesary to get the logic right for the first entry). -- Thorbjørn Ravn Andersen "...plus...Tubular Bells!" http://www.mip.sdu.dk/~ravn 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
|