The XML parser included in ILE COBOL is not a conforming XML processor according to the definition in the XML specification. It does not validate the XML documents that you parse. While it does check for many well-formedness errors, it does not perform all of the actions required of a nonvalidating XML processor.
In particular, it does not process the internal document type definition (DTD internal subset). Thus it does not supply default attribute values, does not normalize attribute values, and does not include the replacement text of internal entities except for the predefined entities. Instead, it passes the entire document type declaration as the contents of XML-TEXT or XML-NTEXT for the DOCUMENT-TYPE-DESCRIPTOR XML event, which allows the application to perform these actions if required.
The parser optionally allows programs to continue processing an XML document after some errors. The purpose of this is to facilitate debugging of XML documents and processing programs.
Recapitulating the definition in the XML specification, a textual object is a well-formed XML document if:
The COBOL XML parser does check that documents conform to the XML grammar, except for any document type declaration. The declaration is supplied in its entirety, unchecked, to your application.
The following material is an annotation from the XML
specification. The W3C is not responsible for any content not found at
the original URL (www.w3.org/TR/REC-xml). All the
annotations are non-normative and are shown in italic.
Copyright (C) 1994-2001 W3C (R) (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University), All Rights Reserved. W3C liability, trademark, document use, and software licensing rules apply. (www.w3.org/Consortium/Legal/ipr-notice-20000612) |
The XML specification also contains twelve explicit well-formedness constraints. The constraints that the COBOL XML parser checks partly or completely are shown in bold type:
The parser does not process the internal DTD subset, so it does not enforce this constraint.
The parser does not process the external subset, so it does not enforce this constraint.
The parser does not process the internal DTD subset, so it does not enforce this constraint.
The parser enforces this constraint.
The parser partly supports this constraint by checking up to 10 attribute names in a given element for uniqueness. The application can check any attribute names beyond this limit.
The parser does not enforce this constraint.
The parser does not enforce this constraint.
The parser enforces this constraint.
Note that if entities are declared in the external subset or in external parameter entities, a non-validating processor is not obligated to read and process their declarations; for such documents, the rule that an entity must be declared is a well-formedness constraint only if standalone='yes'."
The parser does not enforce this constraint.
The parser does not enforce this constraint.
The parser does not enforce this constraint.
The parser does not enforce this constraint, because the error cannot occur.
The preceding material is an annotation from the XML specification. The W3C is not responsible for any content not found at the original URL (www.w3.org/TR/REC-xml); all these annotations are non-normative. This document has been reviewed by W3C Members and other interested parties and has been endorsed by the Director as a W3C Recommendation. It is a stable document and may be used as reference material or cited as a normative reference from another document. The normative version of the specification is the English version found at the W3C site; any translated document may contain errors from the translation. |
related concepts
XML parser in COBOL
related references
XML specification (www.w3c.org/XML/)
2.8 Prolog and document type declaration (XML specification
at www.w3.org/TR/REC-xml#sec-prolog-dtd)
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.