DocumentType Class
Document Classification.When the object is serialized out as xml, its qualified name is w:documentType.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlLeafElement
DocumentFormat.OpenXml.Wordprocessing.DocumentType
Namespace: DocumentFormat.OpenXml.Wordprocessing
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
声明
Public Class DocumentType _
Inherits OpenXmlLeafElement
用法
Dim instance As DocumentType
public class DocumentType : OpenXmlLeafElement
Remarks
[ISO/IEC 29500-1 第 1 个版本]
17.15.1.30 documentType (Document Classification)
This element specifies the classification of a given WordprocessingML document.
[Note: This element can be used by hosting applications to facilitate customized user interface and/or automatic formatting behaviors based on the 'type' of a given WordprocessingML document. end note]
If this element is omitted, then the document shall be classified as a general document.
[Example: Consider a set of WordprocessingML documents which should be classified as 'letters'. This classification would be specified using the following WordprocessingML in the document settings of these documents:
<w:documentType w:val="letter" />
The documentType element's val attribute is equal to letter, specifying that the hosting application must apply the behaviors it has specified for letters to the given WordprocessingML document. end example]
Parent Elements |
---|
settings (§17.15.1.78) |
Attributes |
Description |
---|---|
val (Document Classification Value) |
Specifies the classification of the document based on the types defined in the referenced simple type definition. [Example: Consider a WordprocessingML document which should be classified as an e-mail message. This classification would be specified using the following WordprocessingML in the document settings:
The val attribute is equal to eMail, specifying that the hosting application can apply e-mail behaviors (if any) to this document. end example] The possible values for this attribute are defined by the ST_DocType simple type (§17.18.19). |
[Note: The W3C XML Schema definition of this element's content model (CT_DocType) is located in §A.1. end note]
© ISO/IEC29500: 2008. 以上摘要已经由 Microsoft(和/或其代理公司)从英语翻译为简体中文,ISO 对此翻译不承担任何责任。
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.