C
chris
Hello all -
I am trying to display some XML data as html via a transform (XSLT). The
XML data is as follows:
<TopElement>
<NextElement>
<String1>AAAAA</String1>
<String2>BBBBB</String2>
<String3>CCCCC</String3>
<String4>DDDDD</String4>
</NextElement>
</TopElement>
There could be a great many <NextElement> nodes in the XML file. I want the
resultant file (structure) to look like this:
.... <stuff>
<tr><td>
<xsl:value-of select="String2">
</td></tr>
<tr>
<td><xsl:value-of select="String3"></td>
<td><xsl:value-of select="String4"></td>
</tr>
.... <more stuff>
Where String2 might be a constant for several nodes. Using the
<xsl:for-each select=""> structure, I get the value of String2 repeated over
and over again when I want one instance of the value of String2 displayed
and the other data displayed via the iteration (it will always be
different). I can sort the value etc but can't get it to display the way I
like. I have looked for a solution i the book I'm using (XSLT & XPATH) but
no straightforward answer. Please let me know if I have not stated the
problem correctly. Thank you in advance for any assistance.
Regards,
chris
I am trying to display some XML data as html via a transform (XSLT). The
XML data is as follows:
<TopElement>
<NextElement>
<String1>AAAAA</String1>
<String2>BBBBB</String2>
<String3>CCCCC</String3>
<String4>DDDDD</String4>
</NextElement>
</TopElement>
There could be a great many <NextElement> nodes in the XML file. I want the
resultant file (structure) to look like this:
.... <stuff>
<tr><td>
<xsl:value-of select="String2">
</td></tr>
<tr>
<td><xsl:value-of select="String3"></td>
<td><xsl:value-of select="String4"></td>
</tr>
.... <more stuff>
Where String2 might be a constant for several nodes. Using the
<xsl:for-each select=""> structure, I get the value of String2 repeated over
and over again when I want one instance of the value of String2 displayed
and the other data displayed via the iteration (it will always be
different). I can sort the value etc but can't get it to display the way I
like. I have looked for a solution i the book I'm using (XSLT & XPATH) but
no straightforward answer. Please let me know if I have not stated the
problem correctly. Thank you in advance for any assistance.
Regards,
chris