[ https://issues.apache.org/jira/browse/XMLBEANS-100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13066302#comment-13066302 ]
Robert H. Pollack edited comment on XMLBEANS-100 at 7/17/11 3:51 AM: --------------------------------------------------------------------- Just for the record, what's going on here is that XMLBeans uses its own implementation of the DOM interfaces. It's a DOM level 2 implementation--the level 3 operations are present, but all they do is to throw an exception. The problem is that some XSLT processors call the level 3 methods, with the results reported here. One workaround is to copy the XMLBeans DOM nodes to a genuine level 3 implementation. Another workaround is to avoid DOM altogether, by having XMLBeans output text to a stream. The problem is still present in XMLBeans 2.5.0, but the DOM copying technique still works and I have also verified that the XmlObject class can indeed parse a level 3 DOM created by XSLT. was (Author: rpollack): For those following this issue, here is an update. First, the problem still exists in XMLBeans version 2.5.0. Second, I have confirmed that the import workaround described above still works and that XMLBeans can indeed parse the post-transform document. It occurs to me that the above discussion may not make it clear what the problem actually is. Here is what's going on: XMLBeans has its own implementation of DOM, which is DOM level 2. But the implementation of XSLT that is built into JDK 1.6 (Saxon) assumes that the DOM implementation is level 3. This means that XSLT cannot operate on DOM nodes supplied by XMLBeans; but it can use DOM nodes created by the JDK DOM implementation. The good news is that the two implementations understand each other. So the JDK implementation can create a level 3 DOM tree by importing an XMLBeans DOM tree; and XMLBeans can parse a DOM tree created by the JDK. Interestingly, the Saxon implementation calls level 3 methods only if it thinks they are available; it contains workarounds for level 2 DOM implementations. But informing Saxon that the DOM is level 2 does not seem to be easy. Another interesting problem is that the XMLBeans implementation actually contains all the level 3 methods, but they are stubbed out and throw unconditional exceptions. So any technique for determining the DOM level automatically by checking for the presence of these methods will not work. > Support of DOM Level 3 > ---------------------- > > Key: XMLBEANS-100 > URL: https://issues.apache.org/jira/browse/XMLBEANS-100 > Project: XMLBeans > Issue Type: New Feature > Components: DOM > Affects Versions: Version 2 > Reporter: Walter Dorninger > Assignee: Jacob Danner > Priority: Minor > Fix For: TBD > > > Support of DOM Level 3 would be a powerful feature. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org For additional commands, e-mail: dev-h...@xmlbeans.apache.org