Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] Wrong namespace URI for xml prefix

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Jim Downing <ojd20 AT cam.ac.uk>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: [XOM-interest] Wrong namespace URI for xml prefix
  • Date: Tue, 11 Oct 2005 15:19:44 +0100

Hi all,

in trying to move from the default Builder to one that uses a ResolvingXMLReader I've come across an error I can't figure out. I'm pretty sure it's not a XOM problem, but unfortunately don't understand what's going on well enough to figure out where the problem _is_ arising.

The application is parsing an XHTML file. This works fine when using the default Builder constructor, but using the ResolvingXMLReader throws the following exception: -

nu.xom.ParsingException: Wrong namespace URI for xml prefix:
at nu.xom.Builder.build(Builder.java:1142)
at nu.xom.Builder.build(Builder.java:562)
at org.jimdowning.europlan.CreateTemplateSite.main(CreateTemplateSite.java:101)
Caused by: nu.xom.NamespaceConflictException: Wrong namespace URI for xml prefix:
at nu.xom.Attribute._setNamespace(Attribute.java:495)
at nu.xom.Attribute.<init>(Attribute.java:168)
at nu.xom.NodeFactory.makeAttribute(NodeFactory.java:253)
at nu.xom.XOMHandler.startElement(XOMHandler.java:161)
at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527)
at org.apache.xml.resolver.tools.ResolvingXMLFilter.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:798)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:878)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
at org.apache.xml.resolver.tools.ResolvingXMLFilter.parse(Unknown Source)
at nu.xom.Builder.build(Builder.java:1125)
at nu.xom.Builder.build(Builder.java:562)
at uk.ac.cam.ucs.template.CreateTemplateSite.main(CreateTemplateSite.java:101)

It seems that something is erroneously creating a default namespace with the xml prefix.

If anyone has any clues of where I should be looking, they'd be greatly appreciated.

Best regards,
jim




Archive powered by MHonArc 2.6.24.

Top of Page