XML RESOLVE SCHEMA-FILE

This statement has the following parameters:

Parameter Description
SchemaFileName The name of the XML schema file to be resolved.

Description

The XML RESOLVE SCHEMA-FILE statement is used to resolve the name of an XML schema file specified for the SchemaFileName parameter. The resolution process is similar to that for the ModelFileName#DataFileName parameter of an XML IMPORT FILE, XML IMPORT TEXT, XML EXPORT FILE, or XML EXPORT TEXT statement. The value of this parameter must specify an existing template file (.xtl extension) and not a COBOL object file (.cob extension).

XML Extensions uses the model files only as input files. When XML Extensions references a model file, the appropriate predetermined extension is added, regardless of the presence or lack of an extension on the model file parameter supplied by the COBOL program.

XML Extensions uses the CBL_LOCATE_FILE library routine to locate a model file (with the appropriate extension added) except when:

  • the model filename contains a directory separator character (such as "\" on Windows);
  • the file exists; or
  • the filename is a URL (that is, the name begins with "http://", https://, or "file://"). If the name is a URL, it is used "as is". Otherwise, the file extension is forced to be .xsd.

Example

XML RESOLVE SCHEMA-NAME 
       MY-SCHEMA-FILE. 
IF NOT XML-OK GO TO Z.