Fill XmlSchemaInfo validity for attributes (some were missing). Part of bugfix #3504.
authorAtsushi Eno <atsushi@ximian.com>
Fri, 9 Mar 2012 12:51:19 +0000 (21:51 +0900)
committerAtsushi Eno <atsushi@ximian.com>
Fri, 9 Mar 2012 12:51:19 +0000 (21:51 +0900)
mcs/class/System.XML/System.Xml.Schema/XmlSchemaValidator.cs

index 727004d844a0ab3d00cf22b805b481ce22be3da1..aa7720c16b21cfd6361905c484b452e49c94f5d1 100644 (file)
@@ -2,9 +2,10 @@
 // XmlSchemaValidator.cs
 //
 // Author:
-//     Atsushi Enomoto  <atsushi@ximian.com>
+//     Atsushi Enomoto  <atsushi@xamarin.com>
 //
 // (C)2004 Novell Inc,
+// Copyright (C) 2012 Xamarin Inc.
 //
 
 //
@@ -361,6 +362,9 @@ namespace System.Xml.Schema
                        if (attributeValue == null)
                                throw new ArgumentNullException ("attributeValue");
 
+                       SetCurrentInfo (info);
+                       try {
+
                        bool wasInitial = initial;
                        if (initial)
                                initial = false;
@@ -394,6 +398,10 @@ namespace System.Xml.Schema
                                        HandleError ("Current simple type cannot accept attributes other than schema instance namespace.");
                        }
                        return null;
+                       
+                       } finally {
+                               current_info = null;
+                       }
                }
 
                // StartTagOpenDeriv