SunQuest
           XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old July 3rd, 2003, 10:32 AM
atbgm atbgm is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 1 atbgm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
XSL Question Please Help Sorry I'm still learning

I would hope anyone can help me understand a certain problem I am currently having with a small piece of code. I would be very grateful if anyone could give me some ideas on how I could structure my XSL template to produce an output similar to the following table given the attached Test.xml source. I seem to be using for-each and the priority attribute but cant pinpoint where to place it correctly.

View the Test.xml source at :
Test.xml

Required result in table format is :
ASXCode Company Name Company Statistics/Interim Dates Annual Balance Sheet/Cash

RWS Rothbury Wines Limited -- 99,000

OCO Oriel Communications Limited 12/2002 97,065

NRL Newland Resources Limited 12/2002 95,143

MCL M2M Corporation Limited 12/2002 95,033

SUP Supersorb Environment NL 12/2002 94,328

Reply With Quote
  #2  
Old July 3rd, 2003, 12:04 PM
Wizard2003's Avatar
Wizard2003 Wizard2003 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 206 Wizard2003 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 h 29 m 24 sec
Reputation Power: 6
Perhaps someting like:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xslutput method="html" />

<xsl:template match="/">
<HTML><HEAD><TITLE>Ausgabe von test:</TITLE>
</HEAD>
<BODY>
<TABLE border="1">
<xsl:apply-templates />
</TABLE>
</BODY>
</HTML>
</xsl:template>

<xsl:template match="ResultSet">
<TR>
<xsl:for-each select="Metadata/Column">
<TD><B><xsl:value-of select="@label"/></B></TD>
</xsl:for-each>
</TR>
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="Record">
<TR>
<TD><xsl:value-of select="./Column[1]"/></TD>
<TD><xsl:value-of select="./Column[2]"/></TD>
<TD><xsl:value-of select="./Column[3]"/></TD>
<TD><xsl:value-of select="./Column[4]"/></TD>
<TD><xsl:value-of select="./Column[5]"/></TD>
<TD><xsl:value-of select="./Column[6]"/></TD>
<TD><xsl:value-of select="./Column[7]"/></TD>
</TR>
<xsl:value-of select="./Column[1]"/>
</xsl:template>

</xsl:stylesheet>

may help you.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XSL Question Please Help Sorry I'm still learning


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway