XmlSchema.BlockDefault 屬性

定義

取得或設定 blockDefault 屬性,該屬性設定結構描述之 block 中項目和複雜型別上 targetNamespace 屬性的預設值。

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

屬性值

XmlSchemaDerivationMethod 值,表示防止衍生的各種方法。 預設值是 XmlSchemaDerivationMethod.None

備註

屬性 block 可防止 complexType 具有指定衍生類型的 或 專案取代繼承 complexType 的 或 專案。 這個屬性的值可以是空白字元分隔的限制、延伸和替代清單,或者值可以包含 #all 或屬於延伸、限制或替代子集的清單。

下表列出 的可能值 XmlSchemaDerivationMethod

描述
None 根據預設,架構中類型衍生沒有任何限制。
Empty 覆寫預設衍生方法,並允許架構中的任何類型衍生。
Extension 根據預設,此架構中的元素不能由 Extension 衍生。 僅適用于專案和複雜類型專案。
Restriction 根據預設,此架構中的元素不能由 Restriction 衍生。
Union 根據預設,這個架構中的元素不能由 Union 衍生。 僅適用于簡單型別。
List 根據預設,此架構中的元素不能由 List 衍生。 僅適用于簡單型別。
All #all. 依照預設,這個結構描述中的項目不能由任何方法衍生。

適用於