I have the following xml:
<userattribute>
<attribute>
<name> </name>
<value> </value>
<value2> </value2>
</attribute>
<attribute>
<name> </name>
<value> </value>
<value> </value>
<value2> </value2>
</attribute>
</userattribute>
One attribute can have multiple values. Here is the xls to display in a small html table:
<?xml version="1.0" encoding="ISO-8859-1"?>
<html xsl:version="1.0" xmlns:xsl=" xmlns="
<body style="font-family:Arial,helvetica,sans-serif">
<table border="1">
<tr>
<th align="left">Attribute</th>
<th align="left">Value</th>
<th align="left">Value2</th>
</tr>
<xsl:for-each select="userattribute/attribute">
<tr>
<td><xsl:value-of select="name"/></td>
<td><xsl:value-of select="value"/></td>
<td>
<table>
<xsl:for-each select="value">
<tr><td><xsl:value-of select="value"/></td></tr>
</xsl:for-each>
</table>
</td>
<td><xsl:value-of select="value2"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
This displays only 1 value of the multiple ones!!
I tried a foreach within the value: does not show even 1 value.
what am I missing here. I am fairly new to xml and this site has been very helpful for me to get started.
Thanks
raghu
<userattribute>
<attribute>
<name> </name>
<value> </value>
<value2> </value2>
</attribute>
<attribute>
<name> </name>
<value> </value>
<value> </value>
<value2> </value2>
</attribute>
</userattribute>
One attribute can have multiple values. Here is the xls to display in a small html table:
<?xml version="1.0" encoding="ISO-8859-1"?>
<html xsl:version="1.0" xmlns:xsl=" xmlns="
<body style="font-family:Arial,helvetica,sans-serif">
<table border="1">
<tr>
<th align="left">Attribute</th>
<th align="left">Value</th>
<th align="left">Value2</th>
</tr>
<xsl:for-each select="userattribute/attribute">
<tr>
<td><xsl:value-of select="name"/></td>
<td><xsl:value-of select="value"/></td>
<td>
<table>
<xsl:for-each select="value">
<tr><td><xsl:value-of select="value"/></td></tr>
</xsl:for-each>
</table>
</td>
<td><xsl:value-of select="value2"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
This displays only 1 value of the multiple ones!!
I tried a foreach within the value: does not show even 1 value.
what am I missing here. I am fairly new to xml and this site has been very helpful for me to get started.
Thanks
raghu