2003-11-28 Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
authorAtsushi Eno <atsushieno@gmail.com>
Fri, 28 Nov 2003 16:59:28 +0000 (16:59 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Fri, 28 Nov 2003 16:59:28 +0000 (16:59 -0000)
* XmlAttribute.cs : set_Prefix checks value when existing is "xmlns".

svn path=/trunk/mcs/; revision=20592

mcs/class/System.XML/System.Xml/ChangeLog
mcs/class/System.XML/System.Xml/XmlAttribute.cs

index e53b27dca53f03e13064655aaae2483e5a2469ab..c1311661a601de22b532e853e0d483709435d033 100644 (file)
@@ -1,3 +1,7 @@
+2003-11-28  Atsushi Enomoto  <ginga@kit.hi-ho.ne.jp>
+
+       * XmlAttribute.cs : set_Prefix checks value when existing is "xmlns".
+
 2003-11-28  Atsushi Enomoto  <ginga@kit.hi-ho.ne.jp>
 
        * XmlWriter.cs : patch by Gonzalo (I modified a bit). WriteNode()
index 696bbcd4f5050e3a7c2ab274506754c5673516c6..dd1906646d9b278cd2f1f8e51aab21b5e123807f 100644 (file)
@@ -161,6 +161,8 @@ namespace System.Xml
                                        throw new XmlException ("This node is readonly.");
                                if (!XmlChar.IsNCName (value))
                                        throw new ArgumentException ("Specified name is not a valid NCName: " + value);
+                               if (prefix == "xmlns" && value != "xmlns")
+                                       throw new ArgumentException ("Cannot bind to the reserved namespace.");
 
                                prefix = value;
                        }