-
Bug
-
Resolution: Fixed
-
Normal
-
s15
-
None
A schema with elementFormDefault="unqualified" (which is the default), the local elements have no namespace.
Right now, every element in the infoset gets converted to XML having a namespace prefix for the target namespace, but this is not correct. For many elements (all local element decls when "unqualified"), they should not have a prefix, as they are in no namespace.
The bug is that we are producing this:
<tns:matrix>
|
<tns:row><tns:col>5</tns:col></tns:row>
|
</tns:matrix>
|
when we should be producing this:
<tns:matrix>
|
<row><col>5</col></row>
|
</tns:matrix>
|
The fix to this is to carry not just the targetNamespace on the ElementRuntimeData, but the element's namespace, which is the namedQName.namespace.
Also carry the element's namespace prefix.
Then use these in the Infoset when creating XML, not the target namespace.