2004-08-30 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Mon, 30 Aug 2004 01:33:00 +0000 (01:33 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Mon, 30 Aug 2004 01:33:00 +0000 (01:33 -0000)
* XmlSchemaDatatype.cs : Removed FromName(localName) that cannot
  handle xdt:* types.
* XmlSchemaType.cs : added internal GetBuiltInType() methods that
  mix GetBuiltInSimpleType() and GetBuiltInComplexType().

svn path=/trunk/mcs/; revision=33009

mcs/class/System.XML/System.Xml.Schema/ChangeLog
mcs/class/System.XML/System.Xml.Schema/XmlSchemaDatatype.cs
mcs/class/System.XML/System.Xml.Schema/XmlSchemaType.cs

index a9c609f6c0a2ec66307542a52f3370eedae6820e..d51cd578bff4954d4bbd0c08e328df242bca70de 100755 (executable)
@@ -1,3 +1,10 @@
+2004-08-30  Atsushi Enomoto <atsushi@ximian.com>
+
+       * XmlSchemaDatatype.cs : Removed FromName(localName) that cannot
+         handle xdt:* types.
+       * XmlSchemaType.cs : added internal GetBuiltInType() methods that
+         mix GetBuiltInSimpleType() and GetBuiltInComplexType().
+
 2004-08-25  Atsushi Enomoto <atsushi@ximian.com>
 
        * XmlSchemaSimpleType.cs : Fill list types such as xs:IDREFS.
index faf3607c9ac62e4ae032188d8117b51da6ab5e2b..7e0e7f6307ab2b2aca02be3ab3090bf716cec77c 100755 (executable)
@@ -146,11 +146,6 @@ namespace System.Xml.Schema
                        return FromName (qname.Name, qname.Namespace);\r
                }\r
 \r
-               internal static XmlSchemaDatatype FromName (string localName)\r
-               {\r
-                       return FromName (localName, XmlSchema.Namespace);\r
-               }\r
-\r
                internal static XmlSchemaDatatype FromName (string localName, string ns)\r
                {\r
                        switch (ns) {\r
index b2f2709a212818cd22904de3370eb189386d02cb..d696516d1e13553fd7bef0f50e47eda45de6e9c1 100755 (executable)
@@ -157,6 +157,21 @@ namespace System.Xml.Schema
 #endif\r
                #endregion\r
 \r
+               internal static XmlSchemaType GetBuiltInType (XmlQualifiedName qualifiedName)\r
+               {\r
+                       XmlSchemaType t = GetBuiltInSimpleType (qualifiedName);\r
+                       if (t == null)\r
+                               t = GetBuiltInComplexType (qualifiedName);\r
+                       return t;\r
+               }\r
+\r
+               internal static XmlSchemaType GetBuiltInType (XmlTypeCode typecode)\r
+               {\r
+                       if (typecode == XmlTypeCode.Item)\r
+                               return XmlSchemaComplexType.AnyType;\r
+                       return GetBuiltInSimpleType (typecode);\r
+               }\r
+\r
 #if NET_2_0\r
                public static XmlSchemaComplexType GetBuiltInComplexType (XmlQualifiedName qualifiedName)\r
 #else\r