This documentation is archived and is not being maintained.

XmlSchema.BlockDefault Property

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.

Namespace: System.Xml.Schema
Assembly: System.Xml (in system.xml.dll)

public XmlSchemaDerivationMethod BlockDefault { get; set; }
/** @property */
public XmlSchemaDerivationMethod get_BlockDefault ()

/** @property */
public void set_BlockDefault (XmlSchemaDerivationMethod value)

public function get BlockDefault () : XmlSchemaDerivationMethod

public function set BlockDefault (value : XmlSchemaDerivationMethod)

Not applicable.

Property Value

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

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.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0

XNA Framework

Supported in: 1.0
Show: