Description
With this control
operation, the caller can do the following for a validating parse:
- Enable the creation of auxiliary records which can include the
location of an error in the XML document, the string which is in error,
and also a possible expected string.
- Enable position indexes to be present in the error location path
in order to facilitate locating the error.
For a non-validating parse, it can be used to:
- Enable the ability to continue parsing when an undefined prefix
is encountered on an element or attribute. The "prefix:local name" will
be treated as the local name.
- Request an auxiliary information record that contains the tolerated
return and reason codes and the error offset.
Syntax
call gxl1ctl,(PIMA,
ctl_option,
ctl_data,
return_code,
reason_code);
|
Parameters
- PIMA
- Supplied parameter
- Type:
- Character string
- Length:
- Variable
The name of the Parse Instance Memory Area (PIMA)
which has been previously initialized with a call to the initialization
service.
- ctl_option
- Supplied parameter
- Type:
- Integer
- Length:
- Fullword
The name of the fullword containing an integer
value initialized to XEC_CTL_ERROR_HANDLING.
- ctl_data
- Supplied and returned parameter
- Type:
- Address
- Length:
- Fullword
This parameter contains the address
of an area with information about the error string. This is the XERR
data structure mapped by macro GXLXRR.
- return_code
- Returned parameter
- Type:
- Integer
- Length:
- Fullword
The name of the fullword where the service stores
the return code.
- reason_code
- Returned parameter
- Type:
- Integer
- Length:
- Fullword
The name of the fullword where the service stores
the reason code. The reason code is only relevant if the return code
is not XRC_SUCCESS.
All parameters in the parameter list are required.
The enhanced error information for a validating parse
is returned by way of the XERR_XD_PTR and is where the service will
store the address of the diagnostic area, which is in the macro GXLXRR.
The XD_LastOutput field is a pointer to the data area containing these
records. This data area is within the PIMA and is formatted in the
same manner as a normal output buffer.
The XEC_TOLERATED_ERROR
auxiliary info record for a non-validating parse is returned in the
output buffer. In the event that source offset auxiliary records are
also being returned, this record will immediately follow those records
for the element or attribute in the output buffer.
In
addition to enabling or disabling the enhanced error features, this
control option will perform a reset function. The following properties
and resources will be reset by this control option:
- Fragment mode (validating parse only)
- Start of the XML document
- Error state