edmiExpressToHTML
EdmiError edmiExpressToHTML(SdaiString expressFile, SdaiString diagnosticFile, SdaiString htmlFile, SdaiInteger options, SdaiInteger *warnings, SdaiInteger *errors);
Invokes the EDMexpressCompiler to produce an HTML representation of the specified Express schema(ta). The resulting HTML representation will be stored in one or more specified files. The HTML representation can be displayed by any Internet browser by giving the file name specified in the <htmlFile> argument as the HTML file to the actual Internet browser. This function has many options to make a pretty HTML representation. It is important to keep the HTML files relatively small in size to get good performance in the browsing, hence there are several options to store the HTML representation in several files. If the resulting HTML files should be moved to another system or to another file directory, the best is to direct the resulting HTML representation to an empty directory to make it easy to find out which files have to be transferred to the new destination, i.e. to find out which files belongs to one complete HTML representation of one or more Express schemata. The EDMexpressCompiler performs several checks during the HTML generation, hence the number of errors and warnings detected during the HTML generation will be returned in the <errors> and <warnings> arguments, respectively.
Arguments
Type | Name | Comment |
SdaiString | expressFile | Specifies the name of the file(s) containing the EXPRESS Schema(ta) to be presented in HTML format. If more than one file is specified, delimit each file name with a comma. The wild card character "*" is also a permitted character in a filename. The default file extension is ".exp". |
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. |
SdaiString | htmlFile | Specifies the name of a file that will be the main file that holds the HTML representation of the specified Express schema(ta). This file name should be specified when opening the generated HTML representation by an Internet Browser. Default file extension is ".htm" on the Windows platforms and ".html" on the Unix platforms. |
SdaiInteger | options | Specifies the current EDMexpressCompiler options. The <options> value should be specified as a bitwise OR of the options to enable. See descriptions below for more details of available options. All option names 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 EDMexpressCompiler in the current invocation. |
SdaiInteger | errors | The address of a variable that will receive the number of errors detected by the EDMexpressCompiler in the current invocation. |
Return Value
Options
Â
Option | Comment |
---|---|
BOLD_KEYWORDS | Specifies that Express reserved words will be displayed in bold fonts. |
BOLD_GLOBAL_SYMBOLS | Specifies that global symbols in the actual Express schema(ta) will be displayed in bold fonts. Global symbols are the names of schemata, entities, defined types, constants, global rules, functions, and procedures. When the ENUMERATIONS_AS_GLOBAL_SYMBOLS option is set, then all enumeration elements will be handled as global symbols. |
MAKE_HEADING | Specifies that a heading, i.e., a kind of table of contents will be produced in different levels to enhance the browsing. |
MAKE_LOWER_AND_UPPER_CASE_SYMBOLS | Specifies that all global symbols will be written in the following way: the first character and the first character after an underscore in a global symbol name will be in upper case, the rest will be in lower case. This will enable "pretty print" of the HTML representation. |
ENUMERATIONS_AS_GLOBAL_SYMBOLS | Specifies that all enumeration elements should be handled as global symbols. |
HTML_FRAMES | Specifies that the HTML representation will be displayed in several frames. |
LINKS_IN_COMMENTS | Add hypertext link in appropriate words in an Express comment. |
ONE_HTML_FILE_PER_SCHEMA | Specifies that there will be one HTML file for each Express schema. The options ONE_HTML_FILE_PER_SCHEMA and ONE_HTML_FILE_PER_INPUT_FILE are mutually exclusive. |
ONE_HTML_FILE_PER_INPUT_FILE | Specifies that there will be one HTML file for each file specifies in the <expressFile> argument. The options ONE_HTML_FILE_PER_SCHEMA and ONE_HTML_FILE_PER_INPUT_FILE are mutually exclusive. |
SHORT_HTML_FILE_NAMES | Specifies that the name of the files that constitutes the HTML representation should be as short as possible to reduce the number of bytes in the hyperlinks, thus reduce the size of the HTML representation. This option does not affect the <htmlFile> argument. |
Example
Â
 SdaiInteger warnings,errors; if (rstat = edmiExpressToHTML("/home/hkd/express/pdm_schema.exp", "/home/hkd/express/pdm_schema.dia", "/home/hkd/express/pdm_schema.html", BOLD_KEYWORDS | BOLD_GLOBAL_SYMBOLS | MAKE_HEADING | HTML_FRAMES | MAKE_LOWER_AND_UPPER_CASE_SYMBOLS | ENUMERATIONS_AS_GLOBAL_SYMBOLS | ONE_HTML_FILE_PER_SCHEMA | SHORT_HTML_FILE_NAMES , &warnings, &errors)) { /* Error in operation */ printf("\nError: %s in edmiExpressToHTML\n", edmiGetErrorText(rstat)); goto error; }
Â
See also
Filter by label
There are no items with the selected labels at this time.
Â