Record forms

The general form of a record created in the parsed data stream contains a fixed header section, followed by zero or more values. These values may consist of either a length and value pair, or a single StringID value, depending on the type of data being represented, and the data stream options that are in use. StringIDs are used to represent attribute and element name components - the lname, namespace URI, and namespace prefix for start element and attribute name records, and the namespace prefix and URI for namespace declarations. When StringIDs are not in use, these name components are represented by length and value pairs, just like other types of data returned in the records that make up the parsed data stream.

Each record begins with a fixed section that contains the record type, a set of flags, and the length of the entire record. This is followed by the values relevant to the specific type of information represented by the record. In most cases, these values represent an individual item parsed from the XML document. The exceptions are the metadata records (the buffer info and error records), which contain information describing the input and output streams, but which are not directly related to a specific item from the XML document.

The record length field is the value that must be used to navigate from one record to the next in the parsed data stream. Although the lengths and types of the individual fields of a record are explained below, the caller must not use these to calculate the location of subsequent records.

The data stream options contained in the buffer info record of each output buffer, and the token types of each record within those buffers uniquely identify the type of information contained in each record. This type information is reflected in the record form used for each record. These structures are defined in the header file gxlhxeh.h (GXLYXEH) - mapping of the output buffer record. For assembler callers, they are defined in GXLYXEH. Also, see Table 1 for a description of the various record types.