Bug 3504 - XMLSchemaValidator produces invalid results.
Summary: XMLSchemaValidator produces invalid results.
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.XML ()
Version: 2.10.x
Hardware: PC All
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-02-16 15:21 UTC by Antonius Riha
Modified: 2012-03-09 09:54 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
files for reproducing the bug (2.64 KB, application/x-gzip)
2012-02-16 15:21 UTC, Antonius Riha
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Antonius Riha 2012-02-16 15:21:53 UTC
Created attachment 1369 [details]
files for reproducing the bug

Description of Problem:
I ran an XML validation sample from http://msdn.microsoft.com/en-us/library/ms172454.aspx twice: First with the .NET 4.0 runtime and then with mono 2.10.5 on Ubuntu and mono 2.10.6 on Windows 7. .NET and mono produced different results, of which the mono results are invalid, I think.

Involved namespaces:
System.Xml
System.Xml.Schema
System.Xml.Serialization

Steps to reproduce the problem:
1. Add contosoBooks.xml, contosoBooks.xsd and Main.cs of the attached archive to a new ConsoleApplication project.
2. Configure the .xml and .xsd files as "Always Copy" to output directory.
3. Run the application.


Actual Results:
The console output indicates that the sample xml file is not valid according to the provided schema.
The output is in the attachment: output_mono.txt

Expected Results:
The sample xml is valid, according to a manual check of xml and xsd files, as well as the .NET runtime output, which can be found in output_net.txt in the attachment.

How often does this happen? 
Every time.

Additional Information:
System info:
Win 7: .NET Framework 4.0; VS2010
Win 7: MONO 2.10.6; MonoDevelop 2.8.6.4
Ubuntu 11.10: MONO 2.10.5; MonoDevelop 2.6 and 2.8.6
Comment 1 Atsushi Eno 2012-03-09 09:54:09 UTC
Thanks for the report. Fixed in git master (as of 8062ba1). I couldn't add test that was pulled from MSDN (copyright issue).