[Mono-bugs] [Bug 571650] Adding a schema to the default namespace throws an exception.
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Jan 25 21:22:12 EST 2010
http://bugzilla.novell.com/show_bug.cgi?id=571650
http://bugzilla.novell.com/show_bug.cgi?id=571650#c3
Atsushi Enomoto <aenomoto at novell.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #3 from Atsushi Enomoto <aenomoto at novell.com> 2010-01-26 02:22:09 UTC ---
Since there are still too many errors to fix, I rather rewrote the entire test
as:
-- 571650.cs --
using System;
using System.IO;
using System.Xml;
using System.Xml.Schema;
public class TEst
{
public static void Main ()
{
var schemas = new XmlSchemaSet();
var xsd = schemas.Add("", "571650.xsd");
var file = "571650.xml";
var settings = new
XmlReaderSettings{ValidationType=ValidationType.Schema,Schemas=schemas};
using(var reader = XmlReader.Create(File.OpenText(file),settings))
while (!reader.EOF)
reader.Read ();
}
}
-- 571650.xsd --
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="foo" />
</xs:schema>
-- 571650.xml --
<foo/>
For resolution, I fixed it in svn (r150187), while I believe this is rather a
NET bug which incorrectly treats "" as if it were null. We do allow null
TargetNamespace, which is to represent a schema without explicit
targetNamespace attribute, and XmlSchemaSet.Add(string, XmlReader) should
differentiate "" and null for the first parameter of this method.
--
Configure bugmail: http://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