[Mono-bugs] [Bug 60066][Nor] Changed - When 'ValidationType' set to 'Schema', 'System.Xml.XmlValidatingReader' behaves differently compare to MS version
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sat, 12 Jun 2004 07:34:19 -0400 (EDT)
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 atsushi@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=60066
--- shadow/60066 2004-06-11 19:57:26.000000000 -0400
+++ shadow/60066.tmp.26521 2004-06-12 07:34:19.000000000 -0400
@@ -1,15 +1,15 @@
Bug#: 60066
Product: Mono: Class Libraries
Version: unspecified
OS: All
OS Details:
-Status: NEW
+Status: NEEDINFO
Resolution:
-Severity:
-Priority: Minor
+Severity: Unknown
+Priority: Normal
Component: Sys.XML
AssignedTo: mono-bugs@ximian.com
ReportedBy: chengxie@telus.net
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
URL:
@@ -36,6 +36,57 @@
How often does this happen?
Always.
Additional Information:
Both v1.0.5000.0 and v2.0.3600.0 of system.xml.dll have this issue
+
+------- Additional Comments From atsushi@ximian.com 2004-06-12 07:34 -------
+It does not seem to true. The following example code raises an error
+under MS.NET 1.1.
+
+Would you please provide 1) your example code that does not raise an
+exception under MS.NET, and 2) concrete error stack trace thrown by Mono?
+
+using System;
+using System.Xml;
+
+public class Test
+{
+ public static void Main ()
+ {
+ XmlTextReader xtr = new XmlTextReader ("<root
+xsi:schemaLocation='urn:foo'
+xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns='foo' />",
+XmlNodeType.Document, null);
+ XmlValidatingReader xvr = new XmlValidatingReader (xtr);
+ xvr.ValidationType = ValidationType.Schema;
+ XmlDocument doc = new XmlDocument ();
+ doc.Load (xvr);
+ }
+}
+
+
+./validation.exe
+
+Unhandled Exception: System.Xml.Schema.XmlSchemaException: The
+'foo:root' element is not declared. An error occurred at , (1, 2).
+ at System.Xml.XmlValidatingReader.InternalValidationCallback(Object
+sender, ValidationEventArgs e)
+ at
+System.Xml.Schema.Validator.SendValidationEvent(XmlSchemaException e,
+XmlSeverityType severity)
+ at System.Xml.Schema.Validator.SendValidationEvent(String code,
+String arg)
+ at System.Xml.Schema.Validator.PushElementDecl(String ns, String
+prefix, Int32 depth)
+ at System.Xml.Schema.Validator.ProcessElement()
+ at System.Xml.Schema.Validator.Validate()
+ at System.Xml.Schema.Validator.Validate(ValidationTypevalType)
+ at System.Xml.XmlValidatingReader.ReadWithCollectTextToken()
+ at System.Xml.XmlValidatingReader.Read()
+ at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader,
+Boolean preserveWhitespace)
+ at System.Xml.XmlDocument.Load(XmlReader reader)
+ at Test.Main()
+
+