[Mono-bugs] [Bug 571650] New: Adding a schema to the default namespace throws an exception.
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Jan 18 11:14:23 EST 2010
http://bugzilla.novell.com/show_bug.cgi?id=571650
http://bugzilla.novell.com/show_bug.cgi?id=571650#c0
Summary: Adding a schema to the default namespace throws an
exception.
Classification: Mono
Product: Mono: Class Libraries
Version: 2.6.x
Platform: x86-64
OS/Version: Other
Status: NEW
Severity: Critical
Priority: P5 - None
Component: Sys.XML
AssignedTo: atsushi at ximian.com
ReportedBy: cipherzero at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: Development
Blocker: No
Description of Problem:
When adding a schema to a schema set, it shouldn't fail because the xsd has no
target namespace.
Steps to reproduce the problem:
1.var schemas = new Schema.XmlSchemaSet();
var xsd = schemas.Add("",(defaultSchema:string));
var settings = new
XmlReaderSettings{IgnoreWhitespace=true,IgnoreComments=true,ValidationType=ValidationType.Schema,Schemas=schemas,CloseInput=true};
using(reader = XmlReader.Create(File.OpenText(file),settings))
readFromReader(reader);
Actual Results:
Unhandled Exception: System.Xml.Schema.XmlSchemaException: XmlSchema error: The
targetNamespace attribute cannot have have empty string as its value. Related
schema item SourceUri: file:///tmp/project/proj.xsd, Line 2, Position 2.
Expected Results: This is allowed and works fine in .net
It should just add it to the default namespace and validate xml without an
xmlns
How often does this happen? always
Additional Information:
Stack Trace:
at System.Xml.Schema.ValidationHandler.RaiseValidationEvent
(System.Xml.Schema.ValidationEventHandler handle, System.Exception
innerException, System.String message, System.Xml.Schema.XmlSchemaObject xsobj,
System.Object sender, System.String sourceUri, XmlSeverityType severity)
[0x00000] in <filename unknown>:0
at System.Xml.Schema.XmlSchemaObject.error
(System.Xml.Schema.ValidationEventHandler handle, System.String message,
System.Exception innerException, System.Xml.Schema.XmlSchemaObject xsobj,
System.Object sender) [0x00000] in <filename unknown>:0
at System.Xml.Schema.XmlSchemaObject.error
(System.Xml.Schema.ValidationEventHandler handle, System.String message)
[0x00000] in <filename unknown>:0
at System.Xml.Schema.XmlSchema.DoCompile
(System.Xml.Schema.ValidationEventHandler handler, System.Collections.Hashtable
handledUris, System.Xml.Schema.XmlSchemaSet col, System.Xml.XmlResolver
resolver) [0x00000] in <filename unknown>:0
at System.Xml.Schema.XmlSchema.CompileSubset
(System.Xml.Schema.ValidationEventHandler handler,
System.Xml.Schema.XmlSchemaSet col, System.Xml.XmlResolver resolver,
System.Collections.Hashtable handledUris) [0x00000] in <filename unknown>:0
at System.Xml.Schema.XmlSchemaSet.Compile () [0x00000] in <filename
unknown>:0
at System.Xml.Schema.XmlSchemaValidator.Initialize () [0x00000] in <filename
unknown>:0
at Mono.Xml.Schema.XmlSchemaValidatingReader..ctor (System.Xml.XmlReader
reader, System.Xml.XmlReaderSettings settings) [0x00000] in <filename
unknown>:0
at System.Xml.XmlReader.CreateValidatingXmlReader (System.Xml.XmlReader
reader, System.Xml.XmlReaderSettings settings) [0x00000] in <filename
unknown>:0
at System.Xml.XmlReader.CreateFilteredXmlReader (System.Xml.XmlReader reader,
System.Xml.XmlReaderSettings settings) [0x00000] in <filename unknown>:0
at System.Xml.XmlReader.CreateCustomizedTextReader (System.Xml.XmlTextReader
reader, System.Xml.XmlReaderSettings settings) [0x00000] in <filename
unknown>:0
at System.Xml.XmlReader.Create (System.IO.TextReader reader,
System.Xml.XmlReaderSettings settings, System.Xml.XmlParserContext context)
[0x00000] in <filename unknown>:0
at System.Xml.XmlReader.Create (System.IO.TextReader reader,
System.Xml.XmlReaderSettings settings, System.String baseUri) [0x00000] in
<filename unknown>:0
at System.Xml.XmlReader.Create (System.IO.TextReader reader,
System.Xml.XmlReaderSettings settings) [0x00000] in <filename unknown>:0
--
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