if (prefix == "xml")
namespaceUri = XmlNamespace;
// infer namespace URI.
- else if ((object) namespaceUri == null) {
+ else if ((object) namespaceUri == null || (v2 && namespaceUri.Length == 0)) {
if (isNSDecl)
namespaceUri = XmlnsNamespace;
else
public override void WriteString (string text)
{
- if (text == null || text.Length == 0)
+ if (text == null || (text.Length == 0 && !v2))
return; // do nothing, including state transition.
ShiftStateContent ("Text", true);