Editar

Compartilhar via


XmlSchema.BlockDefault Property

Definition

Gets or sets the blockDefault attribute which sets the default value of the block attribute on element and complex types in the targetNamespace of the schema.

public:
 property System::Xml::Schema::XmlSchemaDerivationMethod BlockDefault { System::Xml::Schema::XmlSchemaDerivationMethod get(); void set(System::Xml::Schema::XmlSchemaDerivationMethod value); };
public System.Xml.Schema.XmlSchemaDerivationMethod BlockDefault { get; set; }
member this.BlockDefault : System.Xml.Schema.XmlSchemaDerivationMethod with get, set
Public Property BlockDefault As XmlSchemaDerivationMethod

Property Value

An XmlSchemaDerivationMethod value representing the different methods for preventing derivation. The default value is XmlSchemaDerivationMethod.None.

Remarks

The block attribute prevents a complexType or element that has the specified type of derivation from being used in place of the inherited complexType or element. This attribute's value can either be a white space separated list of restriction, extension and substitution or the value can contain #all or a list that is a subset of extension, restriction, or substitution.

The following table lists the possible values of XmlSchemaDerivationMethod.

Value Description
None By default, there are no restrictions on type derivations in the schema.
Empty Overrides the default derivation method and allows any type derivations in the schema.
Extension By default, elements in this schema cannot be derived by Extension. Applies only to element and complex type elements.
Restriction By default, elements in this schema cannot be derived by Restriction.
Union By default, elements in this schema cannot be derived by Union. Applies only to simple types.
List By default, elements in this schema cannot be derived by List. Applies only to simple types.
All #all. By default, elements in this schema cannot be derived by any method.

Applies to