17.15.1.31 docVar
This element specifies the parameters of a single document variable. A document variable is a storage location for arbitrary customer data in name/value pairs that is persisted in a given WordprocessingML document. Specifically, this element specifies through its name and val attributes the name and value pair for a given document variable.
[Note: This mechanism is maintained for legacy compatibility only, and should be avoided in favor of the custom XML data support defined in ISO/IEC 29500. end note]
[Example: Consider the following WordprocessingML fragment specifying a document variable named example and containing the value example value:
<w:docVars>
<w:docVar w:name="example" w:val="example value" />
</w:docVars>
The docVar element defines a single document variable, named example using the name attribute, and assigned the value example value through the val attribute. end example]
Attributes
val (Document Variable Value)
Specifies the value of the parent document variable.
[Example: Consider the following WordprocessingML fragment specifying a document variable:
<w:docVars>
<w:docVar w:name="example name" w:val="Tristan Davis" />
</w:docVars>
The val attribute specifies that the value of the document variable is Tristan end example]
The possible values for this attribute are defined by the ST_String simple type (22.9.2.13).
name (Document Variable Name)
Specifies the name of the parent document variable.
[Example: Consider the following WordprocessingML fragment specifying a document variable:
<w:docVars>
<w:docVar w:name="example name" w:val="example value" />
</w:docVars>
The name attribute specifies that the name of the document variable is example name. end example]
The possible values for this attribute are defined by the ST_String simple type (22.9.2.13).
[Note: The W3C XML Schema definition of this element’s content model (CT_DocVar) is located in A.1. end note]