[Mono-bugs] [Bug 59880][Nor] Changed - Parsing file which refers to xml: namespace throws exception

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 9 Jun 2004 14:11:09 -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=59880

--- shadow/59880	2004-06-09 13:20:17.000000000 -0400
+++ shadow/59880.tmp.2637	2004-06-09 14:11:09.000000000 -0400
@@ -1,14 +1,14 @@
 Bug#: 59880
 Product: Mono: Class Libraries
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: Fedora Core 2 with all current updates
-Status: NEW   
+Status: NEEDINFO   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Normal
 Component: Sys.XML
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: 1@234.cx               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -59,6 +59,51 @@
 
 
 ------- Additional Comments From 1@234.cx  2004-06-09 13:20 -------
 Created an attachment (id=8093)
 Test XML input file
 
+
+------- Additional Comments From atsushi@ximian.com  2004-06-09 14:11 -------
+The example code is rejected by MS.NET:
+
+$ ./1234
+
+Unhandled Exception: System.Xml.XmlException: This is a reserved
+namespace. Line 3, position 7.
+   at System.Xml.XmlNSAttributeTokenInfo.FixNSNames()
+   at System.Xml.XmlTextReader.SetLiteralValues(XmlAttributeTokenInfofld)
+   at System.Xml.XmlTextReader.SetAttributeValues()
+   at System.Xml.XmlTextReader.ParseElement()
+   at System.Xml.XmlTextReader.Read()
+   at System.Xml.XmlValidatingReader.ReadWithCollectTextToken()
+   at System.Xml.XmlValidatingReader.Read()
+   at System.Xml.XmlLoader.LoadCurrentNode()
+   at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
+   at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader,
+Boolean preserveWhitespace)
+   at System.Xml.XmlDocument.Load(XmlReader reader)
+   at System.Xml.XmlDocument.Load(String filename)
+   at Test.Main()
+
+We also reject it. However, our error message is improper for
+reporting this error;
+
+Unhandled Exception: System.ArgumentException: Namespace URI
+"http://www.w3.org/
+XML/1998/namespace" can only be declared with the fixed prefix "xml"
+
+ since your sample xml declares the namespace with "xml". So I fixed
+the error message.
+
+Okay, then, I want to know the exact specification of namespaces in
+XML i.e. should we support such syntax as you wrote in the example?
+
+I quickly read the spec, but it is not obviously described. What I
+found is that the prefix that starts with 'x', 'm', 'l' is reserved,
+but no explicit prohibition of "overwriting the same URI declaration".
+
+I will close this bug in cpl days and leave it as is, unless we can
+get to some conclusion that we have to change this behavior due to the
+spec.
+
+Thanks.