[Mono-bugs] [Bug 80182][Nor] New - XmlDocument incorrectly performs Xml Name validation
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Dec 7 14:40:28 EST 2006
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 rbirkby at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=80182
--- shadow/80182 2006-12-07 14:40:28.000000000 -0500
+++ shadow/80182.tmp.29989 2006-12-07 14:40:28.000000000 -0500
@@ -0,0 +1,57 @@
+Bug#: 80182
+Product: Mono: Class Libraries
+Version: 1.2
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Sys.XML
+AssignedTo: atsushi at ximian.com
+ReportedBy: rbirkby at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: XmlDocument incorrectly performs Xml Name validation
+
+Description of Problem:
+The mono implementation of XmlDocument performs element name validation.
+The Microsoft implementation of XmlDocument does not. I would speculate
+that Microsoft rely on the XmlReader implementations to perform this
+validation.
+
+The problem with mono not conforming to this approach is that an XmlReader
+which returns invalid names (for example a gconf reader or windows registry
+reader) will work fine with Microsoft's implementation, but work
+incorrectly in Mono.
+
+An real-world example of a popular XmlReader which returns invalid names is
+SgmlReader.
+
+Steps to reproduce the problem:
+1. Return an invalid name from an XmlReader implementation
+2. Load that XmlReader into XmlDocument
+3. Run the resulting assembly in mono and Microsoft's .Net
+
+Actual Results:
+Unhandled Exception: System.Xml.XmlException: '!INVALIDNAME' is not a valid
+XML Name
+ at System.Xml.XmlConvert.VerifyName (System.String name) [0x00000]
+ at System.Xml.XmlElement..ctor (System.String prefix, System.String
+localName, System.String namespaceURI, System.Xml.XmlDocument doc, Boolean
+atomizedNames) [0x00000]
+ at System.Xml.XmlDocument.CreateElement (System.String prefix,
+System.String localName, System.String namespaceURI) [0x00000]
+ at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader)
+[0x00000]
+ at System.Xml.XmlDocument.ReadNode (System.Xml.XmlReader reader) [0x00000]
+ at System.Xml.XmlDocument.Load (System.Xml.XmlReader xmlReader) [0x00000]
+ at TestCase.Main () [0x00000]
+
+Expected Results:
+No errors
+
+How often does this happen?
+Always
More information about the mono-bugs
mailing list