Forum Stats

  • 3,875,872 Users
  • 2,266,977 Discussions
  • 7,912,361 Comments

Discussions

Exception using JAXP transformer on non-default DOM

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

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(DOM2Helper.java:348)
at org.apache.xml.utils.TreeWalker.startNode(TreeWalker.java:281)
at org.apache.xml.utils.TreeWalker.traverse(TreeWalker.java:119)
at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:320)
at ddom.DTreeTester.write(DTreeTester.java:59)
at ddom.DTreeTester.main(DTreeTester.java:76)

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.

Mathias

Comments

This discussion has been closed.