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

XSL: multiple element come to single parent element

Subject: XSL: multiple element come to single parent element
From: Selva Ganesh <selvaganesh1985@xxxxxxxxx>
Date: Sun, 10 May 2009 08:27:17 +0530
 XSL: multiple element come to single parent element
Hi All,

In my question is every <div> opened new <enacting-words>, actually I
need for all <div> come to one parent <enacting-words>, how to write
the xsl


This is XSL:

 <xsl:template match="div[@class[.='LegEnactingText']]/p">
  <enacting-words>
  <enacting-text><xsl:value-of select="."/></enacting-text>
  </enacting-words>
 </xsl:template>

This my input:

<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>

Thanks in advance,
Selva

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.