About Arbortext Styler > Arbortext Styler Dialog Boxes > Insert XPath String Dialog Box
  
Insert XPath String Dialog Box
This dialog box displays when you select Insert > XPath String from the Generated Text Editor for an element or for a generated content or cross reference object. It allows you use an XPath expression to extract element or attribute content to be inserted as generated text.
You may also embed the output of a JavaScript or ACL function as a string in an element’s generated text. Please refer to Accessing Scripts from Arbortext Styler for further information.
You must understand XPath and its syntax to use this option. Refer to the World Wide Web Consortium (W3C) web site (www.w3.org/TR/xpath) for information on the XPath standard.
* 
It is not necessary to substitute &lt; for <, &amp; for &, or &quote; for ".
The Insert XPath String dialog box contains the following option:
XPath Expression - Provides a free text field in which you can enter a valid XPath expression.
* 
You must enter element names as they appear in the Elements list, including any namespace prefixes.
Avoid using the XPath functions position() or last() since they are not valid in this context. Some alternatives are given below:
Instead of position(), use count(preceding-sibling::*)+1
To test whether an element is the last child of its parent, that is to test position() = last(), use count(following-sibling::*) = 0
To test whether an element is the first child of its parent, use count(preceding-sibling::*) = 0
The use of certain XPath expressions in generated text can cause increased processing times. Please refer to XPath Performance for information and suggested alternatives.