2004-12-16 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Thu, 16 Dec 2004 14:01:42 +0000 (14:01 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Thu, 16 Dec 2004 14:01:42 +0000 (14:01 -0000)
* XsdValidatingReader.cs : added ActualSchemaType to context type.
* XmlSchemaValidatingReader.cs : added SchemaInfo override.

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

mcs/class/System.XML/Mono.Xml.Schema/ChangeLog
mcs/class/System.XML/Mono.Xml.Schema/XmlSchemaValidatingReader.cs
mcs/class/System.XML/Mono.Xml.Schema/XsdValidatingReader.cs

index bca32836653ee0a962862785512e0675f1320d85..c265b8f4e82e6389e2d0e07d1fedf7484b120e4e 100644 (file)
@@ -1,3 +1,8 @@
+2004-12-16  Atsushi Enomoto <atsushi@ximian.com>
+
+       * XsdValidatingReader.cs : added ActualSchemaType to context type.
+       * XmlSchemaValidatingReader.cs : added SchemaInfo override.
+
 2004-12-16  Atsushi Enomoto <atsushi@ximian.com>
 
        * XsdParticleValidationState.cs :
index de5d1d2f36eed5913360bf9d825a9bd173400b0c..51b9b08319c70a1115c3b3aeae645d2e625b7229 100755 (executable)
@@ -449,6 +449,10 @@ namespace Mono.Xml.Schema
                        get { return reader.ReadState; }
                }
 
+               public override IXmlSchemaInfo SchemaInfo {
+                       get { return xsinfo; }
+               }
+
                public override string Value {
                        get {
                                if (currentDefaultAttribute < 0)
index aa7c14435154d78d266e2a55b8e282473a13e155..4c5a4c66732d884254ba07df583dcc9ca49b566c 100644 (file)
@@ -1722,6 +1722,21 @@ namespace Mono.Xml.Schema
                        }
                }
 
+#if NET_2_0
+               public XmlSchemaType ActualSchemaType {
+                       get {
+                               object at = ActualType;
+                               if (at == null)
+                                       return null;
+                               XmlSchemaType st = at as XmlSchemaType;
+                               if (st == null)
+                                       st = XmlSchemaType.GetBuiltInSimpleType (
+                                       ((XmlSchemaDatatype) at).TypeCode);
+                               return st;
+                       }
+               }
+#endif
+
                public bool IsInvalid {
                        get { return State == XsdValidationState.Invalid; }
                }