Browse Source

2005-03-08 Atsushi Enomoto <[email protected]>

	* XmlTextWriter.cs : namespace declaration check for those which starts
	  with 'x' 'm' 'l' should not be done here (it might be 'declared'
	  though reserved).
	* XmlNamespaceManager.cs : error message for "'xml' prefix for
	  different namespace" is incorrect.


svn path=/trunk/mcs/; revision=41546
Atsushi Eno 21 years ago
parent
commit
3cee4bfb34

+ 8 - 0
mcs/class/System.XML/System.Xml/ChangeLog

@@ -1,3 +1,11 @@
+2005-03-08  Atsushi Enomoto <[email protected]>
+
+	* XmlTextWriter.cs : namespace declaration check for those which starts
+	  with 'x' 'm' 'l' should not be done here (it might be 'declared'
+	  though reserved).
+	* XmlNamespaceManager.cs : error message for "'xml' prefix for
+	  different namespace" is incorrect.
+
 2005-03-07  Atsushi Enomoto <[email protected]>
 
 	* XmlDocument.cs : ugh, so I introduced extraneous reader.Read() in

+ 1 - 1
mcs/class/System.XML/System.Xml/XmlNamespaceManager.cs

@@ -172,7 +172,7 @@ namespace System.Xml
 		{
 			string message = null;
 			if (prefix == PrefixXml && uri != XmlnsXml)
-				message = String.Format ("Prefix \"xml\" is only allowed to the fixed uri \"{0}\"", uri);
+				message = String.Format ("Prefix \"xml\" can only be bound to the fixed namespace URI \"{0}\". \"{1}\" is invalid.", XmlnsXml, uri);
 			else if (message == null && prefix == "xmlns")
 				message = "Declaring prefix named \"xmlns\" is not allowed to any namespace.";
 			else if (message == null && uri == XmlnsXmlns)

+ 0 - 2
mcs/class/System.XML/System.Xml/XmlTextWriter.cs

@@ -745,8 +745,6 @@ openElements [openElementCount - 1]).IndentingOverriden;
 					localName = prefix;
 					prefix = String.Empty;
 				}
-				else if (localName.ToLower (CultureInfo.InvariantCulture).StartsWith ("xml"))
-					throw new ArgumentException ("Prefixes beginning with \"xml\" (regardless of whether the characters are uppercase, lowercase, or some combination thereof) are reserved for use by XML: " + prefix + ":" + localName);
 			}
 
 			// Note that null namespace with "xmlns" are allowed.