Forum Stats

  • 3,875,872 Users
  • 2,266,977 Discussions


Exception using JAXP transformer on non-default DOM

843834 Member Posts: 49,972
edited Jul 27, 2001 1:37AM in Java Technology & XML

I have a problem with the JAXP integration of my own DOM implementation. I've written a compressed core level 1 DOM implementation and integrated it into JAXP by writing a DocumentBuilder and a DocumentBuilderFactory class. Although not 100% of all DOM methods are implemented completely, it works fine for typical xml documents. I can read in a xml document using JAXP by setting the DocumentBuilderFactory setting to my implementation:
System.setProperty("javax.xml.parsers.DocumentBuilderFactory", "ddom.jaxp.DDocumentBuilderFactory");

But if I try to use a Transformer on the document, I get a NoSuchMethodException:

Exception in thread "main" java.lang.NoSuchMethodError
at org.apache.xpath.DOM2Helper.getNamespaceOfNode(
at org.apache.xml.utils.TreeWalker.startNode(
at org.apache.xml.utils.TreeWalker.traverse(
at org.apache.xalan.transformer.TransformerIdentityImpl.transform(
at ddom.DTreeTester.write(
at ddom.DTreeTester.main(

Unfortunately there is no source code available for JAXP, so I can't really figure what's going wrong. From the exception it is obvious that the Transformer is trying to figure out the namespace before it crashes. As my implementation ony implements DOM level 1 at the moment there is no support for namespaces. But of course this is reported by my DocumentBuilder class, so no calls to such methods hould occur.

I just wanted to use the identity transformation to produce some nice output files. I would be very happy if anyone could help me with this problem.



This discussion has been closed.