How does one get a second table to show up? At this point I really don’t care if it’s the same exact table as long as I can see two tables and not one. An example of a second table would show COUNTRY, COMPANY, PRICE, and YEAR. I know how to display this information in one table but I want to break it up int two tables.
***I've attached a picture on what I would like the XML file to look like.***
Below are my XML and XSLT files.
[U]XML File: [/u]
Expand|Select|Wrap|Line Numbers
- <?xml version="1.0" encoding="ISO-8859-1"?>
- <?xml-stylesheet type="text/xsl" href="test.xsl"?>
- <catalog>
- <cd>
- <title>All my eX's live in Texas</title>
- <artist>George Strait</artist>
- <country>Russia</country>
- <company>NCS</company>
- <price>100.00</price>
- <year>1984</year>
- </cd>
- <cd>
- <title>Hide your heart</title>
- <artist>Bonnie Tyler</artist>
- <country>UK</country>
- <company>CBS Records</company>
- <price>9.90</price>
- <year>1988</year>
- </cd>
- <cd>
- <title>Greatest Hits</title>
- <artist>Dolly Parton</artist>
- <country>USA</country>
- <company>RCA</company>
- <price>9.90</price>
- <year>1982</year>
- </cd>
- <cd>
- <title>Still got the blues</title>
- <artist>Gary Moore</artist>
- <country>UK</country>
- <company>Virgin records</company>
- <price>10.20</price>
- <year>1990</year>
- </cd>
- <cd>
- <title>Eros</title>
- <artist>Eros Ramazzotti</artist>
- <country>EU</country>
- <company>BMG</company>
- <price>9.90</price>
- <year>1997</year>
- </cd>
- <cd>
- <title>One night only</title>
- <artist>Bee Gees</artist>
- <country>UK</country>
- <company>Polydor</company>
- <price>10.90</price>
- <year>1998</year>
- </cd>
- </catalog>
Expand|Select|Wrap|Line Numbers
- <?xml version="1.0" encoding="ISO-8859-1"?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template match="/">
- <html>
- <body>
- <h2>My CD Collection</h2>
- <table border="1">
- <tr bgcolor="red">
- <th>Title</th>
- <th>Artist</th>
- </tr>
- <xsl:for-each select="catalog/cd">
- <tr>
- <td><xsl:value-of select="title"/></td>
- <td><xsl:value-of select="artist"/></td>
- </tr>
- </xsl:for-each>
- </table>
- </body>
- </html>
- </xsl:template>
- </xsl:stylesheet>
Gabe