cancel
Showing results for 
Search instead for 
Did you mean: 

Nested loop Mapping in XSLT

Former Member
0 Kudos

Hi

I am using this XSLT mapping with the source and target structure as same, since i need to include some constants in it.I am doing more than two nesting for loop. Since it is the same structure it looks simple. But i cannot produce the nested output.

the XSL am using :

<b><xsl:for-each select="products/vendor/product"></b>

<xsl:element name="product">

<xsl:value-of select="products/vendor/product" />

<b> <xsl:for-each select="products/vendor/product/attribute"></b>

<xsl:element name="products/vendor/product/attribute">

<xsl:value-of select="products/vendor/product/attribute" />

<attribute operation="" attributeId="" name="" language="" endpointid="" xsi:type=""/>

</xsl:element>

<b> </xsl:for-each></b>

</xsl:element>

<b></xsl:for-each></b>

Need the output like

<product >

<attribute name="ADA Compliant">Y</attribute>

<attribute name="" type=" ">32.750</attribute>

<attribute name="" type=" ">19.750 in</attribute>

<attribute name="" type=" ">No</attribute>

<attribute name="" type=" ">65.000</attribute>

</product>

I am not sure what is wrong in the XSLT. Any pointers on this.

Regards

Anandan

Message was edited by:

Anandan Loganathan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Answers (3)

Answers (3)

Former Member
0 Kudos
Former Member
0 Kudos
Former Member
0 Kudos