[Mono-bugs] [Bug 77489][Maj] New - XmlSchemaSet Compile Problem
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Feb 7 05:12:15 EST 2006
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by kentcb at internode.on.net.
http://bugzilla.ximian.com/show_bug.cgi?id=77489
--- shadow/77489 2006-02-07 05:12:15.000000000 -0500
+++ shadow/77489.tmp.14451 2006-02-07 05:12:15.000000000 -0500
@@ -0,0 +1,106 @@
+Bug#: 77489
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: Sys.XML
+AssignedTo: atsushi at ximian.com
+ReportedBy: kentcb at internode.on.net
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: XmlSchemaSet Compile Problem
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+When adding multiple schemas to an XmlSchemaSet, those schemas can not see
+eachother's types. This goes against the MS implementation and against the
+documentation for the XmlSchemaSet class.
+
+Steps to reproduce the problem:
+Run this program:
+
+--------------------------------------------------------
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+using System.Xml;
+using System.Xml.Schema;
+
+namespace SchemaRepro
+{
+ class Program
+ {
+ private const string schema1 = @"<?xml version=""1.0""
+encoding=""utf-8"" ?>
+<xsd:schema id=""Base.Schema"" elementFormDefault=""qualified""
+xmlns:xsd=""http://www.w3.org/2001/XMLSchema"">
+ <xsd:complexType name=""itemBase"" abstract=""true"">
+ <xsd:attribute name=""id"" type=""xsd:string""
+use=""required""/>
+ <xsd:attribute name=""type"" type=""xsd:string""
+use=""required""/>
+ </xsd:complexType>
+</xsd:schema>
+";
+
+ private const string schema2 = @"<?xml version=""1.0""
+encoding=""utf-8"" ?>
+<xsd:schema id=""Sub.Schema"" elementFormDefault=""qualified""
+xmlns:xsd=""http://www.w3.org/2001/XMLSchema"">
+ <xsd:complexType name=""item"">
+ <xsd:complexContent>
+ <xsd:extension base=""itemBase"">
+ <xsd:attribute name=""itemName""
+type=""xsd:string"" use=""required""/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+</xsd:schema>
+";
+
+ static void Main(string[] args)
+ {
+ XmlSchemaSet schemas = new XmlSchemaSet();
+ schemas.Add(XmlSchema.Read(new
+StringReader(schema1), null));
+ schemas.Add(XmlSchema.Read(new
+StringReader(schema2), null));
+ schemas.ValidationEventHandler +=
+schemas_ValidationEventHandler;
+ schemas.Compile();
+ Console.WriteLine();
+ Console.WriteLine("Press any key");
+ Console.ReadKey();
+ }
+
+ static void schemas_ValidationEventHandler(object sender,
+ValidationEventArgs e)
+ {
+ Console.WriteLine("Message: {0}", e.Message);
+ Console.WriteLine("Severity: {0}", e.Severity);
+ Console.WriteLine("Stack Trace: {0}",
+e.Exception.StackTrace);
+ }
+ }
+}
+--------------------------------------------------------
+
+
+Actual Results:
+Type cannot be seen when running on mono. Works fine on MS implementation.
+
+Expected Results:
+The XmlSchemaSet should compile without error.
+
+How often does this happen?
+Every time.
+
+Additional Information:
More information about the mono-bugs
mailing list