Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Only one row returned from XML file

Status
Not open for further replies.

Alkemac

IS-IT--Management
Jun 3, 2003
23
0
0
ZA
I've created the following XSL file and when it runs with the XML file, only one row is returned. What would cause this to happen ?

<!--Start of XSL-->
<?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?><xsl:stylesheet version=&quot;1.0&quot;
xmlns:xsl=&quot;<xsl:template match=&quot;/&quot;>
<html>
<body>
<h2>Brokers Notes</h2>
<table border=&quot;1&quot;>
<tr bgcolor=&quot;#9acd32&quot;>
<th align=&quot;left&quot;>Deal Id</th>
<th align=&quot;left&quot;>Short Code</th>
</tr>
<xsl:for-each select=&quot;BrokerNotes/BrokerNotesForClients&quot;>
<tr>
<td><xsl:value-of select=&quot;NotesForClient/Deal/DealId&quot;/></td>
<td><xsl:value-of select=&quot;NotesForClient/Deal/Instrmnt/InstrAlpha&quot;/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template></xsl:stylesheet>
 
I think your problem is here:

<xsl:for-each select=&quot;BrokerNotes/BrokerNotesForClients&quot;>

You are only selecting one node.

Change to:

<xsl:for-each select=&quot;//BrokerNotes/BrokerNotesForClients&quot;>

(Add double slashes)

I can't see the structure of your XML to be sure of the rest of the XSLT file, but this is definitely why it only outputs one row.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top