|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: For-each-group problem
Your XML is not well formed. But assuming that your well formed XML would be:
<root>
<body>
<heading/>
<p></p>
<p></p>
<li></li>
<div>
<p></p>
<p></p>
</div>
<li></li>
<div>
<p></p>
<p></p>
<p></p>
<p></p>
</div>
<li></li>
<div>
<p></p>
<p></p>
</div>
<p></p>
<p></p>
<footer></footer>
</body>
</root>The following stylesheet produces the wanted output: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" indent="yes" /> <xsl:template match="node() | @*"> <xsl:copy> <xsl:apply-templates select="node() | @*" /> </xsl:copy> </xsl:template> <xsl:template match="li" /> <xsl:template match="div"> <li> <xsl:copy-of select="." /> </li> </xsl:template> </xsl:stylesheet> As Andrew said, you don't need grouping here, but a variation of identity transform. On 10/2/06, Mario Madunic <hajduk@xxxxxxxx> wrote: Can't seem to get the results I want using for-each-group -- Regards, Mukul Gandhi
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Cast Your Vote
We need your help – Vote for DataDirect XML Products!
Winners and finalists announced at SOA World Conference in November. 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
|







