[Mono-bugs] [Bug 433774] Xml schema validation throws a XmlSchemaValidationException exception because of a fixed value

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Oct 27 18:35:43 EDT 2008


User atsushi at ximian.com added comment

--- Comment #1 from Atsushi Enomoto <atsushi at ximian.com>  2008-10-27 16:35:42 MDT ---
much simplified version:

---- 433774.cs
using System;
using System.Xml;
using System.Xml.Schema;

public class Test
    public static void Main ()
         XmlDocument doc = new XmlDocument();
         doc.LoadXml("<Root version='3' xmlns='urn:foo'/>");
         XmlSchemaSet schemaSet = new XmlSchemaSet();
         schemaSet.Add(XmlSchema.Read(XmlReader.Create("433774.xsd"), null));
         doc.Schemas = schemaSet;
         XmlNode root = doc.DocumentElement;
         doc.Validate(null, root);

---- 433774.xsd
<xs:schema targetNamespace="urn:foo" xmlns="urn:foo"
  <xs:element name="Root">
      <xs:attribute name="version" type="xs:string" fixed="3" />

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list