Processing Variables

Processing variables in the digui.cfg file are used by Dynamic Import to locate files or as debug parameters. The entries contain a variable name followed by '='.

The $DI-PROGRAMDIR variable in the distribution file is replaced with the Contenta home directory the first time the Dynamic Import tool is executed.

  • The dipaths.pl script is responsible for the replacement when DI is executed for the first time.
  • The Contenta home directory is the data stored in the registry under HKEY_LOCAL_MACHINE > SOFTWARE > XyEnterprise > Contenta > 3.0 for the variable XYV_PDM_ROOT.

Example:

Delivered digui.cfg file containing the $DI-PROGRAMDIR variable.


COMMENT: Generic Import Tool Specification File
WORKDIR: $DI-PROGRAMDIR
ATTRS: YES
CONTAINS: CHILDREN
APPDATA: YES
SLICEDATA: YES
PROPSHEET: YES
PCMLOADLOC: /Global/sysadmin/MAINCONFIG/MAINFOLDER
OMNICTRL: $DI-PROGRAMDIR/Tmp/omni.ctrl
OMNIOUT: $DI-PROGRAMDIR/Tmp/omni.out
IMPORTDTD: $DI-PROGRAMDIR/entities/imp.dtd
SGMLDECL: $DI-PROGRAMDIR/entities/Sgml.dec
SERVER: MyServerName
USER: MyUserName
OMNILIB: $DI-PROGRAMDIR/entities/omnilib
DATABASE: MyPcmDBase
SOCKET: 8888
DOCTYPE: Document
SECURITY: secure
XMLOPTS: DTD
parentobject: CompoundDoc
childobject: DataModule
debug = 0
fontfamily = Arial
minentrywidth = 10
maxentrywidth = 70
maxbodies = 100
*Optionmenu.background :: grey
*Optionmenu.foreground :: black
*highlightColor :: black
icondir = $DI-PROGRAMDIR/Gifs
sgmldir = $DI-PROGRAMDIR/SgmlFiles
mapdir = $DI-PROGRAMDIR/MapFiles
defmap = $DI-PROGRAMDIR/MapFiles/default.map
starter = $DI-PROGRAMDIR/MapFiles/starter.map
drivedir = $DI-PROGRAMDIR/DriveFiles
title = Dynamic Import
bodyname = Mapping
perl = /perl/bin/perl.exe
bodiesperpage = 25
maxext = 40
linkman = NO
appdata = YES
split = di.pl
split_args = -c %s -e %s -g -protent
spliterr = $DI-PROGRAMDIR/errs
generate = di.pl
generate_args = -c %s -e %s -g -m 4
import = PCMImport.pl
import_args = -file %s %s -idmlog IdmLog
viewsgml = write
viewxml = write

Note the following when editing digui.cfg:

  • File comments are indicated by '#' and are not read by the program.
  • White space and blank lines are ignored.
  • If an item is specified more than once, the last occurrence in the file is applied.
  • All entries are case sensitive.
  • '/' or '\' can be used in directory specifications.
  • Comments must be on a line by themselves.

The following describes the fields in the digui.cfg file.

FieldValue if not SpecifiedDescription
Default values
COMMENT:

Default value for the Comment field of a new map file.

WORKDIR:

Directory path of Dynamic Import. If missing from the map file, this entry in digui.cfg is the default.

To protect confidential files, edit the WORKDIR directory and specify a secure location for storage of temporary files during the import process.

ATTRS:YES

Default value for the Attributes field of a new map file

CONTAINS:

Default value for the Contains field of a new map file.

APPDATA:YES

Default value for the AppData field of a new map file.

SLICEDATA:YES

Default value for the SliceData field of a new map file.

PROPSHEET:YES

Default value for the Propsheet field of a new map file.

PCMLOADLOC:

Global/sysadmin/MAINCONFIG/MAINFOLDER

The default path when the file is open in the interface is replaced with the path of the selected object.

Default value for the PCM Path field of a new map file.

PCMLOADLOC:

$DI-PROGRAMDIR/

encaps/di/Tmp/

omni.ctrl

Location and name of omni.ctrl that is generated by the split activity.

$DI_PROGRAMDIR is the Contenta home directory as stored in the registry.

If missing from the map file, this entry in the digui.cfg is the default.

