|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How nested for loop in xsl?
This creates the output you requested though it does not look like a
particularly generic solution. I suspect there may be more meaning to your
input/output structures that is not apparent from the sample given.
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<name>
<xsl:apply-templates select="sqlgeneral/*"/>
</name>
</xsl:template>
<xsl:template match="productA">
<xsl:for-each select="./row/name">
<item><xsl:value-of select="."/></item>
</xsl:for-each>
</xsl:template>
<xsl:template match="productB">
<xsl:for-each select="./row/code">
<type><xsl:copy-of select="."/></type>
</xsl:for-each>
</xsl:template>
Regards
Nick Browne
Slipstone Ltd
jvhew@xxxxxxxxxxxxxxxxxx wrote:
> hi,
>
> I'am new in xsl and hope somebody can help me on this.
> I'll like to transform the below input.xml file to
> output.xml using the specify xsl file
etc.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! 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
|

Cart








