Documentation Center

Configuring dialogs for adding attribute values

The map editor changes the underlying XML therefore, it must be aware of all elements that can be added at all possible locations. A number of elements and attributes have been pre-configured for DITA users. All possible attributes have not been configured, only those that are most used.

The configuration of the map editor is done in two different files located on the server:
Configuration filePurpose
$\Author\ASP\ClientConfig\TemplateSpecification.xmlConfigure which elements can be inserted
$\Author\ASP\ClientConfig\MetadataConfig.xmlConfigure the dialog that will appear when inserting an element

Example

When you insert a <topicref> in a DITA map, the following dialog is generated:

The following illustrates how this is configured in the file TemplateSpecification.xml.

<template id="Dita.TopicRef.Template" name="topicref">
  <label resourceref="Dita.TopicRef.Form.Label">Topic Ref</label>
  <form ref="Dita.TopicRef.Form"/>
  <documentFragment>
    <topicref href="contentitem:HRefField" navtitle="contentitem:NavTitleField" format="contentitem:FormatField" linking="contentitem:LinkingField" ishcondition="contentitem:ConditionField" ishlinkxpath="@href"/>
  </documentFragment>
  <parentnodes/>
</template>

The following illustrates how this is configured in the file MetadataConfig.xml.

<ishfrm id="Dita.TopicRef.Form">
  <label resourceref="Dita.TopicRef.Form.Label">Topic Ref</label>
  <ishfrmgroup>
    <label resourceref="Dita.TopicRef.Group.Label">Topic Ref</label>
    <ishfrmfield name="HRefField" ishfieldref="XMLID" level="content" ishfielddatatype="typecardreference">
      <label resourceref="Dita.TopicRef.HRefField.Label">HRef</label>
      <description resourceref="Dita.TopicRef.HRefField.Description">Reference to the object you want to add. </description>
      <typereference assist="yes" dialogmode="link">
        <selectabletypes>
          <type>ISHModule</type>
          <type>ISHMasterDoc</type>
          <type>ISHLibrary</type>
          <type>ISHTemplate</type>
        </selectabletypes>
      </typereference>
      <mandatory/>
    </ishfrmfield>
    <ishfrmfield name="NavTitleField" ishfieldref="XMLNAVTITLE" level="content" ishfielddatatype="typestring">
      <label resourceref="Dita.TopicRef.NavTitleField.Label">Nav Title</label>
      <description resourceref="Dita.TopicRef.NavTitleField.Description">Short title used in the map.</description>
      <typetext/>
    </ishfrmfield>
    <ishfrmfield name="ConditionField" ishfieldref="XMLCONDITION" level="content" ishfielddatatype="typestring">
      <label resourceref="Dita.TopicRef.ConditionField.Label">Condition</label>
      <description resourceref="Dita.TopicRef.ConditionField.Description">Condition. </description>
      <typecondition assist="yes"/>
    </ishfrmfield>
    <ishfrmfield name="FormatField" ishfieldref="XMLFORMAT" level="content" ishfielddatatype="typestring">
      <label resourceref="Dita.TopicRef.FormatField.Label">Format</label>
      <description resourceref="Dita.TopicRef.FormatField.Description">Supply 'ditamap' in case the included object is a map.</description>
      <typepulldown>
        <valuelist>
          <enumlist>
            <item><value>dita</value><label>dita</label></item>
            <item><value>ditamap</value><label>ditamap</label></item>
            <item><value>html</value><label>html</label></item>
            <item><value>pdf</value><label>pdf</label></item>
            <item><value>xml</value><label>xml</label></item>
          </enumlist>
        </valuelist>
      </typepulldown>
    </ishfrmfield>
  </ishfrmgroup>
</ishfrm>

Explanation

ElementDescription
ishfrmDefinition of the dialog. Make certain to specify an id on the element. The id is used in the file TemplateSpecification.xml that defines which dialog to open when an element is inserted at a given location in the DITA map.
ishfrmfieldDefinition of an attribute for the element.
  • The level attribute must hold the value content: this indicates that its value isn't stored as metadata in the repository.
  • The name attribute must match with the placeholders in the TemplateSpecification.xml (without the prefix contentitem) .
  • The ishfieldref attribute is currently not used, but you are advised to provide a value for it: for example, the combination of XML with the name of the attribute.