...
Code Block | ||||
---|---|---|---|---|
| ||||
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. |
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. |
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: |
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 | ||||||
---|---|---|---|---|---|---|
|
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Return Value
...
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Options
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Example
...
Code Block | ||
---|---|---|
| ||
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) | ||||||
---|---|---|---|---|---|---|
|