XML in HTML ???

admin

Administrator
Staff member
Hi,

I am pretty new to XML so there is my question...

I have a XML file with some data in it, such as this :

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href=http://www.webdeveloper.com/forum/archive/index.php/"cdcatalog.xsl"?>
<catalog>
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
.
.
.
</catalog>

And I have a XSL file to transform this with great look like this :

<?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="#9acd32">
<th align="left">Title</th>
<th align="left">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>

That makes a nice table in my browser window. Until now, everything's fine.

Now what I want is to put that nice little table in another HTML file with header and images and all graphical stuff. I was looking everywhere for help but apparently this is simply impossible.

Should I make the whole thing in XML (including all the HTML part of it), or should I use another technology ?

Any advise ? Thanx.
 
Back
Top