[Table of Contents] [docx version]

WordprocessingML Reference Material - Table of Contents

instrText (Field Code)

This element specifies that this run contains field codes (§2.16.5) within a complex field in the document.

If this element is contained within a run which is not part of a complex field's field codes, then it and its contents should be treated as regular text. If this element is contained within a del element, then the document is invalid.

[Example: Consider a complex checkbox field within a WordprocessingML. This field would be represented as follows:

<w:fldchar w:type="begin" />
<w:r>
<w:instrText>FORMCHECKBOX</w:instrText>
</w:r>
<w:fldChar w:type="seperate" />

<w:fldChar w:type="end" />

The field code is contained in a instrText node which occurs within the field codes portion of the complex field (i.e. before the separator character). end example]

Parent Elements

r7.1.2.87); r2.3.2.23)

 

Attributes

Description

space (Content Contains Significant Whitespace)

 

Namespace: http://www.w3.org/XML/1998/namespace

Specifies how white space should be handled for the contents of this element using the W3C space preservation rules.

 

[Example: Consider the following run contained within a WordprocessingML document:

 

<w:r>
<w:t>significant whitespace </w:t>
</w:r>

 

Although there are three spaces on each side of the text content in the run, that whitespace has not been specifically marked as significant, therefore it is removed when this run is added to the document. end example]

 

The possible values for this attribute are defined by the type in the namespace.

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_Text">

   <simpleContent>

   <extension base="ST_String">

   <attribute ref="xml:space" use="optional"/>

   </extension>

   </simpleContent>

</complexType>