I've traced down the error a bit further and it turns out that it isn't anything like what I thought it was. Basically, the output of the XSLT transformation is producing a tag like:
<div xmlns="" class="section">
and it seems that the XSP chokes on the empty namespace.
The other question is also why the XSLT produces that. With an input file of:
<?xml version="1.0" encoding="iso-8859-1"?>
<page><section><para>
This is a test.
</para></section></page>and the stylesheet of:
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<xsp:page language="Perl"
xmlns:xsp="http://www.apache.org/1999/XSP/Core"
xmlns="http://www.w3.org/1999/xhtml">
<html><body><xsl:apply-templates select="page"/></body></html>
</xsp:page>
</xsl:template> <xsl:template match="section">
<div class="section"><xsl:apply-templates/></div>
</xsl:template> <xsl:template match="para">
<p><xsl:apply-templates/></p>
</xsl:template></xsl:stylesheet>
The output is:
<?xml version="1.0"?>
<xsp:page xmlns:xsp="http://www.apache.org/1999/XSP/Core" xmlns="http://www.w3.org/1999/xhtml" language="Perl">
<html>
<body>
<div xmlns="" class="section">
<p>
This is a test.
</p>
</div>
</body>
</html>
</xsp:page>
I realise that the stylesheet is probably wrong - the xmlns="...xhtml" should be in the root node of the stylesheet (not down where the xsp:page tag is). And my guess is the XSLT figures that since the <div> is used outside of the <xsp:page> in the original stylesheet, then it isn't from the xhtml namespace and so it attempts to resets it by giving it an empty namespace attribute. But I'm not sure if an empty namespace tag is allowed?
Regards, Chris
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
