System.Xml.Schema.XmlSchemaType Class

Assembly: System.Xml.dll
Namespace: System.Xml.Schema
Summary
The base class for all simple types and complex types.
C# Syntax:
public class XmlSchemaType : XmlSchemaAnnotated
Example
See XmlSchemaSimpleType and XmlSchemaComplexType for an example using this class.
See also:
System.Xml.Schema Namespace

System.Xml.Schema.XmlSchemaType Member List:

Public Constructors
ctor #1 Default constructor. This constructor is called by derived class constructors to initialize state in this type.
Public Properties
Annotation
(inherited from System.Xml.Schema.XmlSchemaAnnotated)
Read-write

See base class member description: System.Xml.Schema.XmlSchemaAnnotated.Annotation


Gets or sets the annotation property.
BaseSchemaType Read-only

Gets the object of the simpleType element or complexType element. This is a post-schema-validation-infoset variable.
Datatype Read-only

Gets the data type that holds the post-compilation value.
DerivedBy Read-only

When overridden in a derived class, this property gets information that indicates how this element has been derived from a base type. This property holds the post-compilation value.
Final Read-write

Gets or sets the final property to indicate that no further derivations are allowed.
FinalResolved Read-only

Gets the post-compilation value of the Final property that holds the post-compilation value of the Final property.
Id
(inherited from System.Xml.Schema.XmlSchemaAnnotated)
Read-write

See base class member description: System.Xml.Schema.XmlSchemaAnnotated.Id


Gets or sets the string id.
IsMixed Read-write

Indicates that this type has a mixed content model. This property is only valid in a complex type.
LineNumber
(inherited from System.Xml.Schema.XmlSchemaObject)
Read-write

See base class member description: System.Xml.Schema.XmlSchemaObject.LineNumber


Gets or sets the line number in the file to which the schema element refers.
LinePosition
(inherited from System.Xml.Schema.XmlSchemaObject)
Read-write

See base class member description: System.Xml.Schema.XmlSchemaObject.LinePosition


Gets or sets the line position in the file to which the schema element refers.
Name Read-write

Gets or sets the name of the type.
Namespaces
(inherited from System.Xml.Schema.XmlSchemaObject)
Read-write

See base class member description: System.Xml.Schema.XmlSchemaObject.Namespaces


QualifiedName Read-only

Gets the qualified name for the type built from the Name attribute of this type. This holds the post-compilation value.
SourceUri
(inherited from System.Xml.Schema.XmlSchemaObject)
Read-write

See base class member description: System.Xml.Schema.XmlSchemaObject.SourceUri


Gets or sets the source location for the file that loaded the schema.
UnhandledAttributes
(inherited from System.Xml.Schema.XmlSchemaAnnotated)
Read-write

See base class member description: System.Xml.Schema.XmlSchemaAnnotated.UnhandledAttributes


Gets or sets the qualified attributes that do not belong to the schema target namespace.
Public Methods
Equals
(inherited from System.Object)
See base class member description: System.Object.Equals

Derived from System.Object, the primary base class for all objects.
GetHashCode
(inherited from System.Object)
See base class member description: System.Object.GetHashCode

Derived from System.Object, the primary base class for all objects.
GetType
(inherited from System.Object)
See base class member description: System.Object.GetType

Derived from System.Object, the primary base class for all objects.
ToString
(inherited from System.Object)
See base class member description: System.Object.ToString

Derived from System.Object, the primary base class for all objects.
Protected Methods
Finalize
(inherited from System.Object)
See base class member description: System.Object.Finalize

Derived from System.Object, the primary base class for all objects.
MemberwiseClone
(inherited from System.Object)
See base class member description: System.Object.MemberwiseClone

Derived from System.Object, the primary base class for all objects.

Hierarchy:


System.Xml.Schema.XmlSchemaType Member Details

ctor #1
Summary:
Default constructor. This constructor is called by derived class constructors to initialize state in this type.
C# Syntax:
public XmlSchemaType();

Return to top


Property: Annotation (read-write)
Inherited
See base class member description: System.Xml.Schema.XmlSchemaAnnotated.Annotation

Summary
Gets or sets the annotation property.
C# Syntax:
public XmlSchemaAnnotation Annotation {get; set;}

Return to top


Property: BaseSchemaType (read-only)
Summary
Gets the object of the simpleType element or complexType element. This is a post-schema-validation-infoset variable.
C# Syntax:
public object BaseSchemaType {get;}
Remarks
The base value must be a QName.

Return to top


Property: Datatype (read-only)
Summary
Gets the data type that holds the post-compilation value.
C# Syntax:
public XmlSchemaDatatype Datatype {get;}

Return to top


Property: DerivedBy (read-only)
Summary
When overridden in a derived class, this property gets information that indicates how this element has been derived from a base type. This property holds the post-compilation value.
C# Syntax:
public XmlSchemaDerivationMethod DerivedBy {get;}
Remarks
The value can contain a list that is a subset of Extension, Restriction, Substitution, List, or Union. The following table shows the values that this property can contain.

Enum Description
None No derivation method specified.
Substitution Derived by Substitution.
Extension Derived by Extension.
Restriction Derived by Restriction.
List Derived by List.
Union Derived by Union.

