Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagecpp
themeConfluence
EdmiError edmiDefineSchemaMap(SdaiString  sourceFile,
                               SdaiString  diagnosticFile, 
                               SdaiInteger options, 
                               SdaiInteger *warnings, 
                               SdaiInteger *errors); 

Invokes the EDMexpressXCompiler 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

...

instance 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 EDMmodelConverterTM. An Express-X dictionary model can only be opened for read only access.

...

This operation is exactly the same operation as the edmiCompileEXPRESS_X function.

...

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".

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.

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

warnings

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

errors

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

Option Description

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 edmiDefineSchemaMap 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 an 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.

MakeExpressXlongForm

Create EXPRESSX long form

Returns:
A completion code of datatype EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an EDMinterface error code. Use edmiGetErrorText to get the error text corresponding to the error code.
EXAMPLE
SdaiInteger errors, warnings;
EdmiError rstat;
...
if (rstat = edmiDefineSchemaMap(
"/usr/users/hkd/ 

Arguments

...

Insert excerpt
US:_a_sourceFile_EDMI
US:_a_sourceFile_EDMI
nopaneltrue
Insert excerpt
US:_a_diagnosticFile_EDMI
US:_a_diagnosticFile_EDMI
nopaneltrue
Insert excerpt
US:_a_options_EDMI
US:_a_options_EDMI
nopaneltrue
Insert excerpt
US:_a_warnings
US:_a_warnings
nopaneltrue
 
Insert excerpt
US:_a_errors
US:_a_errors
nopaneltrue
  

Return Value

...

Insert excerpt
US:_r_EDMInterface
US:_r_EDMInterface
nopaneltrue

Options

...

  

Insert excerpt
US:_o_DELETING_EXISTING_SCHEMAS
US:_o_DELETING_EXISTING_SCHEMAS
nopaneltrue
Insert excerpt
US:_o_PARSE_ONLY
US:_o_PARSE_ONLY
nopaneltrue
Insert excerpt
US:_o_NO_DICTIONARY_MODEL
US:_o_NO_DICTIONARY_MODEL
nopaneltrue
Insert excerpt
US:_o_MAX_CHECKING_LEVEL
US:_o_MAX_CHECKING_LEVEL
nopaneltrue
Insert excerpt
US:_o_MAP_INHERITANCE
US:_o_MAP_INHERITANCE
nopaneltrue
 
Insert excerpt
US:_o_CONTINUE_STORING_ON_ERROR
US:_o_CONTINUE_STORING_ON_ERROR
nopaneltrue
 
Insert excerpt
US:_o_HTML_ERROR_LISTING
US:_o_HTML_ERROR_LISTING
nopaneltrue
 
Insert excerpt
US:_o_MAP_INHERITANCE_REPORT
US:_o_MAP_INHERITANCE_REPORT
nopaneltrue
 
Insert excerpt
US:_o_MAKE_EXPRESSX_LONGFORM_OPTIONS
US:_o_MAKE_EXPRESSX_LONGFORM_OPTIONS
nopaneltrue

 

Example

...

 

Code Block
languagecpp
daiInteger errors, warnings;
EdmiError rstat;
...
if (rstat = edmiDefineSchemaMap("/tmp/expx_mapp_example.xpx",

...

 "/

...

tmp/expx.diag",

...

 DELETING_EXISTING_SCHEMAS,

...

 &warnings,

...

 &errors)) {

...

 
	/* Error in operation */

...

 
	printf("\nError in edmiDefineSchemaMap: %s\n",

...

 
	edmiGetErrorText(rstat));

...

 
	goto error;

...

 
}

...


printf("\nNumber of warnings: %ld", warnings);

...

 
printf("\nNumber of errors: %ld", errors);

...

 
. . . 

 

See also

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "edmcompilerprj" and parent = "6062220"