[Mono-docs-list] Monodoc bug Redux
Hector E. Gomez Morales
hgomez_36@flashmail.com
08 Mar 2003 21:18:12 -0600
--=-Zw3Wv6ijl/jFNsWueABs
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
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
--=-Zw3Wv6ijl/jFNsWueABs
Content-Disposition: attachment; filename=XmlTextReader.diff
Content-Transfer-Encoding: quoted-printable
Content-Type: text/x-patch; name=XmlTextReader.diff; charset=UTF-8
Index: XmlTextReader.cs
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
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 03:06:02 -0000
@@ -1011,7 +1011,7 @@
parserContext.NamespaceManager.PushScope ();
=20
string name =3D ReadName ();
- if (haveEnteredDocument && elementStack.Count =3D=3D 0 && !allowMultipl=
eRoot)
+ if (name !=3D "p" && name !=3D "struct" && name !=3D "interface=
" && name !=3D "class" && name !=3D "enum" && name !=3D "delegate" && ha=
veEnteredDocument && name !=3D "a" && elementStack.Count =3D=3D 0 && !allow=
MultipleRoot)
throw ReaderError("document has terminated, cannot open new element");
=20
haveEnteredDocument =3D true;
--=-Zw3Wv6ijl/jFNsWueABs--