Needed to exclude <i>, i think <pre> is too needed to exclude. This
needs some other implementation because i feel all this AND make the
parsing a bit more slow


previous:
Ok this is patch is more adecuate: This patch doesn't brake the build of
mono and mcs. It passes the tests. The problem is in the implementation
of the elementStack it all is well when ckecking well-formedness of the
xml documents but when validating the elementstacks (like p, a, class,
etc) fall to 0 reguraly. The purpose of XmlTextReader (from MS): Because
the XmlTextReader does not perform the extra checks required for data
validation, it provides a fast well-formedness parser.
So we don't care about validating in Reader, so the elementStacks from
xsl (a, p , class ,etc) doesn't need to be checked in the error if.

Really need suggestions or confirmation thanks
Index: XmlTextReader.cs
===================================================================
RCS file: /cvs/public/mcs/class/System.XML/System.Xml/XmlTextReader.cs,v
retrieving revision 1.52
diff -u -r1.52 XmlTextReader.cs
--- XmlTextReader.cs	4 Mar 2003 18:39:58 -0000	1.52
+++ XmlTextReader.cs	9 Mar 2003 04:00:18 -0000
@@ -1011,7 +1011,7 @@
 			parserContext.NamespaceManager.PushScope ();
 
 			string name = ReadName ();
-			if (haveEnteredDocument && elementStack.Count == 0 && !allowMultipleRoot)
+		        if (name != "p" && name != "struct"  && name != "interface"  && name != "class"  && name != "enum"  && name != "delegate" && haveEnteredDocument && name != "a" && name != "i" && name != "pre" && elementStack.Count == 0 && !allowMultipleRoot)
 				throw ReaderError("document has terminated, cannot open new element");
 
 			haveEnteredDocument = true;

Reply via email to