problems creating xsl

wxdqz

New Member
Hi all,
I'm a total Newbie to xml/xsl (I just started today :() and I am trying to create an xsl-file to view an existing xml-file as an html-page.

Now the xml looks as follows (this is just a short example):


<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href=http://www.webdeveloper.com/forum/archive/index.php/"C:\source\Richtlinien\test.xsl"?>
<nda:books xmlns:nda="http://www.nda.de/" >
<book ISBN="03232324" author="Michael R. Sweet"/>
<book ISBN="454657457" author="Gerald Farin"/>
</nda:books>



And the xsl (which I was trying to create) like this:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">

<xsl:template match="/">
<html>
<head>
<title></title>
</head>
<body>
<table>
<tr>
<td>ISBN</td>
<td>Author</td>
</tr>
<xsl:for-each select="nda:books/book">
<tr>
<td><xsl:value-of select="@ISBN" /></td>
<td><xsl:value-of select="@author" /></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

Now, I do get an Error (I'm using XMLSpy) which says:
"Reference to undeclared namespace prefix: 'nda'. Error "
So I know it's that prefix nda, but my problem is, I can't change the xml into another tag because the file is automatically generated.

Who knows how I can make that work? I am glad for any help!!

Thnx
 
Top