https://bugzilla.novell.com/show_bug.cgi?id=339934#c322353

           Summary: [2.0] XmlSchemaValidatingReader does not validate
                    enumerations
           Product: Mono: Class Libraries
           Version: 1.2
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.XML
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [EMAIL PROTECTED]
          Found By: ---


A similar issue was reported (and fixed) in bug #322353.

To reproduce, compile and run the following code snippet (with the XSD from the
bug mentioned above):

using System;
using System.IO;
using System.Xml;
using System.Xml.Schema;

class MainTestCase
{
  static int Main ()
  {
    XmlSchema schema = XmlSchema.Read (new XmlTextReader ("schema.xsd"), null);

    XmlReaderSettings settings = new XmlReaderSettings ();
    settings.ValidationType = ValidationType.Schema;
    settings.Schemas.Add (schema);

    XmlReader reader = XmlReader.Create (new StringReader (xml), settings);
    try {
      while (reader.Read ()) ;
      return 1;
    } catch (XmlSchemaValidationException) {
    } finally {
      reader.Close ();
    }

    return 0;
  }

  static string xml = @"<test mode=""NOT A ENUMERATION VALUE""></test>";
}


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to