2005-06-21 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / class / System.XML / System.Xml.Schema / XmlSchema.cs
index 224c44289c0cc2c499ef0ed11cd36d289188ef7a..636695f56f74a55389b2166c262c6a7bc12ad40a 100755 (executable)
@@ -906,7 +906,13 @@ namespace System.Xml.Schema
                        }
 
                        XmlSchemaSerializer xser = new XmlSchemaSerializer ();
-                       xser.Serialize (writer, this, nss);
+                       XmlSerializerNamespaces backup = Namespaces;
+                       try {
+                               Namespaces = null;
+                               xser.Serialize (writer, this, nss);
+                       } finally {
+                               Namespaces = backup;
+                       }
                        writer.Flush();
                }
                #endregion