Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


Handling conflicts in code pages

Exception events in which the document item is alphanumeric and the exception code in XML-CODE is between 100,001 and 165,535 or between 200,001 and 265,535 indicate that the code page of the document (as specified by its encoding declaration) conflicts with the external code-page information.

In this special case, you can choose to parse with the code page of the document by subtracting 100,000 or 200,000 from the value in XML-CODE (depending on whether it is an EBCDIC code page or ASCII code page, respectively). For instance, if XML-CODE contains 101,140, the code page of the document is 1140. Alternatively, you can choose to parse with the external code page by setting XML-CODE to zero before returning to the parser.

The parser takes one of three actions after returning from a processing procedure for a code-page conflict exception event:

The following figure illustrates these actions. The off-page connectors (for example, Off-page flow-chart connector.) connect the multiple charts in this information. In particular, P off-page connector. in the following figure connects to Control flow between XML parser and program, showing XML-CODE usage, and C off-page connector. connects from Control flow for XML exceptions.

XML CCSID exception flow control

This image shows a flowchart for XML CCSID exceptions, as described in surrounding text.

In this figure, CCSID (coded character set identifier) is a value from 1 to 65,536 that denotes the code page.

related concepts
How the XML parser handles errors

related tasks
Understanding the encoding of XML documents
Handling exceptions that the XML parser finds

related references
XML PARSE exceptions that allow continuation
XML PARSE exceptions that do not allow continuation
XML-CODE (COBOL for Windows Language Reference)


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)