Details
-
Type:
Bug
-
Status:
In Progress
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 4.0.5
-
Fix Version/s: None
-
Labels:None
-
Number of attachments :
Description
Code like the following gets a validation error at the first writeStartElement, even though the XML that comes out is correct.
The following create the same XML. In both cases, the root element ends up in the 'default' namespace.
Fails:
XMLStreamWriter writer = getXmlWriter(fos);
writer.writeStartDocument("utf-8", "1.0");
writer.writeStartElement("model");
writer.writeDefaultNamespace(METADATA_NAMESPACE);
// change for new word class mechanism
writer.writeAttribute("version", "2");
writer.writeStartElement( "build");
Succeeds:
XMLStreamWriter writer = getXmlWriter(fos);
writer.writeStartDocument("utf-8", "1.0");
writer.writeStartElement("", "model", METADATA_NAMESPACE);
writer.writeDefaultNamespace(METADATA_NAMESPACE);
// change for new word class mechanism
writer.writeAttribute("version", "2");
writer.writeStartElement("", "build", METADATA_NAMESPACE);