URI of no namespace

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

URI of no namespace

Clement_Pellerin
The javadoc for org.w3c.dom.Document.createAttributeNS(
  String namespaceURI, String qualifiedName) says:
       Per [XML Namespaces] , applications must use the value null
       as the namespaceURI parameter for methods if they wish to have no namespace.

Santuario is calling this method with empty string for the namespaceURI.
This happens inside calls like:
        xwriter.writeIdAttribute("", "", "Id", xmlObj.getId());
        xwriter.writeAttribute("", "", "MimeType", xmlObj.getMimeType());

Of course, Santuario can accept "" in its XmlWriterToTree if it wants,
but that should not be what is sent to the DOM.

Our DOM implementation does not come from the JDK,
that's how we found this problem.

Should I create a Santuario Jira for this?

Reply | Threaded
Open this post in threaded view
|

Re: URI of no namespace

Colm O hEigeartaigh-2
Hi Clement,

Yes please create a JIRA (+ submit a patch if you can), this sounds like a bug in Santuario.

Colm.

On Mon, Dec 7, 2015 at 8:36 PM, Pellerin, Clement <[hidden email]> wrote:
The javadoc for org.w3c.dom.Document.createAttributeNS(
  String namespaceURI, String qualifiedName) says:
       Per [XML Namespaces] , applications must use the value null
       as the namespaceURI parameter for methods if they wish to have no namespace.

Santuario is calling this method with empty string for the namespaceURI.
This happens inside calls like:
        xwriter.writeIdAttribute("", "", "Id", xmlObj.getId());
        xwriter.writeAttribute("", "", "MimeType", xmlObj.getMimeType());

Of course, Santuario can accept "" in its XmlWriterToTree if it wants,
but that should not be what is sent to the DOM.

Our DOM implementation does not come from the JDK,
that's how we found this problem.

Should I create a Santuario Jira for this?




--
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com