You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by "Anthony J. Zepezauer" <az...@vipmobile.net> on 2001/08/09 01:52:48 UTC

namespace problem

Hi, I am new to Xalan and new to this list.  I've set up a simple (at this
point) servlet which uses xalan to read, transform and output an xml file.
The code was mostly cribbed from the servlet sample that came with the Xalan
download and pasted at the end of this post.  The servlet is handled by
Tomcat 3.2.3 running under Windows 2000 (for development; it will be ported
to Linux when complete).

I get this error when I try to run it:

> javax.xml.transform.TransformerConfigurationException: Namespace not
supported by SAXParser

This is the namespace attribute in the xsl file, also cribbed from a sample:

> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

I am stumped by this and haven't yet found any relevant info on the Xalan
website.  I'll continue to look but any help would be appreciated.

Thanks
Tony Z

HERE'S THE CODE FROM THE doGet METHOD:

TransformerFactory tFactory = TransformerFactory.newInstance();
// Get the XML input document and the stylesheet.
Source xmlSource = new StreamSource(new
URL"file:fakeResults.xml").openStream());
Source xslSource = new StreamSource(new URL("file:links.xsl").openStream());
// Generate the transformer.
Transformer transformer = tFactory.newTransformer(xslSource);
// Perform the transformation, sending the output to the response.
transformer.transform(xmlSource, new StreamResult(pw));