Exception using JAXP transformer on non-default DOM

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

[1739 byte] By [mneumi] at [2007-9-26 1:58:54]
# 1
Source code packages from xerces do contain JAXP sources. you can get it http://xml.apache.org.Good luck.
lk555 at 2007-6-29 3:17:19 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

I tried to get more info on the DOM2Helper class, but only found lots of deprecated APIs. There seems to be some work done on internal APIs dealing with that class. Search for "DOM2Helper" in this page http://xml.apache.org/xalan-j/readme.html

Maybe you just need to get a newer version of Xalan.

lk555 at 2007-6-29 3:17:19 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...