Author: kostat
Date: 2007-09-25 10:34:52 -0400 (Tue, 25 Sep 2007)
New Revision: 86327
Modified:
branches/mainsoft/gh20/mcs/class/System.Data/System.Data/DataSet.cs
branches/mainsoft/gh20/mcs/class/System.Data/System.Data20.csproj
branches/mainsoft/gh20/mcs/class/System.Data/Test/System.Data/DataSetTest.cs
Log:
merge -r 86325:86326
Modified: branches/mainsoft/gh20/mcs/class/System.Data/System.Data/DataSet.cs
===================================================================
--- branches/mainsoft/gh20/mcs/class/System.Data/System.Data/DataSet.cs
2007-09-25 14:31:17 UTC (rev 86326)
+++ branches/mainsoft/gh20/mcs/class/System.Data/System.Data/DataSet.cs
2007-09-25 14:34:52 UTC (rev 86327)
@@ -1767,9 +1767,9 @@
internal static void WriteAttributeString (XmlWriter writer,
XmlWriteMode mode, string nspc, string prefix, string name, string stringValue)
{
switch ( mode) {
- case XmlWriteMode.WriteSchema:
- writer.WriteAttributeString (prefix,
name, nspc);
- break;
+ // case XmlWriteMode.WriteSchema:
+ // writer.WriteAttributeString (prefix,
name, nspc);
+ // break;
case XmlWriteMode.DiffGram:
writer.WriteAttributeString (prefix,
name, nspc,stringValue);
break;
Modified: branches/mainsoft/gh20/mcs/class/System.Data/System.Data20.csproj
===================================================================
--- branches/mainsoft/gh20/mcs/class/System.Data/System.Data20.csproj
2007-09-25 14:31:17 UTC (rev 86326)
+++ branches/mainsoft/gh20/mcs/class/System.Data/System.Data20.csproj
2007-09-25 14:34:52 UTC (rev 86327)
@@ -9,11 +9,12 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>System.Data</RootNamespace>
<AssemblyName>System.Data</AssemblyName>
- <JDKName>1.5.0_05</JDKName>
+ <JDKName>1.4.2</JDKName>
<GHProjectType>1</GHProjectType>
<GHProjectKind>framework</GHProjectKind>
<Version>2.0</Version>
<ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <jarserver>ipa</jarserver>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' ==
'Release_Java20|AnyCPU' ">
<OutputPath>bin\Release_Java20\</OutputPath>
@@ -32,7 +33,7 @@
<ApplicationServerType>
</ApplicationServerType>
<Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
+ <JDKName>1.4.2</JDKName>
<TargetPlatform>0</TargetPlatform>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' ==
'Debug_Java|AnyCPU' ">
@@ -83,7 +84,7 @@
<ApplicationServerType>
</ApplicationServerType>
<Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
+ <JDKName>1.4.2</JDKName>
<TargetPlatform>0</TargetPlatform>
</PropertyGroup>
<ItemGroup>
@@ -202,6 +203,7 @@
<SubType>Component</SubType>
</Compile>
<Compile Include="System.Data.OleDb.jvm\OleDbConnection.cs">
+ <SubType>Component</SubType>
</Compile>
<Compile Include="System.Data.OleDb.jvm\OleDbConvert.cs" />
<Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter.cs">
@@ -498,4 +500,4 @@
<PropertyGroup>
<PreBuildEvent>$(ProjectDir)\jay.bat $(ProjectDir)</PreBuildEvent>
</PropertyGroup>
-</Project>
+</Project>
\ No newline at end of file
Modified:
branches/mainsoft/gh20/mcs/class/System.Data/Test/System.Data/DataSetTest.cs
===================================================================
---
branches/mainsoft/gh20/mcs/class/System.Data/Test/System.Data/DataSetTest.cs
2007-09-25 14:31:17 UTC (rev 86326)
+++
branches/mainsoft/gh20/mcs/class/System.Data/Test/System.Data/DataSetTest.cs
2007-09-25 14:34:52 UTC (rev 86327)
@@ -2019,6 +2019,41 @@
}
[Test]
+ public void WriteXmlModeSchema1 () {
+ string SerializedDataTable =
+@"<rdData>
+ <MyDataTable CustomerID='VINET' CompanyName='Vins et alcools Chevalier'
ContactName='Paul Henriot' />
+</rdData>";
+ string expected =
+@"<rdData>
+ <xs:schema id=""rdData"" xmlns=""""
xmlns:xs=""http://www.w3.org/2001/XMLSchema""
xmlns:msdata=""urn:schemas-microsoft-com:xml-msdata"">
+ <xs:element name=""rdData"" msdata:IsDataSet=""true""
msdata:UseCurrentLocale=""true"">
+ <xs:complexType>
+ <xs:choice minOccurs=""0"" maxOccurs=""unbounded"">
+ <xs:element name=""MyDataTable"">
+ <xs:complexType>
+ <xs:attribute name=""CustomerID"" type=""xs:string"" />
+ <xs:attribute name=""CompanyName"" type=""xs:string"" />
+ <xs:attribute name=""ContactName"" type=""xs:string"" />
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ </xs:schema>
+ <MyDataTable CustomerID=""VINET"" CompanyName=""Vins et alcools Chevalier""
ContactName=""Paul Henriot"" />
+</rdData>";
+ DataSet set;
+ set = new DataSet ();
+ set.ReadXml (new StringReader (SerializedDataTable));
+
+ StringWriter w = new StringWriter ();
+ set.WriteXml (w, XmlWriteMode.WriteSchema);
+ string result = w.ToString ();
+ Assert.AreEqual (result.Replace ("\r", ""),
expected.Replace ("\r", ""));
+ }
+
+ [Test]
public void DeserializeModifiedDataSet ()
{
// Serialization begins
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches