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.
The setNewXmlDocumentIdMode script configures the mode for specifying document IDs in the New XML Document dialog.
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. |
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.
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.
seed = 4
pattern = id_{0,number,##########}
The first new Id will be id_4, the next will be id_5, and so on.
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.