Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] [saxon] Bug (?) in Saxon/DOM/XOM interaction:Attributes instead of namespaces; strange element tree structure

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Michael Kay" <mike AT saxonica.com>
  • To: "'Mailing list for the SAXON XSLT and XQuery processor'" <saxon-help AT lists.sourceforge.net>
  • Cc: 'XOM' <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] [saxon] Bug (?) in Saxon/DOM/XOM interaction:Attributes instead of namespaces; strange element tree structure
  • Date: Fri, 22 Feb 2008 23:38:23 -0000

> 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/





Archive powered by MHonArc 2.6.24.

Top of Page