+2004-04-20 Lluis Sanchez Gual <lluis@ximian.com>
+
+ * TypeTranslator.cs: Mapped again anyUri, but now it is mapped to String.
+ * XmlSchemaImporter.cs: If a map was initially imported as a class, but it
+ turns out that it is an array, import it again as array. This fixes
+ bug #57133.
+
2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
* XmlSchemaExporter.cs: When checking if a map has been exported or not,
primitiveTypes.Add ("NOTATION", new TypeData (typeof (string), "NOTATION", true));
primitiveTypes.Add ("token", new TypeData (typeof (string), "token", true));
primitiveTypes.Add ("normalizedString", new TypeData (typeof (string), "normalizedString", true));
+ primitiveTypes.Add ("anyURI", new TypeData (typeof (string), "anyURI", true));
}
public static TypeData GetTypeData (Type type)
XmlTypeMapping ImportType (XmlQualifiedName name, XmlSchemaType stype, XmlQualifiedName root)\r
{\r
XmlTypeMapping map = GetRegisteredTypeMapping (name);\r
- if (map != null) return map;\r
+ if (map != null) {\r
+ XmlSchemaComplexType ct = stype as XmlSchemaComplexType;\r
+ if (map.TypeData.SchemaType != SchemaTypes.Class || ct == null || !CanBeArray (name, ct))\r
+ return map;\r
+ \r
+ // The map was initially imported as a class, but it turns out that it is an\r
+ // array. It has to be imported now as array.\r
+ }\r
\r
if (stype is XmlSchemaComplexType)\r
return ImportClassComplexType (name, (XmlSchemaComplexType) stype, root);\r