[Home] [By Thread] [By Date] [Recent Entries]
Please could u explain to me how it works in more detail? E.g. if a there is
a set of note elements and other misc elements inside another element called
scope:
<scope><misc></misc><misc></misc><misc></misc><note></note><note></note></scope> and my xsl looks like this: <xsl:template match="scope"> <xsl:apply-templates select="*" /> </xsl:template> <xsl:template match="misc"> <p><xsl:value-of select="." /><p> </xsl:template> <xsl:template match="note"/> <xsl:template match="note[not(preceding-sibling::*[1][self::note])]"> <ul> <xsl:apply-templates mode="note" select="."/> </ul> </xsl:template> <xsl:template match="note" mode="note"> <lli><xsl:apply-templates/></li> <xsl:apply-templates select="following-sibling::*[1][self::note]" mode="note"/> </xsl:template> to produce the ouput : <p>misc info</p> <p>misc info</p> <p>misc info</p> <ul> <li>note</li> <li>note</li> </ul> Whats steps would be involved in order to create the note list? (not really sure why 3 template matches are needed for it?) From: David Carlisle <davidc@xxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: template matching Date: Fri, 6 Feb 2004 13:58:55 GMT _________________________________________________________________ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|

Cart



