OK, you have found the problem.
Thanks
Guido
-----Original Message-----
From: Gary L Peskin [mailto:[EMAIL PROTECTED]]
Sent: luned� 10 settembre 2001 16.37
To: [EMAIL PROTECTED]
Subject: RE: Problem to generete HTML from xsl file and Document object
Guido --
This is a classpath problem. Your servlet has another DOM
implementation in your classpath or your lib/ext directory ahead of the
one supplied by Xalan/Xerces. See the instructions for
org.apache.xalan.xslt.EnvironmentCheck and check your classpath and
lib/ext directory.
If you still can't figure it out, please let us know what servlet engine
you're using.
Gary
> -----Original Message-----
> From: Mazzarol Guido [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 10, 2001 4:03 AM
> To: '[EMAIL PROTECTED]'
> Subject: Problem to generete HTML from xsl file and Document object
>
>
> I'm using a servlet to create HTML code with xsl and xml
> files as follows
>
> TransformerFactory tFactory = TransformerFactory.newInstance();
> // Get the XML input document and the stylesheet.
> Source xmlSource = new StreamSource(new
> URL("file:c:\\java\\test.xml").openStream());
> Source xslSource = new StreamSource(new
> URL("file:\\test.xsl").openStream());
> // Generate the transformer.
> Transformer transformer = tFactory.newTransformer(xslSource);
> // Perform the transformation, sending the output to
> the response.
> transformer.transform(xmlSource, new StreamResult(out));
>
> and it works, but when i try to use xml as a object replacing
> the last line with this one
>
> // Document doc = ...
> transformer.transform(new DOMSource(doc), new
> StreamResult(out));
>
> the following runtime error appear:
>
> java.lang.NoSuchMethodError: org.w3c.dom.Node: method
> getNamespaceURI()Ljava/lang/String; not found
>
> Thanks
>
> Guido
>
>