[Mono-bugs] [Bug 613684] New: Mono doesn't validate XML keyref in schemas
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Jun 11 15:18:24 EDT 2010
http://bugzilla.novell.com/show_bug.cgi?id=613684
http://bugzilla.novell.com/show_bug.cgi?id=613684#c0
Summary: Mono doesn't validate XML keyref in schemas
Classification: Mono
Product: Mono: Class Libraries
Version: 2.6.x
Platform: x86-64
OS/Version: openSUSE 11.2
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.XML
AssignedTo: atsushi at ximian.com
ReportedBy: ibboard at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.1
SUSE/6.0.428.0 (KHTML, like Gecko) Chrome/6.0.428.0 Safari/534.1
This was originally sent to the Mono mailing list [1], but Atsushi Eno said I
should report it as a bug. Since there are two slightly different problems then
I've reported them as two bugs.
Basically, I have a simple test project [2] that loads a schema then loads a
document against that schema. If a schema uses a <key> and <keyref> then Mono
doesn't appear to validate the restriction and behaves as if they didn't exist.
Currently, because of Bug 613682, this means that the process doesn't error but
the doc.SchemaInfo.Validity is NotKnown. If these tests are run in Windows on
MS .Net then the invalid keyref is found, the message "The key sequence '558'
in Keyref fails to refer to some key." is printed for the third test and
doc.SchemaInfo.Validity is Invalid
Some validation must be occurring, because unexpected elements are still
causing validation errors, but the incorrect keyref value doesn't cause a
validation error.
[1] http://lists.ximian.com/pipermail/mono-list/2010-June/045285.html
[2] http://ibboard.co.uk/temp/XmlTest.tar.gz
Reproducible: Always
Steps to Reproduce:
Steps to Reproduce:
1. Run test project and observe output
or, more generally
1. Create an XML schema with a keyref and a document that is valid against that
schema, except for an invalid value in the keyref's attribute
2. Load the schema into an XmlReaderSettings object with the correct namespace
3. Load the XML document into a variable called doc
4. Check doc.SchemaInfo.Validity
Actual Results:
No errors in schema validation. doc.SchemaInfo.Validity == NotKnown
Expected Results:
Error in schema validation because of invalid keyref (either thrown as an
exception or passed to a method, depending on whether a validation message was
added). doc.SchemaInfo.Validity == Invalid
--
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