About Arbortext Styler > Arbortext Styler Dialog Boxes > Insert Element Content Dialog Box (Headers and Footers)
  
Insert Element Content Dialog Box (Headers and Footers)
This dialog box displays when you select Insert > Element Content in the Generated Text Editor for Header and Footer objects. It allows you to specify that the content of the specified element should be used as generated text in the header or footer object.
Please note that when you insert element content, all attributes of copied elements are also copied, including any ID attribute with an assigned value. You may need to make further changes to your document if the copied or copy element is to be used as the target of a cross reference, to avoid the ambiguity introduced by the presence of multiple elements with the same ID attribute value.
The Insert Element Content dialog box contains the following options:
Element selection - Defines the element in the document whose content should be inserted. Once you have defined the element, select the type of content to be extracted from the options contained in the Insert field.
The dialog box contains the following selection options:
By name and occurrence - A specific occurrence of an element within the current document.
Name - The element for which Arbortext Styler should search. You can select an element from the list or type in the element’s name.
* 
If you enter the name of a namespaced element in this field, you will not be prompted to declare the namespace if it does not already exist. Ensure you have declared the namespace for the stylesheet by creating an element with the applicable prefix, or the element selection you enter in this field will not be valid
First started on page - The first occurrence of the named element that occurs on the page or, if there are no occurrences of the element on the page, the most recent occurrence of the element on a previous page.
Last started on page - The last occurrence of the named element that occurs on the page, or, if there are no occurrences of the element on the page, the most recent occurrence of the element on a previous page.
Specific occurrence within document - A specific occurrence of the named element within the whole document.
By XPath - The element matched by an XPath expression
Expression - the XPath expression that will match the required element. Note that the expression must result in a node-set of element nodes.
The XPath expression must start navigation from the root of the document. There is no way for it to start somewhere relative to the content on the current page, or relative to content in the header. Generally this means the expression should start with a slash, i.e. /.
* 
If you enter the name of a namespaced element in this field, you will not be prompted to declare the namespace if it does not already exist. Ensure you have declared the namespace for the stylesheet by creating an element with the applicable prefix, or the XPath expression you enter in this field will not be valid
Insert - Determines the way in which the selected element's content is extracted and inserted in the generated text. The options are:
Only content: all the content of the element, including markup, but not the element itself.
Element and content: inserts both the element and its content.
The inserted content and/or element (and any child elements they include) will be formatted via normal Arbortext Styler rules. It may be desirable to create a special context for the element if you want it to be formatted differently when it appears in this header/footer. For example, if the element <x> inserts element <y> and its content, you might want to create a context for y anwhere in _sfe:HeaderorFooter to control how element <y>'s contents will format when used in the header/footer.
Select the menu option View > Generated Text > Show in Arbortext Editor to have your generated text displayed when you preview the document in Editor view.
* 
Insertion of element content into the AttributeModifier construct in generated text is not supported. You will see this error message:
[A61092] Element "_gte:ElementContentPage" cannot be within "_gte:AttributeModifier".