Configuration manual for PageSeeder

PSML XRef config

The xref-config.xml file can be used to configure cross references across a whole project to make it easy for users to create XRefs consistently for different purposes.

The file is located in the template/[project]/config folder and can be accessed most easily via the XRef config link at the top of the Dev > Document Config page in the Developer prespective.

The file has the following format:

  <xref-config name="[name of config]" title="[title for use interface]">
    <xref ... />
    <target .../>
    <autosuggest .../>
  <xref-config ...>

There can be any number of <xref-config> elements and the only required attribute or element is @name.

Configuration options

There are three aspects of the editor that can be configured: the cross-reference's attributes, the target document and the auto-suggest search options for the target (none of the options are required).

Cross-reference's attributes

These are defined using attributes on the <xref> element as follows:

AttributeDescriptionDefault value

The display of the link, possible values are document (use the document title), document+fragment (document title and section title), document+manual (document title and a manual title), manual, template.


The fragment referenced in the target document ("default" points to the entire document).

labelsComma-separated list of mandatory labels to add to the cross-reference.
optionallabelsComma-separated list of optional labels that users can add to the cross-reference.

The manual title to use as the display, only used if display is manual, document+manual or template. For template the title can contain any combination of text and the following tokens which will be replaced dynamically:

  • {document}: display title of the target document;
  • {filename}: filename of the target document;
  • {docid}: docid of the target document;
  • {fragment}: target fragment ID;
  • {prefix}: the @prefix of the first heading or para in the target fragment (<xref> only);
  • {parentnumber}: the number of the parent heading or para for the target fragment (<xref> only);
  • {heading}: the text of the first heading in the target fragment (<xref> only).

Type of the cross-reference, possible values are: none, alternate, transclude (<blockxref> only), embed (<blockxref> only) and math (<xref> only).

levelThe amount to increment heading levels in the target document by [0-5] - 0 means no level.0

Boolean flag specifying if the reference is two ways, possible values are true and false.


The reverse title of the cross-reference.


   title="My Link Title"
   reverselink="false" />

Target document

The target document is defined using attributes on the <target> element as follows:

AttributeDescriptionDefault value

The document type of the target document.


The options for creating a new target document. Allowed values:

  • none: don't allow creation of target document;
  • create: allow creation of target document;
  • edit: allow creation and open target document for editing after creation.

Whether the target is the same document. If true this overrides the auto-suggest configuration and sets new="none".



Auto-suggest configuration

The auto-suggest feature is the document search that is run when the user starts typing in the omnibox.

This is configured using attributes on the <autosuggest> element as follows:

AttributeDescriptionDefault value
groupa group to search in (e.g. "acme-specs" )[current group]
foldera folder to search in relative to the group folder or starting / means absolute (may also have * for any path segment) or starting . or .. means relative to current document.


questionfieldsa comma-separated list of index fields to searchpstitle,psfilename,
filtera comma-separted list of filters (field:value) for the results (e.g. pslabel:car,pssubtype:image). These are also applied to the XRef browse document page.
displayfieldsa comma-separated list of fields to display in the search results. The "pstitle" and "psid" are always displayed. To display the document path add the fields "psfolder", "psfilename" in that order.psfolder,psfilename

For folder the wildcard character "*" is allowed for any path segment. It will then be replaced with the equivalent folder in the current document's path. This allows to search for documents only within the current context. If the wildcard does not match the current path an alert message is displayed and an XRef with this configuration cannot be created or edited.

The folder attribute can also beginning with "." or ".." (as long as it does not contain "*"). This means the facet value will be constructed relative to the current document.

Here are a few examples when editing a document in the acme-specs group with a path of: /ps/acme/specs/documents/folder/myfile.xml:

folder attributeactual folder
images/*[xref cannot be created or edited]


If an inline label is used as a facet, only documents with an exact match (case sensitive) will be returned. This is because inline label fields are not analyzed in the index (see the Index for more information).


  displayfields="psdocid,pslabel" />

Sample config

  <xref-config name="footnote" title="Footnote">
    <xref display="template"
          type="none" />
    <target documenttype="footnotes" />
    <autosuggest folder="." />
  <xref-config name="definition" title="Definition">
    <xref display="template"
          type="none" />
    <target documenttype="definitions" new="none" />
    <autosuggest folder="." />
  <xref-config name="para" title="Paragraph">
    <xref display="template"
          type="none" />
  <xref-config name="internal-para" title="Internal paragraph">
    <xref display="template"
          type="none" />
    <target this="true" />
  <xref-config name="numbered-heading" title="Numbered heading">
    <xref display="template"
          title="{prefix} {heading}"
          type="none" />
  <xref-config name="asciimath" title="AsciiMath">
    <xref display="document"
    <target documenttype="asciimath" new="edit" />

Created on , last edited on