For each value of the exception code parameter passed to the exception event (listed under the heading "Number"), the following table describes the exception, and the actions that the parser takes when you request it to continue after the exception. In these descriptions, the term "XML text" refers to the string based on the pointer and length passed to the event.
|
Number |
Description | Parser Action on Continuation |
|---|---|---|
|
1 |
The parser found an invalid character while scanning white space outside element content. | The parser generates a content_characters event with XML text containing the (single) invalid character. Parsing continues at the character after the invalid character. |
|
2 |
The parser found an invalid start of a processing instruction, element, comment or document type declaration outside element content. | The parser generates a content_characters event with the XML text containing the 2- or 3-character invalid initial character sequence. Parsing continues at the character after the invalid sequence. |
|
3 |
The parser found a duplicate attribute name. | The parser generates an attribute_name event with the XML text containing the duplicate attribute name. |
|
4 |
The parser found the markup character "<" in an attribute value. | Prior to generating the exception event, the parser generates an attribute_characters event for any part of the attribute value prior to the "<" character. After the exception event, the parser generates an attribute_characters event with XML text containing "<". Parsing then continues at the character after the "<". |
|
5 |
The start and end tag names of an element did not match. | The parser generates an end_of_element event with XML text containing the mismatched end name. |
|
6 |
The parser found an invalid character in element content. | The parser includes the invalid character in XML text for the subsequent content_characters event. |
|
7 |
The parser found an invalid start of an element, comment, processing instruction or CDATA section in element content. | Prior to generating the exception event, the parser generates a content_characters event for any part of the content prior to the "<" markup character. After the exception event, the parser generates a content_characters event with XML text containing 2 characters: the "<" followed by the invalid character. Parsing continues at the character after the invalid character. |
|
8 |
The parser found in element content the CDATA closing character sequence “]]” without the matching opening character sequence “<![CDATA[”. | Prior to generating the exception event, the parser generates a content_characters event for any part of the content prior to the “]]” character sequence. After the exception event, the parser generates a content_characters event with XML text containing the 3-character sequence “]]”. Parsing continues at the character after this sequence. |
|
9 |
The parser found an invalid character in a comment. | The parser includes the invalid character in XML text for the subsequent comment event. |
|
10 |
The parser found in a comment the character sequence "--" not followed by ">". | The parser assumes that the "--" character sequence terminates the comment, and generates a comment event. Parsing continues at the character after the "--" sequence. |
|
11 |
The parser found an invalid character in a processing instruction data segment. | The parser includes the invalid character in XML text for the subsequent processing_instruction event. |
|
12 |
A processing instruction target name was "xml" in lower-case, upper-case or mixed-case. | The parser generates a processing_instruction event with XML text containing "xml" in the original case. |
|
13 |
The parser found an invalid digit in a hexadecimal character reference (of the form �). | The parser generates an attribute_characters or content_characters event with XML text containing the invalid digit. Parsing of the reference continues at the character after this invalid digit. |
|
14 |
The parser found an invalid digit in a decimal character reference (of the form &#dddd;). | The parser generates an attribute_characters or content_characters event with XML text containing the invalid digit. Parsing of the reference continues at the character after this invalid digit. |
|
15 |
The encoding declaration value in the XML declaration did not begin with lower- or upper-case A through Z | The parser generates the encoding event with XML text containing the encoding declaration value as it was specified. |
|
16 |
A character reference did not refer to a legal XML character. | The parser generates an attribute_character_reference or content_character_reference event with XML-NTEXT containing the single Unicode character specified by the character reference. |
|
17 |
The parser found an invalid character in an entity reference name. | The parser includes the invalid character in the XML text for the subsequent unknown_attribute_reference or unknown_content_reference event. |
|
18 |
The parser found an invalid character in an attribute value. | The parser includes the invalid character in XML text for the subsequent attribute_characters event. NOTE: The PL/I XML parser will deviate from the standard and accept "<" as valid in an attribute string. |
|
50 |
The document was encoded in EBCDIC, and the CODEPAGE compiler option specified a supported EBCDIC code page, but the document encoding declaration did not specify a recognizable encoding. | The parser uses the encoding specified by the CODEPAGE compiler option. |
|
51 |
The document was encoded in EBCDIC, and the document encoding declaration specified a supported EBCDIC encoding, but the parser does not support the code page specified by the CODEPAGE compiler option. | The parser uses the encoding specified by the document encoding declaration. |
|
52 |
The document was encoded in EBCDIC, and the CODEPAGE compiler option specified a supported EBCDIC code page, but the document encoding declaration specified an ASCII encoding. | The parser uses the encoding specified by the CODEPAGE compiler option. |
|
53 |
The document was encoded in EBCDIC, and the CODEPAGE compiler option specified a supported EBCDIC code page, but the document encoding declaration specified a supported Unicode encoding. | The parser uses the encoding specified by the CODEPAGE compiler option. |
|
54 |
The document was encoded in EBCDIC, and the CODEPAGE compiler option specified a supported EBCDIC code page, but the document encoding declaration specified a Unicode encoding that the parser does not support. | The parser uses the encoding specified by the CODEPAGE compiler option. |
|
55 |
The document was encoded in EBCDIC, and the CODEPAGE compiler option specified a supported EBCDIC code page, but the document encoding declaration specified an encoding that the parser does not support. | The parser uses the encoding specified by the CODEPAGE compiler option. |
|
56 |
The document was encoded in ASCII, and the CODEPAGE compiler option specified a supported ASCII code page, but the document encoding declaration did not specify a recognizable encoding. | The parser uses the encoding specified by the CODEPAGE compiler option. |
|
57 |
The document was encoded in ASCII, and the document encoding declaration specified a supported ASCII encoding, but the parser does not support the code page specified by the CODEPAGE compiler option. | The parser uses the encoding specified by the document encoding declaration. |
|
58 |
The document was encoded in ASCII, and the CODEPAGE compiler option specified a supported ASCII code page, but the document encoding declaration specified a supported EBCDIC encoding. | The parser uses the encoding specified by the CODEPAGE compiler option. |
|
59 |
The document was encoded in ASCII, and the CODEPAGE compiler option specified a supported ASCII code page, but the document encoding declaration specified a supported Unicode encoding. | The parser uses the encoding specified by the CODEPAGE compiler option. |
|
60 |
The document was encoded in ASCII, and the CODEPAGE compiler option specified a supported ASCII code page, but the document encoding declaration specified a Unicode encoding that the parser does not support. | The parser uses the encoding specified by the CODEPAGE compiler option. |
|
61 |
The document was encoded in ASCII, and the CODEPAGE compiler option specified a supported ASCII code page, but the document encoding declaration specified an encoding that the parser does not support. | The parser uses the encoding specified by the CODEPAGE compiler option. |
|
100,001 through 165,535 |
The document was encoded in EBCDIC, and the encodings specified by the CODEPAGE compiler option and the document encoding declaration are both supported EBCDIC code pages, but are not the same. The exception code contains the CCSID for the encoding declaration plus 100,000. | If you return zero from the exception event, the parser uses the encoding specified by the CODEPAGE compiler option. If you return the CCSID from the document encoding declaration (by subtracting 100,000 from the exception code), the parser uses this encoding. |
|
200,001 through 265,535 |
The document was encoded in ASCII, and the encodings specified by the CODEPAGE compiler option and the document encoding declaration are both supported ASCII code pages, but are not the same. The exception code contains the CCSID for the encoding declaration plus 200,000. | If you return zero from the exception event, the parser uses the encoding specified by the CODEPAGE compiler option. If you return the CCSID from the document encoding declaration (by subtracting 200,000 from the exception code), the parser uses this encoding. |