XML metadata content

The XML file contains data concerning the template run itself. This data is added automatically to the file. It includes the following items:

  • The template used
  • Time the document is generated
  • Keys and extras
  • KCM version used to run the template
  • The full name (including path) of the result document
  • The user who requested creation of the document, and the user account that actually ran KCM

These items are added to the element <ccm:meta> in the document.

Additionally, information on the Forms encountered in the template is listed in the element <itp:forms>. This element contains the answers that the user provided on all questions posed by the template in Forms. Forms that were not executed, or questions not answered, are not included.

When one of the Form questions is the TEXTBLOCK type, the answer to this question is represented as a Text Block reference ID. The actual XML of the Text Block is represented using a top-level element <ccm:user-textblock>, which specifies the same reference ID as used in the Form.

Additionally, information on the Content Wizards encountered in the template is listed in the element <ccm:wizard>. This element contains the mandatory Sections and Text Blocks defined in a Content Wizard. It also contains the Sections and Text Blocks that were selected in the Content Wizard selection dialog during execution of the Content Wizard. Content Wizards that were not executed are not included.

Apart from the information stored in the XML file by KCM itself, the template is also able to add custom information. The Field Set _Document is available for this purpose. Values added to this Field Set are listed in a special Document section in the metadata XML. The function add_user_xml that was used for the same purpose has been deprecated.

An example of a resulting XML file is provided below. Line breaks and layout are added for clarity and not necessarily part of an actual XML metadata file.

<?xml version="1.0" encoding="UTF-8"?>
<ccm:data xmlns:itp="http://www.aia-itp.com/4.2/formsData/">
  <ccm:meta>
    <ccm:date>2018-03-01T11:33:26</ccm:date>
    <ccm:result>result document</ccm:result>
    <ccm:model>template</ccm:model>
    <ccm:producer>user account running CCM Core (DP)</ccm:producer>
    <ccm:itp-version>5.2</ccm:itp-version>
    <ccm:user>user for who the template was executed</ccm:user>
    <ccm:job-id>job id</ccm:job-id>
    <ccm:keys>
      <ccm:key>first key</ccm:key>
      <ccm:key>second key</ccm:key>
    </ccm:keys>
    <ccm:extras>
      <ccm:extra>first extra</ccm:extra>
      <ccm:extra>second extra</ccm:extra>
    </ccm:extras>
    <ccm:Template>
      <ccm:label name="Wizard">A Content Wizard</ccm:label>
      <ccm:label name="Category">Letter</ccm:label>
    </ccm:Template>
    <ccm:Document>
      <ccm:label name="CustomerId">100042/ccm:label>
      <ccm:label name="OutputFormat">PDF/A</ccm:label>
    </ccm:Document>
  </ccm:meta>
  <ccm:forms>
    <ccm:form>
      <ccm:name>name</ccm:name>
      <ccm:group shown="Y">
        <ccm:name>group name</ccm:name>
      </ccm:group>
      <ccm:element>
        <ccm:key>title</ccm:key>
        <ccm:value>TRUE</ccm:value>
      </ccm:element>
      <ccm:element>
        <ccm:key>title</ccm:key>
        <ccm:value>314</ccm:value>
      </ccm:element>
      <ccm:element>
        <ccm:key>title</ccm:key>
        <ccm:value>some text</ccm:value>
      </ccm:element>
      <ccm:element>
        <ccm:key>Clause A001</ccm:key>
        <ccm:id>A001</ccm:id>
        <ccm:value>user:01c86735f934361b00000e70.1</ccm:value>
      </ccm:element>
      <ccm:recordset>
        <ccm:record>
          <ccm:element>
            <ccm:key>title</ccm:key>
            <ccm:value>some text</ccm:value>
          </ccm:element>
        </ccm:record>
      </ccm:recordset>
      <ccm:button>Ok</ccm:button>
    </ccm:form>
    <ccm:user-textblock id="user:01c86735f934361b00000e70.1">
      <ccm:content>&lt;textblock&gt;&lt;content&gt;&lt;tbk xsv="2.0.1"&gt;&lt;par font="header" indentation="0" hanging-indentation="false"&gt;&lt;txt bold="false" italic="false" underline="false" id=""&gt;&lt;![CDATA[Clause A001]]&gt;&lt;/txt&gt;&lt;/par&gt;&lt;par font="normal" indentation="0" hanging-indentation="false"&gt;&lt;txt bold="false" italic="false" underline="false" id=""&gt;&lt;![CDATA[Any damages that are the consequence of terrorism are explicitly excluded and will not be covered by this policy.]]&gt;&lt;/txt&gt;&lt;/par&gt;&lt;/tbk&gt;&lt;/content&gt;&lt;fieldset&gt;Customer&lt;/fieldset&gt;&lt;fieldset&gt;Policy&lt;/fieldset&gt;&lt;/textblock&gt;</ccm:content>
    </ccm:user-textblock>
  </ccm:forms>
  <ccm:wizards>
    <ccm:wizard>
      <ccm:name>Content Wizard name</ccm:name>
      <ccm:section>
        <ccm:name>Section name</ccm:name>
        <ccm:section>
          <ccm:name>Section name</ccm:name>
          <ccm:section>
            <ccm:name>Section name</ccm:name>
            <ccm:textblock>
              <ccm:name>Text Block name</ccm:name>
            </ccm:textblock>
          </ccm:section>
          <ccm:textblock>
            <ccm:name>Text Block name</ccm:name>
          </ccm:textblock>
        </ccm:section>
        <ccm:textblock>
          <ccm:name>Text Block name</ccm:name>
        </ccm:textblock>
      </ccm:section>
    </ccm:wizard>
  </ccm:wizards>
</ccm:data>

The schema of the XML generated is provided in the file history.xsd in the Manuals directory of the KCM Core installation.