[Mono-bugs] [Bug 420862] New: DataTable WriteXml method generates a faulty type description for ushort column

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Aug 27 17:10:05 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=420862


           Summary: DataTable WriteXml method generates a faulty type
                    description for ushort column
           Product: Mono: Class Libraries
           Version: 1.9
          Platform: x86
        OS/Version: RHEL 5
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Data
        AssignedTo: bnc-blr-team-mono at forge.provo.novell.com
        ReportedBy: cegld at yahoo.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Community User


The WriteXml method of System.Data.DataTable generates a XML with a faulty type
description in the schema section for ushort column if XmlWriteMode.WriteSchema
parameter is specified: usignedShort instead of unsignedShort 

Test program:

//gmcs -t:exe -r:System,System.Data Program.cs

using System;
using System.Text;
using System.Data;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            DataTable table = new DataTable("TableWithUnsignedShortColumn");
            table.Columns.Add("shortColumn", typeof(ushort));

            table.Rows.Add(3);

            System.IO.TextWriter writer = new System.IO.StringWriter();
            table.WriteXml(writer, XmlWriteMode.WriteSchema);

            Console.WriteLine(writer.ToString());
        }
    }
}

Output sample with Microsoft CLR:

<xs:element name="shortColumn" type="xs:unsignedShort" minOccurs="0" />

Output sample with Mono

<xs:element name="shortColumn" type="xs:usignedShort" minOccurs="0" />


-- 
Configure bugmail: https://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