Bug 12469 - Processing of atomic datatypes in XML schema not working
Summary: Processing of atomic datatypes in XML schema not working
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.XML ()
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2013-05-30 06:06 UTC by dev
Modified: 2013-08-07 05:57 UTC (History)
2 users (show)

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

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:

Description dev 2013-05-30 06:06:51 UTC
Description of the problem:

  Using a compiled XmlSchemaSet with a reference to an 
  atomic data type like unsignedInt, duration, gYear, hexBinary,
  anyURI, ..., leads to an exception when validating a XmlDocument:

  "XmlSchema error: Failed to convert attribute value to type http://www.w3.org/2001/XMLSchema:unsignedInt"

  The bug seem to appear in all versions after v2.6.7.

Namespaces involved:

  - System.Xml
  - System.Xml.Schema

Steps to reproduce the bug:


  in short:

  1. loading a schema like the following (trigger is usage of 'xs:anyURI'):

   <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' elementFormDefault='qualified'>
     <xs:element name='EL'>
         <xs:attribute name='attr' type='xs:anyURI' use='required' />

  in a XmlSchemaSet (XmlSchemaSet.Add(XmlSchema.Read(...)), XmlSchemaSet.Compile())

  2. loading a XML document like the following:

   <EL attr='http://www.server.net' />

  as XmlDocument (doc = new XmlDocument(); doc.Load(...)):

  3. validate the document with the loaded schema (doc.Schemas = schemaSet, doc.Validate(...))

Expected result:

  - successful validation

Actual result:


  - XmlValidationException: "XmlSchema error: Failed to convert ..."
Comment 1 Atsushi Eno 2013-08-07 05:57:28 UTC
Fixed in master [72d14cc].

There seems still issue on rejecting invalid inputs, but that's different issue.