Some of the constructs available in an XML document are no longer visible at the interface in COBOL, and in some cases the visibility depends on the type of processing.
Construct / Property | Structure-oriented | Event-oriented |
Numeric character reference | Replaced by the corresponding character | |
If no representation is available in the target encoding, the replacement character is supplied. | If no representation is available in the target encoding, the national represen-tation is supplied, i.e. the CONTENT-NATIONAL-CHARACTER event. | |
Predefined entity | Replaced by the corresponding character | |
General entity | Replaced according to the available definition | |
Internal Document Type Definition (DTD) | Used to define entities | |
Not used to validate the document | ||
Not supplied1 | Supplied in one piece | |
External DTD | Used to define entities | |
Not used to validate the document | ||
Not supplied | ||
Defaulted attribute from DTD | Supplied; | Supplied; |
Schema | Not supported | |
Text declaration | Interpreted | |
Not supplied2 | Supplied in three parts: | |
Processing instructions | Not supplied1 | Supplied in two parts: |
Comments | Not supplied1 | Supplied in one piece |
CDATA section | Component part of the values supplied; no longer recognizable | Supplied in three parts: |
Namespace declaration | Not supplied; | Supplied in one piece |
Data im mixed content | Combined to form a single value | Supplied in parts; fragmentation can also be caused by entity references. |
Handling end of line, file record structure, etc. | Suppressed or forwarded in standard manner according to options (concerns external entities and documents in files) | Suppressed or forwarded in standard manner according to options (concerns external entities only; the document itself is already contained in memory) |
Well-formed structure of the document | Irregularities determined ahead of processing | Irregularities detected only in the course of processing |
Determining the document’s encoding | From the definition of the memory area; | |
From file attribute and file content |
1 No language elements provided to describe it in COBOL
2 Language elements provided in order to supply the encoding name from the encoding declaration, but currently not supported