[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: selecting elements by attributes when working with

Subject: Re: selecting elements by attributes when working with namespaces
From: Florent Georges <lists@xxxxxxxxxxxx>
Date: Tue, 22 Jul 2008 16:57:06 +0200 (CEST)
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.