|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
Perhaps someting like:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl utput 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. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > XSL Question Please Help Sorry I'm still learning |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|