private void ValidateText ()
{
if (currentAutomata == null)
return;
DTDElementDeclaration elem = null;
if (elementStack.Count > 0)
elem = dtd.ElementDecls [elementStack.Peek () as string];
// Here element should have been already validated, so
// if no matching declaration is found, simply ignore.
if (elem != null && !elem.IsMixedContent && !elem.IsAny && !isWhitespace) {
HandleError (String.Format ("Current element {0} does not allow character data content.", elementStack.Peek () as string),
XmlSeverityType.Error);
currentAutomata = previousAutomata;
}
}