Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

XmlSchema.BlockDefault Property

Gets or sets the BlockDefault attribute on element and complex type elements in the targetNamespace of the schema. The block attribute prevents a complex type (or element) that has the specified type of derivation from being used in place of the inherited complex type (or element). The type of derivation.

[Visual Basic]
Public Property BlockDefault As XmlSchemaDerivationMethod
[C#]
public XmlSchemaDerivationMethod BlockDefault {get; set;}
[C++]
public: __property XmlSchemaDerivationMethod get_BlockDefault();
public: __property void set_BlockDefault(XmlSchemaDerivationMethod);
[JScript]
public function get BlockDefault() : XmlSchemaDerivationMethod;
public function set BlockDefault(XmlSchemaDerivationMethod);

Property Value

Attribute for BlockDefault. The default value is XmlSchemaDerivationMethod.None.

Optional.

Remarks

This value can contain #all or a list that is a subset of extension, restriction, or substitution.

Enum Description
None By default, there are no restrictions on replacements of elements in this schema.
Empty By default, there are no restrictions on replacements of elements in this schema.
Substitution By default, elements in the schema cannot be replaced by a type derived by Substitution.
Extension By default, elements in the schema cannot be replaced by a type derived by Extension.
Restriction By default, elements in the schema cannot be replaced by a type derived by Restriction.
All #all. By default, elements in the schema cannot be replaced by any type regardless of derivation method.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

XmlSchema Class | XmlSchema Members | System.Xml.Schema Namespace

Show:
© 2015 Microsoft