Creating custom metadata for a document specification

You can customize your own metadata for a document specification. Custom metadata is useful when you reference properties with the _sessionInfo internal variable or when you manage groups of document specifications through the API. You can also perform actions on document specifications outside of IBM Engineering Lifecycle Optimization - Publishing based on the metadata that is stored within those document specifications.

About this task

Important: Custom metadata properties do not have a run time impact on document generation.

Procedure

  1. In the Document Specification view, right-click Metadata.
  2. Click Add property.
  3. Enter a name for the property.
  4. Enter a value for the property.
  5. Click OK.
    When Metadata is selected in the Document Specification view, the property that you added is displayed in the Properties view.

Example: Creating owner name metadata and referencing it in a template

To create the metadata:
  1. In the Document Specification view, right-click Metadata.
  2. Click Add property.
  3. For the name of the property, enter owner to store the name of the document specification owner as a custom metadata property.
  4. For the value of the property, enter: Joe Smith
  5. Click OK. The property is displayed in the Properties view:
    Owner property displayed in the Properties view.
To reference the owner in the template:
  1. Add two text elements to the content editor.
  2. Click the first text element and enter the text: Document specification owner:
  3. Double-click the second text element.
  4. On the Script Expression tab, expand Variables and select the _sessionInfo check box.
  5. In the Script Expression editor, enter the following information:
    _sessionInfo.getDocspecProperty("owner", "");
    The Script expression tab that displays the _sessionInfo script.
When the output is generated, the value that is stored in the document specification for the owner property is displayed in the output:
The output document for the example.