[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: selecting elements by attributes when working with
Joelle Tegwen wrote: > Never do which? I'm not quite sure what you're saying here. Never use DOE (unless you know exactly what you do, but here you don't need it). > I receive [...] > I want: [...] Ok, you want positional grouping then. The following stylesheet should do what you are after (the interesting part is of course the for-each-group): <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tt="http://www.w3.org/2006/04/ttaf1" version="2.0"> <xsl:output indent="yes"/> <xsl:template match="/"> <div class="transcript"> <xsl:apply-templates select="tt:tt/tt:body/tt:div"/> </div> </xsl:template> <xsl:template match="tt:div"> <dl> <xsl:for-each-group select="tt:p" group-starting-with="tt:p[tt:span]"> <dt> <xsl:value-of select="tt:span"/> </dt> <dd> <xsl:text>[ldquo;]</xsl:text> <xsl:value-of separator=" " select=" current-group()/text()[last()]"/> <xsl:text>[rdquo;]</xsl:text> </dd> </xsl:for-each-group> </dl> </xsl:template> </xsl:stylesheet> Regards, --drkm _____________________________________________________________________________ Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr
|
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
|