17.16 Fields and Hyperlinks
Most text in a word processing document is static; that is, unless it is directly changed as the result of editing, its contents remain the same, no matter how the rest of the document might change. However, certain useful pieces of information can change value over the life of a document. Consider the case of a reference to a page number, as in “For more information on this topic, see page 56.” Clearly, hard coding the page number as 56 means that that number needs to be manually replaced as the document’s size or layout is changed. Even a simple change to any margin, line spacing, or font size can invalidate such references.
Fields provide a mechanism for placeholders, such as page reference numbers, that can be added to a document such that those placeholders are replaced by their corresponding values when the document is rendered for display or print. Other applications for fields include, but are not limited to, automatic numbering of tables and figures, document creation and current date and time, document author information, and the computation of totals for a table column.
A field is a set of codes that instructs a WordprocessingML consumer to insert text, graphics, page numbers, and other material into a document automatically. [Example: The DATE field causes the current date to be inserted.
end example] The text or graphics inserted into a document when a consumer carries out a field’s codes is referred to as the field result (or field value) for that field. The default value for a field result is an empty string. The act of carrying out a field’s codes is referred to as a field update. A field update shall be carried out such that the content contained within the field result correctly reflects the intended semantics of the field codes (as defined in the subclauses of 17.16.5). For a simple field defined via the fldSimple element (17.16.19), this means replacing its child elements with the appropriate WordprocessingML content; for a complex field represented by use of properly matched fldChar elements (17.16.18), this means replacing any content between the fldChar element with an fldCharType attribute value of separate and an fldCharType attribute value of end. As to when any field is updated is outside the scope of ISO/IEC 29500.
Subsections
- 17.16.1 Syntax
- 17.16.2 XML representation
- 17.16.3 Formulas and expressions
- 17.16.4 Field formatting
- 17.16.5 Field definitions
- 17.16.6 calcOnExit
- 17.16.7 checkBox
- 17.16.8 checked
- 17.16.9 ddList
- 17.16.10 default
- 17.16.11 default
- 17.16.12 default
- 17.16.13 delInstrText
- 17.16.14 enabled
- 17.16.15 entryMacro
- 17.16.16 exitMacro
- 17.16.17 ffData
- 17.16.18 fldChar
- 17.16.19 fldSimple
- 17.16.20 format
- 17.16.21 helpText
- 17.16.22 hyperlink
- 17.16.23 instrText
- 17.16.24 label
- 17.16.25 listEntry
- 17.16.26 maxLength
- 17.16.27 name
- 17.16.28 result
- 17.16.29 size
- 17.16.30 sizeAuto
- 17.16.31 statusText
- 17.16.32 tabIndex
- 17.16.33 textInput
- 17.16.34 type