Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] Problem generating html using XSLTransform

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Fred Vos <fred AT fredvos.org>
  • To: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: [XOM-interest] Problem generating html using XSLTransform
  • Date: Tue, 12 Jul 2005 21:23:37 +0200

Hello,

Is it possible to generate HTML with XSLTransform? I'm using an XML file
and an XSL file that generate HTML when using xsltproc and in Perl when using
the XML::LibXSLT module, but generate an exception when used with XOM's
XSLTransform class.

Here's the start of the xsl file:

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

<xsl:template match="/eo">
<html>
<head>
<link href="http://nereus.uvt.nl/eo/eo.css"; type="text/css"
rel="stylesheet"/>
<title><xsl:value-of select="title"/></title>
</head>
<body>
<div id="nereuslogo">
<img src="http://nereus.uvt.nl/images/nereus_logo.jpg"; alt="Nereus
logo"/>
</div>
<h1><xsl:value-of select="title"/></h1>

<h2>Partners</h2>
<div id="index">
<xsl:apply-templates select="partners/partner"/>
</div>

</body>
</html>
</xsl:template>

et cetera

When used with XSLTransform I get the following exception:

nu.xom.NamespaceConflictException: Unprefixed attribute href cannot be in
default namespace http://www.w3.org/1999/xhtml

I know I've seen this problem before on this list, but I forgot the solution
to it and cannot find the solution on the internet. I'm using the xom.jar as
provided with nux-1.0rc3.

Thanks for any help.

Fred




Archive powered by MHonArc 2.6.24.

Top of Page