[Home] [By Thread] [By Date] [Recent Entries]
I have tried the same and hard time figuring out the syntax.
<products>
<customer>
<email>senthil@xxxxxxxxx</email>
<first_name>Senthil</first_name>
<last_name>K</last_name> <PRODUCT_NAME1>MAc
</PRODUCT_NAME1>
<GREETINGS>Hello
</GREETINGS> </customer>
</products><?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" omit-xml-declaration="no" indent="yes" encoding="UTF-8" /> <xsl:template match="/products"> <xsl:copy> <xsl:call-template name="COPY"> </xsl:call-template> </xsl:copy> </xsl:template> <xsl:template name="COPY"> <xsl:variable name="n" select="10" /> <xsl:for-each select="1to$n"> <xsl:copy> <xsl:apply-templates select="//customer/*"/> </xsl:copy> </xsl:for-each> </xsl:template> </xsl:stylesheet> On Mar 6, 2007, at 4:02 PM, Abel Braaksma wrote: Senthilkumaravelan Krishnanatham wrote:How do I retain the structure of the sibling node?
|

Cart



