edmiCompileExpress_X

EdmiError edmiCompileExpress_X(SdaiString  sourceFile,
                                SdaiString  diagnosticFile, 
                                SdaiInteger options, 
                                SdaiInteger *warnings, 
                                SdaiInteger *errors); 


This function can only be used when the EDMmodelConverter license is fully installed.  Invokes the EDMexpressXCompiler="font-family: Symbol;" face="Symbol" to compile one or more files, each containing one or more Express-X schemata. For each input schema an Express-X syntax check, an Express-X schema consistency check including a check against source and target Express schema, and an Express-X dictionary model creation is available. This is specified through the <options> argument.  Normally an Express-X schema defines a mapping (conversion) of a data model defined by one Express schema (source schema), to a new data model defined by another Express schema (target schema). A legal special case is when the source and target schema is the same Express schema. All Express schemata referred to by the actual Express-X schema must exist as dictionary models in the EDMdatabase when this function is executed.  An Express-X dictionary model is an instantiation of an Express schema of the Express-X language. The name of an Express-X dictionary model is the name of the Express-X schema in upper case with the extension XPX_MAP. The name of an Express-X schema must be unique within one EDMdatabase. Express-X dictionary models are located in the dictionary repository. An Express-X dictionary model is part of the input data to the EDMmodelConverter. An Express-X dictionary model can only be opened for read only access.
This operation is exactly the same operation as the edmiDefineSchemaMap function.

Arguments


TypeNameComment
SdaiString

sourceFile

Specifies the name of the file(s) containing Express-X schema(ta). If more than one file is specified, delimit each file name with a comma. The wild card symbol "*" is also a permitted character in a filename. The default file extension is ".xpx".

SdaiString

diagnosticFile

Specifies the file name for diagnostic information generated by this function. If no file name is supplied, i.e. the <diagnosticFile> argument is set to NULL, all diagnostic information will be written to the EDMinterface current output device. The EDMinterface current output device can be defined by the edmiDefineOutputFunction operation.

SdaiInteger

options

Specifies the current EDMexpressXCompiler options. The options value should be specified as a bitwise or of the EDMexpressXCompiler options to enable. See descriptions below for more details.
The name of all <options> are defined in the header file sdai.h

SdaiInteger

warnings

The address of a variable that will receive the number of warnings detected by the EDMexpressXCompiler in the current invocation.

SdaiInteger

errors

The address of a variable that will receive the number of errors detected by the EDMexpressXCompiler in the current invocation.

Return Value


Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_EDMInterface'.

 

Options


  

OptionComment

STORING_SOURCE

Specifies that the Express-X schema(ta) will be stored in original form in the EDMdatabase. This source can later be retrieved and displayed by the EDMsupervisor command Schemata > EXPRESS-X > ShowSchemata command.  This option is automatically enabled in the operation independent of being set in the <options> argument or not. Hence the original source schemata will always be stored in the EDMdatabase.

DELETING_EXISTING_SCHEMAS

Specifies that the existing Express-X dictionary model(s) with the same name as the resulting Express-X dictionary model(s) from this compilation will be replaced by the new Express-X dictionary model(s).

PARSE_ONLY

Specifies that the Express-X schema(ta) will be checked for syntax errors only. The referenced EXPRESS schema(ta) may or may not exist as dictionary models when the edmiCompileExpress_X is invoked with this option enabled.

NO_DICTIONARY_MODEL

Specifies that no Express-X dictionary models will be created by this invocation of the EDMexpressXCompiler.

MAX_CHECKING_LEVEL

Specifies that extended checking should be performed. This extended checking will never result in additional error messages, only additional warning messages may be issued.

MAP_INHERITANCE

Specifies that map inheritance will be enabled during this invocation of the EDMexpressXCompiler.

CONTINUE_STORING_ON_ERROR

Enforces the EDMexpressXCompiler to create and populate Express-X dictionary model(s) of erroneous schema(ta). Only dictionary models of schema(s) compiled without any errors can be stored as a Express-X dictionary model(s) in the EDMdatabase when this option is unset.
NOTE: This option should be used with care as it may lead to unpredictable consequences, possibly fatal system failure during a conversion process defined by such an erroneous Express-X dictionary model!

HTML_ERROR_LISTING

Specifies that compilation diagnostics will be written in HTML on files in the directory defined by the system variable EDMS_TMP_DIR. The diagnostic report is ready to be displayed by an Internet browser. There are three or four HTML diagnostic files with the following names:

  • On UNIX: s_main.html, s_err.html, s_exp0.html and optionally s_sch.html
  • On Windows: s_main.htm, s_err.htm, s_exp0.htm and optionally s_sch.htm

The file named s_main.htm or s_main.html is the main file, hence this file should be specified to the actual Internet browser when displaying the diagnostic report.

MAP_INHERITANCE_REPORT

Specifies that a report of map inheritance should be written to the EDMinterface current output device. The EDMinterface current output device can be defined by the edmiDefineOutputFunction operation. This option is effective only when the MAP_INHERITANCE option is enabled.

 

Example


 

SdaiInteger errors, warnings;
 EdmiError rstat;
 ...
 if (rstat = edmiCompileExpress_X (
 "/usr/users/hkd/expx_mapp_example.xpx", 
 "/usr/users/hkd/expx.diag", 
 DELETING_EXISTING_SCHEMAS, 
 &warnings, 
 &errors)) { 
 /* Error in operation */ 
 printf("\nError in edmiCompileExpress_X: %s", 
 edmiGetErrorText(rstat)); 
 goto error; 
 }
 printf("\nNumber of warnings: %ld", warnings); 
 printf("\nNumber of errors: %ld", errors); 
 . . . 

 

See also

Filter by label

There are no items with the selected labels at this time.