فهرست منبع

2005-10-17 Lluis Sanchez Gual <[email protected]>

	* XmlSchemaSerializer.cs: Arrays of XmlNode don't
	need to be all XmlElments. Fix by Atsushi for bug #76288.


svn path=/trunk/mcs/; revision=51794
Lluis Sanchez 20 سال پیش
والد
کامیت
0c33ce01b2

+ 5 - 0
mcs/class/System.XML/System.Xml.Schema/ChangeLog

@@ -1,3 +1,8 @@
+2005-10-17  Lluis Sanchez Gual  <[email protected]>
+
+	* XmlSchemaSerializer.cs: Arrays of XmlNode don't
+	need to be all XmlElments. Fix by Atsushi for bug #76288.
+
 2005-09-30  Atsushi Enomoto <[email protected]>
 
 	* XmlSchemaUtil.cs: (GetParserContext) if reader is not internal 

+ 8 - 6
mcs/class/System.XML/System.Xml.Schema/XmlSchemaSerializer.cs

@@ -1149,9 +1149,10 @@ namespace System.Xml.Schema
 
 			if (ob.@Markup != null) {
 				foreach (XmlNode o51 in ob.@Markup) {
-					XmlElement o52 = o51 as XmlElement;
-					if (o52 == null) throw CreateUnknownTypeException (o52);
-					WriteElementLiteral (o52, "", "", false, true);
+					XmlNode o52 = o51;
+					if (o52 is XmlElement) {
+						WriteElementLiteral (o52, "", "", false, true);
+					} else o52.WriteTo (Writer);
 				}
 			}
 			if (writeWrappingElem) WriteEndElement (ob);
@@ -1186,9 +1187,10 @@ namespace System.Xml.Schema
 
 			if (ob.@Markup != null) {
 				foreach (XmlNode o53 in ob.@Markup) {
-					XmlElement o54 = o53 as XmlElement;
-					if (o54 == null) throw CreateUnknownTypeException (o54);
-					WriteElementLiteral (o54, "", "", false, true);
+					XmlNode o54 = o53;
+					if (o54 is XmlElement) {
+						WriteElementLiteral (o54, "", "", false, true);
+					} else o54.WriteTo (Writer);
 				}
 			}
 			if (writeWrappingElem) WriteEndElement (ob);