[Mono-bugs] [Bug 76480][Nor] New - DataSet.WriteXml doesn't allow
for special characters in column names
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Wed Oct 19 13:06:48 EDT 2005
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by eto at shaw.ca.
http://bugzilla.ximian.com/show_bug.cgi?id=76480
--- shadow/76480 2005-10-19 13:06:48.000000000 -0400
+++ shadow/76480.tmp.422 2005-10-19 13:06:48.000000000 -0400
@@ -0,0 +1,98 @@
+Bug#: 76480
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details: XP
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Sys.Data
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: eto at shaw.ca
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: DataSet.WriteXml doesn't allow for special characters in column names
+
+Description of Problem:
+Special characters in column/table names are rendered incorrectly for a
+DataSet schema using WriteXml, causing an exception when trying to read it
+back. The data looks like it translates the names correctly, however. The
+special characters that I found cause a problem are '#', '<' and '>'.
+There may be others.
+
+Steps to reproduce the problem:
+1. Compile the attached file (.cs)
+2. Run the resulting executable in mono
+
+Actual Results:
+The schema that is written does not translate the 'special' characters the
+same way it is done when writing the data. The program throws an exception
+when trying to read the schema.
+
+Expected Results:
+The schema xml should have the same translation done on the column names as
+is used when writing the data, so that there are no errors reading back the
+dataset.
+
+How often does this happen?
+Every time
+
+Additional Information:
+Here is the exception that is thrown:
+
+Unhandled Exception: System.Xml.Schema.XmlSchemaException: XmlSchema error:
+attribute name must be NCName Related schema item SourceUri: , Line 10,
+Position 18.
+
+in <0x00097> System.Xml.Schema.ValidationHandler:RaiseValidationEvent
+(System.Xml.Schema.ValidationEventHandler handle, System.Exception
+innerException, System.String message, System.Xml.Schema.XmlSchemaObject
+xsobj, System.Object sender, System.String sourceUri, XmlSeverityType severity)
+in <0x0001a> System.Xml.Schema.XmlSchemaObject:error
+(System.Xml.Schema.ValidationEventHandler handle, System.String message,
+System.Exception innerException, System.Xml.Schema.XmlSchemaObject xsobj,
+System.Object sender)
+in <0x00022> System.Xml.Schema.XmlSchemaObject:error
+(System.Xml.Schema.ValidationEventHandler handle, System.String message)
+in <0x00778> System.Xml.Schema.XmlSchemaElement:Compile
+(System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema
+schema)
+in <0x00198> System.Xml.Schema.XmlSchemaSequence:Compile
+(System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema
+schema)
+in <0x00658> System.Xml.Schema.XmlSchemaComplexType:Compile
+(System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema
+schema)
+in <0x008eb> System.Xml.Schema.XmlSchemaElement:Compile
+(System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema
+schema)
+in <0x001ba> System.Xml.Schema.XmlSchemaChoice:Compile
+(System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema
+schema)
+in <0x00658> System.Xml.Schema.XmlSchemaComplexType:Compile
+(System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema
+schema)
+in <0x003b2> System.Xml.Schema.XmlSchemaElement:Compile
+(System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema
+schema)
+in <0x01db9> System.Xml.Schema.XmlSchema:Compile
+(System.Xml.Schema.ValidationEventHandler handler, System.Collections.Stack
+schemaLocationStack, System.Xml.Schema.XmlSchema rootSchema,
+System.Xml.Schema.XmlSchemaSet col, System.Xml.XmlResolver resolver)
+in <0x0003a> System.Xml.Schema.XmlSchema:Compile
+(System.Xml.Schema.ValidationEventHandler handler, System.Xml.XmlResolver
+resolver)
+in <0x00027> System.Xml.Schema.XmlSchema:Compile
+(System.Xml.Schema.ValidationEventHandler handler)
+in <0x00138> System.Data.XmlSchemaDataImporter:.ctor (System.Data.DataSet
+dataset, System.Xml.XmlReader reader)
+in <0x0001c> System.Data.DataSet:ReadXmlSchema (System.Xml.XmlReader reader)
+in <0x00576> System.Data.DataSet:ReadXml (System.Xml.XmlReader reader,
+XmlReadMode mode)
+in <0x0000f> System.Data.DataSet:ReadXml (System.Xml.XmlReader r)
+in <0x00027> System.Data.DataSet:ReadXml (System.IO.TextReader reader)
+in <0x000dc> TestDataSetXml.Class1:TestXml ()
+in <0x00024> TestDataSetXml.Class1:Main (System.String[] args)
More information about the mono-bugs
mailing list