Documentation Center

Data prep - Dynamic Import and the DIMAP file

To successfully use the editor tools you must import your XML documents into the Contenta database using the Dynamic Import (DI) tool.

The Dynamic Import tool populates the Contenta hierarchy with your document(s) and adds a DIMAP value to the Contenta application data (AppData).

The editing tools provide the user with the ability to create new Contenta objects within the editing session. The user can insert an element that is mapped to a Contenta object and at the end of the editing session, when the data is imported into Contenta, the object is created.

You establish the element-object mapping when you import the document using the Dynamic Import tool or when you use ImportDiMap.pl to import a new di.map. When you import the document, you must establish element-object mapping rules. During import, the DI tool saves the mapping information in the DIMAP value. Later, when you edit the data, the information in this value is used by the edit tool when you scan for new objects or when you store data back to the Contenta database if new element-mapped objects are added to the document.

See the SDL Contenta Dynamic Import User section of the Contenta documentation to create the map file and import your documents. See the Adding a DIMAP Value to AppData topic for information about adding the DIMAP value to AppData independent of the Dynamic Import process.

Dynamic Import stores information about the map file in AppData for each Document Type you import. Make certain that you define the Document Type field in the DI interface under the Global Settings tab:

The mapping-data is data extracted from the Dynamic Import map file, gleaned from the following four mapping fields:

  • ELEMENT
  • PCMOBJECT
  • OBJNAME
  • IN

To view the mapping-data, refer to the map file located in the Contenta home directory under:

encaps > di > mapfiles

When the editor tool is executed, it:

  • Reads the Document Type property sheet field for the object and finds a matching Key in AppData
  • Reads the DIMAP value in the matching key to obtain the mapping information
  • Uses the element-object mapping information when the editing session is complete and the data is imported back into the database

The element-object mapping provides the tool with the necessary information for splitting the data and creating the Contenta hierarchy and objects.

To check AppData settings:

In Contenta Explorer, click Tools > Options > Tool Preferences.

Under Global > Document Types is the Document Type specified in DI when you imported your file.

When you import a document, the DIMAP value for the Document Type specified during import is updated. This means that any information already stored for a Document Type is overwritten. When importing your documents you can specify whether to write or overwrite the AppData by setting the appdata switch (the appdata switch in lower-case) in the digui.cfg file as follows:

Set to:When:
YESImporting a document with a new Document Type or when you want to overwrite the map file information for a previously stored Document Type.
NOWhen importing a document with a Document Type for which the DIMAP value has previously been stored that you do not want to overwrite.

See Adding a DIMAP Value to AppData for information about ImportDIMap.pl.

When creating the mapping rules in DI under the mappings tab, only specify CompoundAscii-based objects in the PCM Object fields. CompoundAscii and CompoundAscii-based objects that are delivered in the Contenta metadata are:

  • CompoundAscii
  • CompoundDoc
  • DataModule