XML API - pdx:addCrossReference

pdx:addCrossReference

Inserts a cross-reference into a Word document.

Note

You are reading the XML API documentation. For the PHP API method please go to addCrossReference.

Description

Element definition

This element allows to insert cross-references into a Word document.

Attributes and sub-elements
Key Description
text Text of the reference.

options

The options array includes the following keys and values:

Key Description
type The bookmark type. Possible values are 'bookmark' and 'heading'.
referenceName The name of the element to be referred.
referenceTo Content to display when the field is updated PAGEREF (default, page number), REF (bookmark text content), ABOVE_BELOW (above/below text).

Other styles from addText can also be used.

Code samples

Example #1

config.xml

content.xml

settings.xml

PHP code

The resulting Word document looks like: