[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Checking value of a previous text node
Hello Ryan,
your problem is a really simlpe grouping problem. Have a look at http://www.dpawson.co.uk/xsl/sect2/N4486.html or at more special techniques like Muenchian Grouping at http://www.jenitennison.com/xslt/grouping/muenchian.xml. The code for Muenchian Grouping: <xsl:key name="classes" match="class" use="quarterName"/> <xsl:template match="enrolledClasses"> <xsl:apply-templates select="classes[generate-id() = generate-id(key('classes', quarterName))]" mode="group"/> </xsl:template> <xsl:template match="classes" mode="group"> <i><xsl:value-of select="quarterName"/></i><br/> <p> <xsl:apply-templates select="key('classes', quarterName)"/> </p> </xsl:template> <xsl:template match="classes" mode="all"> <xsl:value-of select="name"/><br/> </xsl:template> (untested) Regards, Joerg Ryan O'Leary wrote: Hi all. I've been having a lot of trouble trying to get this to work, although I'm sure theres a simple answer. I have the following XML: 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
|