2004-06-11 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Fri, 11 Jun 2004 05:24:37 +0000 (05:24 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Fri, 11 Jun 2004 05:24:37 +0000 (05:24 -0000)
* XsdValidatingReader.cs : Identity check didn't work fine when
  reference node appeared in front of the target key node.
  This fixes bug #59889.

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

mcs/class/System.XML/Mono.Xml.Schema/ChangeLog
mcs/class/System.XML/Mono.Xml.Schema/XsdValidatingReader.cs

index 132014c2e042007cff52ce1fb0e1f74ccddc596a..3cdde7ae914f204d1bfa28df743c79cf78af081e 100644 (file)
@@ -1,3 +1,9 @@
+2004-06-11  Atsushi Enomoto <atsushi@ximian.com>
+
+       * XsdValidatingReader.cs : Identity check didn't work fine when
+         reference node appeared in front of the target key node.
+         This fixes bug #59889.
+
 2004-06-06  Atsushi Enomoto <atsushi@ximian.com>
 
        * XsdValidatingReader.cs : Close XmlTextReader more strictly. Exception
index 55c8747c9f796d1a78e3042aa7e0a7cfc9f8be55..08028e7b2e47cc68d285669dcd84b85e7dbb13d2 100644 (file)
@@ -1130,20 +1130,18 @@ namespace Mono.Xml.Schema
                                        HandleError ("Duplicate ID value was found.");
                                else
                                        idList.Add (normalized, normalized);
-                               break;
-                       case XmlTokenizedType.IDREF:
                                if (missingIDReferences.Contains (normalized))
                                        missingIDReferences.Remove (normalized);
-                               else
+                               break;
+                       case XmlTokenizedType.IDREF:
+                               if (!idList.Contains (normalized))
                                        missingIDReferences.Add (normalized);
                                break;
                        case XmlTokenizedType.IDREFS:
                                string [] idrefs = (string []) parsedValue;
                                for (int i = 0; i < idrefs.Length; i++) {
                                        string id = idrefs [i];
-                                       if (missingIDReferences.Contains (id))
-                                               missingIDReferences.Remove (id);
-                                       else
+                                       if (!idList.Contains (id))
                                                missingIDReferences.Add (id);
                                }
                                break;