Support for undefined namespace prefix toleration

The default behavior when the non-validating parser encounters an undefined prefix on an element or attribute is to report a XRSN_NS_ELEM_PREFIX_NOT_DECL or XRSN_NS_ATTR_PREFIX_NOT_DECL reason code and terminate the parse. In the event that the caller does not want this error to terminate the parse, they may use the XEC_CTL_ERROR_HANDLING control option to override this default behavior and continue parsing. The “undefined prefix:local name” will then be returned as the local name field in the output buffer. The XEH_Error_Tolerated bit in the XEH_Flags field will be set in the record header when this occurs.

The XEC_CTL_ERROR_HANDLING control option will enable this feature on a control call by way of the XERR structure which is mapped by GXLHERR in the gxlhctl.h file. The XERR_TOL_UNDECL_NS_PREFIX flag in the XERR_ERROR_TOLERATION field in the XERR structure (when set) will cause the parser to continue parsing when this condition occurs.

In addition to continuing on this error, an auxiliary information record may be generated in the output buffer if desired. This will contain the tolerated return and reason codes and the error offset. In order for this record to be returned the XERR_ERROR_INFORMATION flag must be set in the XERR_FLAGS field. This requires the XERR_TOL_UNDECL_NS_PREFIX flag also be set. This new record will have a type of XEC_TOK_AUX_INFO (0xF0FF) and an AUX type of XEC_TOLERATED_ERROR (0x0110). For the format of this record, see Aux info record - TOLERATED_ERROR.