[Mono-bugs] [Bug 36704][Nor] New - Assorted System.Xml.XmlSchema fixes

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Tue, 14 Jan 2003 09:14:26 -0500 (EST)

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by roam@ringlet.net.


--- shadow/36704	Tue Jan 14 09:14:26 2003
+++ shadow/36704.tmp.3508	Tue Jan 14 09:14:26 2003
@@ -0,0 +1,55 @@
+Bug#: 36704
+Product: Mono/Class Libraries
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: System.XML
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: roam@ringlet.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: Assorted System.Xml.XmlSchema fixes
+Attached are a couple of patches to the Mono System.Xml.XmlSchema
+implementation, which somewhat improve its operation.
+- XmlSchemaObjectEnumerator.cs: change an XmlSchema cast to XmlSchemaObject
+  to avoid an InvalidCastException every time the XmlSchema.Items property
+  is traversed.
+- add actual handling of the XmlSchema.isCompiled member variable: reset it
+  in all routines that change the schema's textual description and set it
+  to true upon a successful run of the XmlSchema.Compile() method.
+- check for isCompiled at the start of the Compile() method; do not attempt
+  to compile the schema twice, adding the same objects to the Items hash.
+- XmlSchemaAppInfo.cs: add the ability to read more than one XmlNode;
+- XmlSchemaAnnotation.cs: note that XmlSchemaAppInfo.Read() and
+  XmlSchemaDocumentation.Read() return with the reader positioned at
+  the respective element's end, *not* at the next element or at
+  the annotation end.  Thus, expect and swallow an EndElement for
+  'appinfo' or 'documentation', instead of choking while expecting
+  an EndElement for 'annotation'.
+- XmlDocument.ReadNode: check if the reader is already positioned at
+  an Element, and if so, do not do a Read() that will skip the start
+  tag of the element.  I am not completely sure that this will not
+  break anything, but it is needed for the appinfo implementation
+  if the latter should really support more than one XmlNode in an
+  <appinfo> element: in that case, we find that there is another node
+  only when the reader is positioned at its start, so when we call
+  XmlDocument.AppendChild(), we must not do another Read().
+The patches will be attached to this bug report as soon as it is filed;
+in the meantime, they are available at