Free Support Forum - aspose.com

Double <xsl:for-each is not working

Hi,

I am trying to print the following:

<xsl:for-each select="data/tableheader/row[2]/cols/col">

<Cell>

<Text Alignment="Right">

<Segment><</Segment>

</Text>

</Cell>

<xsl:for-each select="data/tableheader/row[1]/cols/col">

<Cell>

<Text Alignment="Right">

<Segment>

<xsl:value-of select="."/>

</Segment>

</Text>

</Cell>

</xsl:for-each>

</xsl:for-each>

the xml part that contain that data is:

<data>

<tableheader>

<summary>N</summary>

<row>

<cols>

<col>40</col>

<col>50</col>

<col>60</col>

<col>70</col>

<col>80</col>

</cols>

</row>

<row>

<cols>

<col>2</col>

<col>3</col>

<col>7</col>

</cols>

</row>

</tableheader>

</data>

the output i get is "< < <" which looks like the second "<xsl:for-each" is not fired. the output should be "< 40 50 60 70 80 < 40 50 60 70 80 < 40 50 60 70 80"

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I have tested the issue and I am unable to reproduce the problem. Can you please share the exact XML and XSLT so that we can test it again.

thanks for your response.

i found the answer, i changed the second "<xsl:for-each select="data/tableheader/row[1]/cols/col">"

to "<xsl:for-each select="//row[1]/cols/col">"

Regards