[Home] [By Thread] [By Date] [Recent Entries]
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
|

Cart



