xpxDefineSchema
FUNCTION xpxDefineSchema (fileName , diagnosticFile , schemaToStore : STRING; options , VAR noOfWarnings , VAR noOfErrors : INTEGER) status : INTEGER;
The xpxDefineSchema function runs one or more Express schemata through the EDMexpressCompiler. Optionally it creates and populates a dictionary model in the EDMdatabase of one or more of the compiled schemata.
Arguments
Type | Name | Comment |
STRING | fileName | The Express schemata to be compiled is residing in the file(s) specified by the fileName argument. The fileName argument can specify more than one file by using wild cards or by specifying several file names separated by the comma character. Any number of schemata can reside in one file. Short form schemata as well as long form schemata can be compiled. Short form schemata is schemata that contains interface (USE FROM , REFERENCE FROM) constructs. |
STRING | diagnosticFile | specifies the name of a file that will receive the error and warning messages from the EDMexpressCompiler. If the diagnosticFile is an empty string or has the value indeterminate , then the output from the EDMexpressCompiler will be to the EDMmodelConverter standard output window. |
STRING | schemaToStore | specifies for which schemata a dictionary model should be created and populated, in case this option is enabled. If a dictionary model should be created for more than one schema, the schema names should be specified, one by one separated by commas. If the schemaToStore argument is an empty string or has the value indeterminate , a dictionary model will be created for all schemata compiled if the appropriate options are enabled. |
INTEGER | options | see below |
INTEGER | noOfWarnings | the number of warnings detected during the compilation process. |
INTEGER | noOfErrors | number of errors detected during the compilation process. |
Return Value
Options
Option | Comment |
xpxSTORING_SOURCE | Specifies that the Express schema(ta) in its original form will be stored in the EDMdatabase. This Express source can later be retrieved and displayed by the EDMsupervisor command Schemata>ShowSchemata. 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. |
xpxDELETING_EXISTING_SCHEMAS | Specifies that the existing dictionary model(s) with the same name as the resulting dictionary model(s) from this compilation will be replaced by the new dictionary model(s) as long as there are no data models associated with this (these) existing dictionary model(s). Dictionary models with associated data models or associated Express-X dictionary models cannot be deleted before all the associated data models or associated Express-X dictionary models are deleted. |
xpxPARSE_ONLY | Specifies that the Express schema(ta) will be checked for syntax errors only. No dictionary models will be created when this option is enabled. |
xpxNO_DICTIONARY_MODEL | Specifies that no dictionary models will be created by the current invocation of the edmiDefineSchema operation. |
xpxCONTINUE_STORING_ON_ERROR | Enforces the EDMexpressCompiler to create and populate a dictionary model of erroneous schema(ta). Only schema(ta) compiled without any errors can be stored as a dictionary model(s) in the EDMdatabase when this option is unset. |
xpxLOG_SCHEMA_INTERFACE | Specifies that a log record will be written to the diagnostic report for each Express construct that is interfaced from one schema to another. This log record contains information such as the name of the interfaced construct, if it is explicit or implicit interfaced etc. |
xpxSDAI_WARNINGS | Activates EDMinterface/SDAI warnings relevant for the usage of EDMinterface functions on an instantiated data model of the actual schema. |
xpxERRORS_ONLY | Warnings will be suppressed. |
xpxDIAGNOSTICS_FOR_LONGFORMS_ONLY | Specifies that only diagnostic related to schemata that will be stored as dictionary models will be written to the diagnostic report. Many errors can be reported when the compilation process implicitly makes a long form schema from short form schemata, i.e., resolves all Express schema interface declarations. These errors may not be relevant for the final dictionary model of the long form schema, hence the setting of this options prevent the issuing of these error messages. |
xpxIGNORE_EMPTY_SELECT | Specifies that no error message should be produced when the compiler detects that a SELECT definition with an empty selection list is interfaced from one schema to another. Express constructions with expressions that refer to the empty select cannot be properly checked when this option is set. This option should never be set when compiling schemata that will be used as the underlying schema for a data model, i.e. no dictionary model should contain empty select. |
xpxHTML_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:
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. |
xpxEDM_EXPRESS_EXTENSION | The compiler will accept EDM extensions to Express, currently there is one, namely xpxPrintf (see EDMassist Vol6). |
xpxTC2 | Parse schema in accordance to Technical Corrigendum no.2 |
xpxSTANDARD_COMPLEX_HANDLING | Only explicit complex entity definitions, i.e. those specified by a SUPERTYPE statement, will be created in the appropriate dictionary model. |
xpxFULL_COMPLEX_HANDLING | All explicit and implicit complex entity definitions will be created in the appropriate dictionary model. |
xpxNO_COMPLEX_ENTITIES | No complex entity definitions are created in the appropriate dictionary model. This option will overrule the setting of the STANDARD_COMPLEX_HANDLING and the FULL_COMPLEX_HANDLING options. It is advised to use this option in order to allow dynamic definition of complex entities when required at run time. |
xpxNO_EXPRESSION_CHECKED | All expressions in the schema(ta) will only be parsed, i.e. only checked for syntactic correctness. This option implicitly sets the NO_EXPRESSION_STORED option as an unchecked expression cannot be stored in a dictionary model. Expressions can be found in the following Express constructs: CONSTANT, DERIVE attributes, AGGREGATE bound specification, WHERE, FUNCTION, PROCEDURE, RULE. Setting this option also set the NO_EXPRESSION_STORED NO_DERIVE_CHECKED, NO_DERIVE_STORED NO_RULE_CHECKED and NO_RULE_STORED options. |
xpxNO_EXPRESSION_STORED | None of the expressions described above will be stored in the resulting dictionary model(s). |
xpxNO_DERIVE_CHECKED | Specifies that the algorithm defining the value of a DERIVE attribute will only be parsed, i.e., only checked for syntactic correctness. Setting this option also set the NO_DERIVE_STORED option. |
xpxNO_DERIVE_STORED | Specifies that the algorithm defining the value of a DERIVE attribute will not be stored in the related dictionary model. |
xpxNO_RULE_CHECKED | Specifies that the logical expressions defining a global rule will only be parsed, i.e., only checked for syntactic correctness. Setting this option also set the NO_RULE_STORED option. |
xpxNO_RULE_STORED | Specifies that no global rule definitions will be stored in the related dictionary model. |
Â
Example
<Missing Example>
Â
See also
Filter by label
There are no items with the selected labels at this time.
Â