[XOM-interest] [saxon] Bug (?) in Saxon/DOM/XOM interaction:Attributes instead of namespaces; strange element tree structure
Michael Kay
mike at saxonica.com
Fri Feb 22 18:38:23 EST 2008
> Now, after factoring this code out of my project, I was not
> able to reproduce exactly the bug I reported, but a similar one:
>
> Error on line 52
> Error in call to extension function {public static java.lang.String
> XSLTFunctions.render(org.w3c.dom.NodeList)}: Exception in
> extension function
> nu.xom.NamespaceConflictException: Prefixed elements must
> have namespace URIs.
This one doesn't look like a Saxon problem. As far as I can tell, a node in
the input DOM document is being passed transparently through Saxon and the
XSLTFunctions library to the XOM DOMConverter, which doesn't like it.
I tested this by taking Saxon out of the equation: if the program is reduced
to:
DocumentBuilderFactory df = DocumentBuilderFactory.newInstance();
org.w3c.dom.Document doc = df.newDocumentBuilder().parse(new
File("mmlkit.xml"));
Element outer = doc.getDocumentElement();
NodeList outerKids = outer.getChildNodes();
DOMConverter.convert ((org.w3c.dom.Element) outerKids.item (1));
then it fails with the same error.
Michael Kay
http://www.saxonica.com/
More information about the XOM-interest
mailing list