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 a hmtl-page.
Now the xml looks as follows (this is just a short example):
And the xsl (which I was trying to create) like this:
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 that into another tag because the file is automatically generated.
Who knows how I can make that work? I am glad for any help!!
Thnx
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 a hmtl-page.
Now the xml looks as follows (this is just a short example):
Code:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="C:\source\Richtlinien\test.xsl"?>
<nda:books>
<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:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform"[/URL] xmlns:fo="[URL unfurl="true"]http://www.w3.org/1999/XSL/Format">[/URL]
<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>
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 that into another tag because the file is automatically generated.
Who knows how I can make that work? I am glad for any help!!
Thnx