We are adding code to convert a DOM to Domino before invoking saxon library to process xquery expression, which involves constructing a xml document as output. Following exception is seen, for DOM created using certain DOM builders:
java.lang.NullPointerException
at net.sf.saxon.om.NameOfNode.equals(NameOfNode.java:177)
at net.sf.saxon.om.SingletonAttributeMap.put(SingletonAttributeMap.java:69)
at net.sf.saxon.om.NodeInfo.attributes(NodeInfo.java:528)
at net.sf.saxon.tree.util.Navigator.copy(Navigator.java:673)
at net.sf.saxon.om.NodeInfo.copy(NodeInfo.java:568)
at net.sf.saxon.tree.util.Navigator.copy(Navigator.java:679)
at net.sf.saxon.om.NodeInfo.copy(NodeInfo.java:568)
at net.sf.saxon.event.ComplexContentOutputter.decompose(ComplexContentOutputter.java:860)
at net.sf.saxon.event.ComplexContentOutputter.append(ComplexContentOutputter.java:656)
The cause seems to be that node.getLocalName() for attribute type of nodes, returns null for Domino. Same setup works if DOM is converted to Tiny Tree or passed using a DOMWrapper to Saxon.
Xquery using domino, expected to work, threw Exception.