Return to top


Property: Final (read-write)
Summary
Gets or sets the final property to indicate that no further derivations are allowed.
C# Syntax:
public XmlSchemaDerivationMethod Final {get; set;}
Remarks
The following table shows the values that this property can contain for simple type.

Enum Description
Empty Overrides the schema blockDefault setting allowing any derivations, by restriction, extension, or substitution to take place.
None No derivation method is specified. This is the default. Derivation rules are taken from the schema blockDefault setting.
Substitution Cannot be replaced by a type derived by Substitution.
Extension Cannot be replaced by a type derived by Extension.
Restriction Cannot be replaced by a type derived by Restriction.
All #all . Cannot be replaced by a type derived by any derivation method.

The following table shows the values that this property can contain for complex type.



Enum Description
Empty Overrides the schema blockDefault setting allowing any derivations, by restriction, extension, or substitution to take place.
None No derivation method is specified. This is the default. Derivation rules are taken from the schema blockDefault setting.
Substitution Cannot be replaced by a type derived by Substitution.
Extension Cannot be replaced by a type derived by Extension.
Restriction Cannot be replaced by a type derived by Restriction.
All #all . Cannot be replaced by a type derived by any derivation method.

Return to top


Property: FinalResolved (read-only)
Summary
Gets the post-compilation value of the Final property that holds the post-compilation value of the Final property.
C# Syntax:
public XmlSchemaDerivationMethod FinalResolved {get;}
Remarks
This value indicates how the type is restricted when the type is extended through restriction. If the type is marked as final, this type cannot be extended.

Return to top


Property: Id (read-write)
Inherited
See base class member description: System.Xml.Schema.XmlSchemaAnnotated.Id

Summary
Gets or sets the string id.
C# Syntax:
public string Id {get; set;}
Remarks
The id value must be of type ID and be unique within the document containing this element.

Optional.

Return to top


Property: IsMixed (read-write)
Summary
Indicates that this type has a mixed content model. This property is only valid in a complex type.
C# Syntax:
public virtual bool IsMixed {get; set;}
Remarks
Thedefault is false. This virtual method is overridden in derived classes.

Return to top


Property: LineNumber (read-write)
Inherited
See base class member description: System.Xml.Schema.XmlSchemaObject.LineNumber

Summary
Gets or sets the line number in the file to which the schema element refers.
C# Syntax:
public int LineNumber {get; set;}
Remarks
LineNumber is used to store the line number when a schema is read from a file. This is reported through XmlSchemaException for error handling.

Return to top


Property: LinePosition (read-write)
Inherited
See base class member description: System.Xml.Schema.XmlSchemaObject.LinePosition

Summary
Gets or sets the line position in the file to which the schema element refers.
C# Syntax:
public int LinePosition {get; set;}
Remarks
This is used to store the line position when a schema is read from a file. This is reported through XmlSchemaException for error handling.

Return to top


Property: Name (read-write)
Summary
Gets or sets the name of the type.
C# Syntax:
public string Name {get; set;}
Remarks
The name must be an NCName (no-colon name) as defined in the World Wide Web Consortium (W3C) XML Namespaces specification. Optional. If specified, the name must be unique among all simpleType and complexType elements.

Return to top


Property: Namespaces (read-write)
Inherited
See base class member description: System.Xml.Schema.XmlSchemaObject.Namespaces

C# Syntax:
public XmlSerializerNamespaces Namespaces {get; set;}

Return to top


Property: QualifiedName (read-only)
Summary
Gets the qualified name for the type built from the Name attribute of this type. This holds the post-compilation value.
C# Syntax:
public XmlQualifiedName QualifiedName {get;}

Return to top


Property: SourceUri (read-write)
Inherited
See base class member description: System.Xml.Schema.XmlSchemaObject.SourceUri

Summary
Gets or sets the source location for the file that loaded the schema.
C# Syntax:
public string SourceUri {get; set;}
Remarks
Provides information for exception handling.

Return to top


Property: UnhandledAttributes (read-write)
Inherited
See base class member description: System.Xml.Schema.XmlSchemaAnnotated.UnhandledAttributes

Summary
Gets or sets the qualified attributes that do not belong to the schema target namespace.
C# Syntax:
public XmlAttribute[] UnhandledAttributes {get; set;}

Return to top


Method: Equals(
   object obj
)
Inherited
See base class member description: System.Object.Equals
C# Syntax:
public virtual bool Equals(
   object obj
);

For more information on members inherited from System.Object click on the link above.

Return to top


Method: Finalize()
Inherited
See base class member description: System.Object.Finalize
C# Syntax:
~XmlSchemaType();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetHashCode()
Inherited
See base class member description: System.Object.GetHashCode
C# Syntax:
public virtual int GetHashCode();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetType()
Inherited
See base class member description: System.Object.GetType
C# Syntax:
public Type GetType();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: MemberwiseClone()
Inherited
See base class member description: System.Object.MemberwiseClone
C# Syntax:
protected object MemberwiseClone();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: ToString()
Inherited
See base class member description: System.Object.ToString
C# Syntax:
public virtual string ToString();

For more information on members inherited from System.Object click on the link above.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.