Configuring New XML Document Options

A system administrator can configure system options for creating new XML documents.

Three administrator scripts are available to configure the repository to determine available fields and values in the New XML Document dialog. See Administrator Scripts. Additionally, the structured document selected as the template for the new document can affect what fields appear in the dialog.

Control How Document IDs are Specified

The setNewXmlDocumentIdMode script configures the mode for specifying document IDs in the New XML Document dialog.

Available options:
Option Description
absent The Document Id field is not displayed in the dialog.
optional The Document Id field is available in the dialog, but is not required to be set.
required The Document Id field is available in the dialog and is required.
semiautomatic The Document Id field is available, is required, and is initialized with a generated value.
automatic The Document Id field is displayed, initialized with a generated value, and cannot be modified.
Note: You must restart the Workbench if you change this setting.

If you specify the semiautomatic or automatic options, you must also run the setNewXmlDocumentGeneratedId script.

If you specify any option except absent, the Document Id field will appear in the dialog only if the structured document selected as the template for the new document contains an id attribute on the root element. This allows you to create new structured documents from templates that do not contain an id attribute.

Automatically Generate Document IDs

The setNewXmlDocumentGeneratedId script configures the system to automatically generate document IDs in the New XML Document dialog. Both automatic and semiautomatic modes are available.

Use this script in conjunction with the setNewXmlDocumentIdMode script.

Settings include the seed and the pattern.
  • The seed is a number to start Ids with, which will increment for each new Id.
  • The pattern allows you to add text to each new Id, and must contain {0}.
For example, if you enter:
seed = 4
pattern = id_{0,number,##########}

The first new Id will be id_4, the next will be id_5, and so on.

Display Document Title Field

The setNewXmlDocumentTitleMode script configures the system to display the Document Title field in the New XML Document dialog.

The Document Id field will appear in the New XML Document dialog only if the structured document selected as the template for the new document contains a non-empty title element as a first level child of the root element.

Tip: Your system administrator may want to update structured documents used as templates in the backstop prototype folder (or other folder where your templates are located ) to enable the display of the Document Id and Title fields in the New XML Document dialog. See About Structured Document Templates.