You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Dirk Reiss <d....@tu-bs.de> on 2004/03/04 05:56:20 UTC

trouble with xmlns:xml namespace declaration

Hello,

i send a xml-document to an apache-axis-server. Axis provides the method
getAsDocument()
in several classes which itself uses xerces to convert content to a
Document.

When i have something like
     <element xml:lang="en"
xmlns:xml="http://www.w3.org/XML/1998/namespace">
in my document, i get the following exception:

org.xml.sax.SAXException: Fatal Error: URI=null Line=2: The prefix
"xmlns" cannot be bound to any namespace explicitly; neither can the
namespace for "xmlns" be bound to any prefix explicitly.
     at
org.apache.axis.utils.XMLUtils$ParserErrorHandler.fatalError(XMLUtils.java:624)
     at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown 
Source)
     at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
     at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
     at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanAttribute(Unknown
Source)
     at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
     at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown 

Source)
     at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
     at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
     at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
     at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:322)
     at
org.apache.axis.message.MessageElement.getAsDocument(MessageElement.java:688)
     [snip] (some stuff from my classes)

As far as i can see there is no xmlns:xmlns=" ..." declaration in my
document, so this error should not occur as xmlns:xml is not necessary
but allowed
according to w3c-errata.

So, is this a but in xerces or am I missing something?

Thanks in advance,

Dirk



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org