Subject: Re: [xsl] selecting elements by attributes when working with namespaces From: Joelle Tegwen <tegwe002@xxxxxxx> Date: Tue, 22 Jul 2008 10:50:47 -0500 |
Thanks Joelle
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] selecting elements by att, Florent Georges | Thread | Re: [xsl] selecting elements by att, Florent Georges |
Re: [xsl] selecting elements by att, Florent Georges | Date | Re: [xsl] selecting elements by att, Florent Georges |
Month |