Author: atsushi
Date: 2006-07-19 13:25:58 -0400 (Wed, 19 Jul 2006)
New Revision: 62755

Modified:
   trunk/mcs/class/System.XML/System.Xml/ChangeLog
   trunk/mcs/class/System.XML/System.Xml/DTDValidatingReader2.cs
   trunk/mcs/class/System.XML/System.Xml/XmlReader.cs
Log:
2006-07-19  Atsushi Enomoto <[EMAIL PROTECTED]>

        * XmlReader.cs : In Create(), support validation flags for DTD.
        * DTDValidatingReader2.cs : when NET_2_0 and ProcessIdentityConstraints
          is false, skip ID validation.



Modified: trunk/mcs/class/System.XML/System.Xml/ChangeLog
===================================================================
--- trunk/mcs/class/System.XML/System.Xml/ChangeLog     2006-07-19 17:07:34 UTC 
(rev 62754)
+++ trunk/mcs/class/System.XML/System.Xml/ChangeLog     2006-07-19 17:25:58 UTC 
(rev 62755)
@@ -1,3 +1,9 @@
+2006-07-19  Atsushi Enomoto <[EMAIL PROTECTED]>
+
+       * XmlReader.cs : In Create(), support validation flags for DTD.
+       * DTDValidatingReader2.cs : when NET_2_0 and ProcessIdentityConstraints
+         is false, skip ID validation.
+
 2006-06-26  Atsushi Enomoto <[EMAIL PROTECTED]>
 
        * XmlReader.cs : when Create() received string url, it should set 

Modified: trunk/mcs/class/System.XML/System.Xml/DTDValidatingReader2.cs
===================================================================
--- trunk/mcs/class/System.XML/System.Xml/DTDValidatingReader2.cs       
2006-07-19 17:07:34 UTC (rev 62754)
+++ trunk/mcs/class/System.XML/System.Xml/DTDValidatingReader2.cs       
2006-07-19 17:25:58 UTC (rev 62755)
@@ -396,7 +396,11 @@
                        isText = false;
 
                        bool b = ReadContent () || currentTextValue != null;
-                       if (!b && this.missingIDReferences.Count > 0) {
+                       if (!b &&
+#if NET_2_0
+                           (Settings == null || (Settings.ValidationFlags & 
XmlSchemaValidationFlags.ProcessIdentityConstraints) == 0) &&
+#endif
+                           this.missingIDReferences.Count > 0) {
                                this.HandleError ("Missing ID reference was 
found: " +
                                        String.Join (",", 
missingIDReferences.ToArray (typeof (string)) as string []),
                                        XmlSeverityType.Error);

Modified: trunk/mcs/class/System.XML/System.Xml/XmlReader.cs
===================================================================
--- trunk/mcs/class/System.XML/System.Xml/XmlReader.cs  2006-07-19 17:07:34 UTC 
(rev 62754)
+++ trunk/mcs/class/System.XML/System.Xml/XmlReader.cs  2006-07-19 17:25:58 UTC 
(rev 62755)
@@ -410,8 +410,6 @@
                                xvr.ValidationType = ValidationType.DTD;
                                break;
                        case ValidationType.Schema:
-//                             xvr = new XmlValidatingReader (reader);
-//                             xvr.ValidationType = ValidationType.Schema;
                                return new XmlSchemaValidatingReader (reader, 
settings);
                        }
                        if (xvr != null)
@@ -420,12 +418,12 @@
                        // Actually I don't think they are treated in DTD 
validation though...
                        if ((settings.ValidationFlags & 
XmlSchemaValidationFlags.ProcessIdentityConstraints) == 0)
                                throw new NotImplementedException ();
-                       if ((settings.ValidationFlags & 
XmlSchemaValidationFlags.ProcessInlineSchema) != 0)
-                               throw new NotImplementedException ();
-                       if ((settings.ValidationFlags & 
XmlSchemaValidationFlags.ProcessSchemaLocation) != 0)
-                               throw new NotImplementedException ();
-                       if ((settings.ValidationFlags & 
XmlSchemaValidationFlags.ReportValidationWarnings) == 0)
-                               throw new NotImplementedException ();
+                       //if ((settings.ValidationFlags & 
XmlSchemaValidationFlags.ProcessInlineSchema) != 0)
+                       //      throw new NotImplementedException ();
+                       //if ((settings.ValidationFlags & 
XmlSchemaValidationFlags.ProcessSchemaLocation) != 0)
+                       //      throw new NotImplementedException ();
+                       //if ((settings.ValidationFlags & 
XmlSchemaValidationFlags.ReportValidationWarnings) == 0)
+                       //      throw new NotImplementedException ();
 
                        return xvr != null ? xvr : reader;
                }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to