[Mono-bugs] [Bug 557452] New: XmlSchemaValidator fails on simple types based on decimal type

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Nov 20 17:39:13 EST 2009


http://bugzilla.novell.com/show_bug.cgi?id=557452

http://bugzilla.novell.com/show_bug.cgi?id=557452#c0


           Summary: XmlSchemaValidator fails on simple types based on
                    decimal type
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.XML
        AssignedTo: atsushi at ximian.com
        ReportedBy: ravitch at nrtc.northrop.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=328781)
 --> (http://bugzilla.novell.com/attachment.cgi?id=328781)
Test case demonstrating the problem

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.11)
Gecko/2009060311 Ubuntu/8.10 (intrepid) Firefox/3.0.11

An InvalidCastException is thrown when trying validate a simple XML document to
a schema with a simple type based on xs:decimal.


Reproducible: Always

Steps to Reproduce:
1. Compile attached test code (gmcs test.cs)
2. Execute test code (mono test.exe)
3. Watch the stack trace
Actual Results:  

Unhandled Exception: System.InvalidCastException: Conversion from schema type
f\
oo:PortNumber (type code Decimal, resolved type code Decimal) to String is not
\
supported.
  at System.Xml.Schema.XmlAtomicValue.get_Value () [0x00000] in <filename
unkno\
wn>:0
  at System.Xml.Schema.XmlSchemaValidator.AssessAttributeLocallyValid
(System.X\
ml.Schema.XmlSchemaAttribute attr, System.Xml.Schema.XmlSchemaInfo info,
System\
Xml.Schema.XmlValueGetter getter) [0x00000] in <filename unknown>:0
  at
System.Xml.Schema.XmlSchemaValidator.AssessAttributeElementLocallyValidTyp\
e (System.String localName, System.String ns, System.Xml.Schema.XmlValueGetter
\
getter, System.Xml.Schema.XmlSchemaInfo info) [0x00000] in <filename
unknown>:0\

  at System.Xml.Schema.XmlSchemaValidator.ValidateAttribute (System.String
loca\
lName, System.String ns, System.Xml.Schema.XmlValueGetter attributeValue,
Syste\
m.Xml.Schema.XmlSchemaInfo info) [0x00000] in <filename unknown>:0
  at Mono.Xml.Schema.XmlSchemaValidatingReader.Read () [0x00000] in <filename
u\
nknown>:0
  at System.Xml.XmlDocument.Validate (System.Xml.Schema.ValidationEventHandler
\
handler, System.Xml.XmlNode node, XmlSchemaValidationFlags flags) [0x00000] in
\
<filename unknown>:0
  at System.Xml.XmlDocument.Validate (System.Xml.Schema.ValidationEventHandler
\
handler) [0x00000] in <filename unknown>:0
  at Test.Main () [0x00000] in <filename unknown>:0


Expected Results:  
Exited without output or error.

-- 
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