-
Bug
-
Resolution: Fixed
-
P2
-
beta
-
b78
-
generic
-
generic
The writeNamespace method is defined as follows:
/**
* Writes a namespace to the output stream
* If the prefix argument to this method is the empty string,
* "xmlns", or null this method will delegate to writeDefaultNamespace
*
* @param prefix the prefix to bind this namespace to
* @param namespaceURI the uri to bind the prefix to
* @throws IllegalStateException if the current state does not allow Namespace writing
* @throws XMLStreamException
*/
public void writeNamespace(String prefix, String namespaceURI)
throws XMLStreamException;
But the code isn't checking for prefix=="xmlns", and hence when it happens it produces malformed documents.
/**
* Writes a namespace to the output stream
* If the prefix argument to this method is the empty string,
* "xmlns", or null this method will delegate to writeDefaultNamespace
*
* @param prefix the prefix to bind this namespace to
* @param namespaceURI the uri to bind the prefix to
* @throws IllegalStateException if the current state does not allow Namespace writing
* @throws XMLStreamException
*/
public void writeNamespace(String prefix, String namespaceURI)
throws XMLStreamException;
But the code isn't checking for prefix=="xmlns", and hence when it happens it produces malformed documents.