FieldValue if not SpecifiedDescription
OMNIOUT:$DI-PROGRAMDIR/encaps/di/Tmp/omni.outLocation of the omni.out file that is generated by the split activity. $DI_PROGRAMDIR is the Contenta home directory as stored in the registry. If missing from the map file, this entry in the digui.cfg is the default.
IMPORTDTD:$DI-PROGRAMDIR/encaps/di/entities/imp.dtd Location of the DTD used during the split process. $DI_PROGRAMDIR is the Contenta home directory as stored in the registry. If missing from the map file, this entry in the digui.cfg is the default.
SGMLDECL:$DI-PROGRAMDIR/encaps/di/entities/Sgml.decDefault SGML declaration file path. $DI_PROGRAMDIR is the Contenta home directory as stored in the registry.
SERVER:$DI-PROGRAMDIR/encaps/di/entities/Sgml.decDefault value for the Server field of a new map file.
USER:User that Logged in and executed the DI tool.Default value for the User field of a new map file.
OMNILIB:$DI-PROGRAMDIR/encaps/di/entities/omnilibLocation of the OmniMark catalog file, omnilib. $DI_PROGRAMDIR is the Contenta home directory as stored in the registry.
DATABASE:Database specified in the Login Options.Name of the Contenta database. The default is the database specified in the Login Options.
SOCKET:Socket specified in the Login Options.Default value for the Socket field of a newmap file. The default is the socket specified in the Login Options.
DOCTYPE:Value for the Doctype field of a new map file.
SECURITY:secureDefault value for the Security field of a new map file.
XMLOPTS:DTDDefault value for XML Options field of a new map file.
FieldValue if not SpecifiedDescription
parentobject:CompoundDocSpecifies the parent (top level) object to create.
childobject:DataModuleSpecifies the child objects to create.
The Resource Assignments
debug = 0If 0, debug is off. If 1, debug is on and intermediate files are retained.
fontfamily = ArialDisplay font for the labels, values, and menus.
minentrywidth = 10Minimum number of characters displayed entries.
maxentrywidth =70Maximum number of characters allowed in any entry.
maxbodies =100Total number of mapping rules a user is allowed to create.
*Optionmenu.background ::Background color of the pull-down menus.
*Optionmenu.foreground ::Foreground color (text) of the pull-down menus.
*highlightColor ::Color indicating the currently selected field.
The Resource Assignments
Optional Resource Assignments (can be added to the file to change the default)
*Mainframe.height ::6iInitial height of the main window.

i = inches

p = points

c = centimeters

m = millimeters

no unit = pixels

After Dynamic Import is started, the user may resize the window. Scroll bars enable users to navigate beyond the display size of the main window.
Mainframe.width =6.5iInitial width of the main window.

i = inches

p = points

c = centimeters

m = millimeters

no unit = pixels

After Dynamic Import is started, the user may resize the window. Scroll bars enable users to navigate beyond the display size of the main window.
The Processing Variables
icondir =Path to the Dynamic Import icons for toolbar and status display.
icondir =Default directory for browsing source XML/SGML files.
mapdir =Default directory for browsing map files.
defmap =Specifies the path and default map file to display when DI is executed.
starter =Specifies the path and default map file to display when you select: File > New
drivedir =Location of xml control files created by the split activity. Default directory for browsing XML control files.
title =Dynamic ImportMain window title.
bodyname =MappingLabel for first mapping rule field.
The Resource Assignments
perl =Full Perl command; path and executable filename.
bodiesperpage =25

Specifies the number of mapping rules to group for display in the DI interface. Default—display 25 mapping rules.

GUI support: When more mapping rules are present than specified in this variable, use the Next and Previous arrows to navigate through them.

maxext =40Specifies number of fields to display for file Extension/PCM Object mappings in the File Import interface.
linkman = NO

NO— do not run the Link Manager file lmup.pl (default)

YES—run the Link Manager file lmup.pl

DI loads links using the Link Manager file lmup.pl when

• imports are done on UNIX and

• Link Manager is used at the site.

If a tool on UNIX uses the adapters to check-in an object, lmup.pl runs automatically if it exists.

lmup.pl is delivered as lmup.pl.xy in the ../encaps directory and must be renamed when:

• you are using Link Manager and

• this (linkman) variable is YES

The Resource Assignments
appdata =YES

Default value specifying whether DIMAP value for document type is to be created and populated with the contents of the map file.

YES—for first import of each Document Type.

NO—if using Epic tools through Contenta Web application.

For Contenta Web, you can import the map file into AppData using the ImportDIMap.pl command—refer to your editor’s Tool User documentation for information about the ImportDIMap.pl.
split = di.pl

Name of the split program.

split_args =-c %s -e %s -g -protent –sgmlencoding [other arguments]

Command line arguments to pass to the split program di.pl.

Required arguments:

-c %s — the mapfile; the %s is the variable (placeholder) for the filename.

-e %s — error logging; the %s is the variable (placeholder) for the path where the error log file is to be written.

-g — relays to di.pl that it is being called by digui.pl and that it needs to display messages formatted for that Tk display. Required when DI is being run from the GUI.

-protent — (optional) protects entries from being expanded when imported into Contenta objects. Arguments listed for the di.pl program can be specified on this line.

–sgmlencoding — (optional) specifies the character encoding of the source SGML file. Include this argument if the source file will include characters not included in the ISO-8859-1 character set.

The Resource Assignments
spliterr =../encaps/di/errsPath and filename for the error log file (mandatory).
generate =di.pl Name of the generate program.
generate_args =–c %s –e %s -g –m 4Command line arguments for generating map files from documents.
import = PCMImport.plName of the import program.
import_args =-file %s %sCommand line arguments for the importing of documents that have been split—arguments to be passed to PCMImport.pl.

When used by the digui.pl, the first %s is a place-holder for the XML drive file. The second %s is for all other arguments passed to PCMImport.pl.

viewsgml =write

Definition for application to be executed when Activity > View XML... is selected (in DI GUI).

On Windows the default editor is WordPad. On Linux it is vi.

To modify, enter the path and command for the application you want to be executed to view files.

viewxml =write

Definition for application to be executed whenActivity > View XML... is selected (in DI GUI).

On Windows the default editor is WordPad. On Linux it is vi.

To modify, enter the path and command for the application you want to be executed to view files.