| 
 
Subject: Re: [xsl] XSL: multiple element come to single parent element From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Sun, 10 May 2009 19:30:32 +0200  | 
<div class="LegEnactingText"> <p class="LegText">The Secretary</p> </div> <div class="LegEnactingText"> <p class="LegText">vfgdhdf dfhdsgh </p> </div> <div class="LegEnactingText"> <p class="LegText">dffsg gsdfg sdghds</p> </div> ... ... <div class="LegEnactingText"> <p class="LegText">sgg dgfg dgfgd</p> </div>
What i need:
<enacting-words> <enacting-text>The Secretary</enacting-text> <enacting-text>vfgdhdf dfhdsgh </enacting-text> <enacting-text>dffsg gsdfg sdghds</enacting-text> ... ... <enacting-text>sgg dgfg dgfgd</enacting-text> </enacting-words>
<xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0">    <xsl:template match="body">
      <enacting-words>
        <xsl:apply-templates select="div[@class = 'LegEnactingText']/p"/>
      </enacting-words>
    </xsl:template>    <xsl:template match="div[@class = 'LegEnactingText']/p">
      <enacting-text>
        <xsl:apply-templates/>
      </enacting-text>
    </xsl:template></xsl:stylesheet> --
Martin Honnen http://msmvps.com/blogs/martin_honnen/
| Current Thread | 
|---|
  | 
| <- Previous | Index | Next -> | 
|---|---|---|
| [xsl] XSL: multiple element come to, Selva Ganesh | Thread | [xsl] how to "print" xsl:element re, Mtekel | 
| RE: [xsl] How to use following-sibl, Michael Kay | Date | [xsl] how to do set operations (int, Mtekel | 
| Month |