I was playing around with XML stylesheets, and all over a sudden ran into the following errormessage when opening the XML+XSL in Firefox (v3.0.9 and v3.6.4)
The statement causing the error was a simple value-of select:Error loading stylesheet: An unknown error has occurred ()
Code: Select all
<xsl:value-of select="@xlink:href"/>
The problem was that I didn't declare the "xlink" namespace in the stylesheet. Firefox could/should have told me about this, but it didn't.
The solution is to add the namespace declaration to the XSL file, like this:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xlink="http://www.w3.org/1999/xlink">