my first basic xml and im in trouble already!! help

admin

Administrator
Staff member
can anyone tell me what's wrong with this code...i just started learning xml and im just literally reading and following what the tutorials are giving...im sort of trying to feel xml for now but the thing is...it's wrong i cant get it to display here my code

the xml code :
<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/xsl" href=http://www.webdeveloper.com/forum/archive/index.php/"view.xsl"?>
<CATALOG>
<TITLE>Test Book</TITLE>
<AUTHOR>Me</AUTHOR>
</CATALOG>

the xsl :
<?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>
<h1 align="center">My First Xml Test</h1>
<table>
<tr bgcolor = "blue">
<td>TITLE</td>
<td>AUTHOR</td>
</tr>
<tr bgcolor="red">
<td><xsl:value-of select="catalog/title"/></td>
</tr>
</table>
</body>
</html>
</xsl:template>

</xsl:stylesheet>

i can get it to display but the problem is the
<xsl:value-of select="catalog/title"/> <--- this line is not working... as far as my limited knowledge in xml i think its the correct syntax but how come it's not displaying anything?? id really appreciate ur help thanks
 
Back
Top