public override void WriteWhitespace (string text)
{
if (text == null)
throw ArgumentError ("text");
// huh? Shouldn't it accept an empty string???
if (text.Length == 0 ||
XmlChar.IndexOfNonWhitespace (text) >= 0)
throw ArgumentError ("WriteWhitespace method accepts only whitespaces.");
ShiftStateTopLevel ("Whitespace", true, false, true);
writer.Write (text);
}