Ejemplo n.º 1
0
        // Note that it could also apply to BaseTypeName (since if
        // it is xs:anyType and BaseType is empty, BaseTypeName
        // should be xs:anyType).
        public void TestAnyType()
        {
            XmlSchema schema = GetSchema("Test/XmlFiles/xsd/datatypesTest.xsd");

            schema.Compile(null);
            XmlSchemaElement     any   = schema.Elements [QName("e00", "urn:bar")] as XmlSchemaElement;
            XmlSchemaComplexType cType = any.ElementType as XmlSchemaComplexType;

            Assert.AreEqual(typeof(XmlSchemaComplexType), cType.GetType(), "#1");
            Assert.IsNotNull(cType, "#2");
            Assert.AreEqual(XmlQualifiedName.Empty, cType.QualifiedName, "#3");
            Assert.IsNull(cType.BaseSchemaType, "#4");               // In MS.NET 2.0 its null. In 1.1 it is not null.
            Assert.IsNotNull(cType.ContentTypeParticle, "#5");
        }