Documentation Center

Generate

The Generate option on the Activity menu parses an SGML or XML document against a DTD and generates a template map file based on a source document. The Generate option is available only if the XML Options field is DTD.

The command line syntax is:

perl directory_path/di.pl arguments

Required syntax and arguments for the di.pl generate activity:

Syntax/ArgumentDescription
perlPerl executable. If Perl is not included in your PATH variable, specify the complete path to the Perl program.
directory_path/di.pl

Specify the directory path (directory_path) for the file (di.pl) to execute.

-c mapfileThe full path and name of the map file.
-e msgfileFull path and name of the log file.
-m dn

Indicates that di.pl should run in Generate mode and specifies the number of hierarchical tag levels (n) to retrieve.

The optional arguments for thedi.pl generate activity are listed and described below. If adding these to the digui.cfg file, add to the generate_args string.

ArgumentDescription
-dTurns on debug mode which saves intermediate files.
-gUse to indicate to di.pl that it is being executed from digui.pl and that it needs to display messages formatted for that Tk display.

This switch should only specified/used in the digui.cgf file for the di.pl program; only for use when DI is executed within a GUI so do not include if issuing di.pl from a command line.

-p pathThe full import path in SDL Contenta. This is the Contenta path to the container where the document is to reside after import. Use to override the PCM Path field in the map file.
-s pathThe full path to the SGML or XML source document. Use to override the Source field in the map file.
-caterrsUse to combine the omnilog and errorfile log files.
-config filenameOptional

Use to specify an alternate or custom Dynamic Import configuration file to use. The custom configuration file must be located in the Contenta_home/encaps/di directory path.

The custom configuration file must satisfy the required contents of the DI configuration file. It is recommended that you start your custom modifications with a copy of the delivered configuration file.

If the -config switch is not used, the default is digui.cfg.

-sgmlencoding encodingOptional

Use to specify the character encoding of the source SGML file.

If this value is set to ASCII, the encoding defaults to UTF-8. If this argument is omitted or left empty (the default), the program attempts to determine the encoding of the source content. If the encoding cannot be determined, the encoding defaults to UTF-8.

This argument is ignored for XML data.

If Dynamic Import is interrupted during import, a restart drive file is created. To continue the import from the point of failure, execute the import program and use the restart drive file to restart Dynamic Import; use the -file restart_drivefile.xml switch.