XML Development

Moderators: None (Apply to moderate this forum)
Number of threads: 252
Number of posts: 451

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
XSLT - Newbie up to his arm pits Posted by NCDS on 14 Aug 2009 at 5:15 PM
Ok I'm trying to develop my first dynamic page with a XML feed. The code below works to display the first record of the file, then I moved on to have all records displaying and it all fall in a heap.

With a

"SAXParseException: Expected end of tag 'table' (Untitled-6.xsl, line 72, column 3)"

error message. The line it refers to is </xsl:for-all> which I thought was the correct code to cycle through and display all record in the table.

Can anyone assist me in identifying where this is falling over.


Micheal

Code

<table width="1500" border="1" cellpadding="2">
<tr bgcolour="#9acd32">
<th>Class</th>
<th>Co Drivers first Name</th>
<th>Co Driver Surname</th>
<th>Nationality </th>
<th>Drivers First name </th>
<th>Driver Surname</th>
<th>Entrant</th>
<th>Group</th>
<th>Manufacturer</th>
<th>Nat</th>
<th>No</th>
<th>Priority</th>
<th>Vehicle</th>
</tr>
<xsl:for-each select="main/entry"/>
<tr>
<td><xsl:value-of select="main/entry/@class" /></td>
<td><xsl:value-of select="main/entry/@coDriverName" /></td>
<td><xsl:value-of select="main/entry/@coDriverSurname" /></td>
<td><xsl:value-of select="main/entry/@coNat" /></td>
<td><xsl:value-of select="main/entry/@driverName"/></td>
<td><xsl:value-of select="main/entry/@driverSurname"/></td>
<td><xsl:value-of select="main/entry/@entrant"/></td>
<td><xsl:value-of select="main/entry/@group"/></td>
<td><xsl:value-of select="main/entry/@manufacturer"/></td>
<td><xsl:value-of select="main/entry/@nat"/></td>
<td><xsl:value-of select="main/entry/@no"/></td>
<td><xsl:value-of select="main/entry/@priority"/></td>
<td><xsl:value-of select="main/entry/@vehicle"/></td>
</tr>
</xsl:for-all>
</table>
Report
Re: XSLT - Newbie up to his arm pits Posted by xml_looser on 20 Aug 2009 at 8:01 AM
<table width="1500" border="1" cellpadding="2">
<tr bgcolour="#9acd32">
<th>Class</th>
<th>Co Drivers first Name</th>
<th>Co Driver Surname</th>
<th>Nationality </th>
<th>Drivers First name </th>
<th>Driver Surname</th>
<th>Entrant</th>
<th>Group</th>
<th>Manufacturer</th>
<th>Nat</th>
<th>No</th>
<th>Priority</th>
<th>Vehicle</th>
</tr>
<xsl:for-each select="main/entry"/>
<tr>
<td><xsl:value-of select="main/entry/@class" /></td>
<td><xsl:value-of select="main/entry/@coDriverName" /></td>
<td><xsl:value-of select="main/entry/@coDriverSurname" /></td>
<td><xsl:value-of select="main/entry/@coNat" /></td>
<td><xsl:value-of select="main/entry/@driverName"/></td>
<td><xsl:value-of select="main/entry/@driverSurname"/></td>
<td><xsl:value-of select="main/entry/@entrant"/></td>
<td><xsl:value-of select="main/entry/@group"/></td>
<td><xsl:value-of select="main/entry/@manufacturer"/></td>
<td><xsl:value-of select="main/entry/@nat"/></td>
<td><xsl:value-of select="main/entry/@no"/></td>
<td><xsl:value-of select="main/entry/@priority"/></td>
<td><xsl:value-of select="main/entry/@vehicle"/></td>
</tr>
<!--</xsl:for-all>-->
</xsl:for-each>
</table>

Report
Re: XSLT - Newbie up to his arm pits Posted by NCDS on 21 Aug 2009 at 3:09 PM

No joy i'm afraid
I've tried

</tr>
</xsl:for-all>
</table>

and

</tr>
</xsl:for-all>
</xsl:for-each>
</table>


Both still come up with a sax parse error.

If I remove

</tr>
<!--</xsl:for-all>-->
</table>

Then I receive one record only but no error


Report
Re: XSLT - Newbie up to his arm pits Posted by xml_looser on 22 Aug 2009 at 1:10 AM

this a all xsl tags


make a short orginal xml
then i can show what is going wrong



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.