Home | History | Annotate | Download | only in libxmlrpg
      1       * Summary: the core parser module
      2       * Description: Interfaces, constants and types related to the XML parser
      3       *
      4       * Copy: See Copyright for the status of this software.
      5       *
      6       * Author: Patrick Monnerat <pm (a] datasphere.ch>, DATASPHERE S.A.
      7 
      8       /if not defined(XML_PARSER_H__)
      9       /define XML_PARSER_H__
     10 
     11       /include "libxmlrpg/xmlversion"
     12       /include "libxmlrpg/xmlTypesC"
     13       /include "libxmlrpg/tree"
     14       /include "libxmlrpg/dict"
     15       /include "libxmlrpg/hash"
     16       /include "libxmlrpg/valid"
     17       /include "libxmlrpg/entities"
     18       /include "libxmlrpg/xmlerror"
     19       /include "libxmlrpg/xmlstring"
     20 
     21       * XML_DEFAULT_VERSION:
     22       *
     23       * The default version of XML used: 1.0
     24 
     25      d XML_DEFAULT_VERSION...
     26      d                 c                   '1.0'
     27 
     28       * xmlParserInput:
     29       *
     30       * An xmlParserInput is an input flow for the XML processor.
     31       * Each entity parsed is associated an xmlParserInput (except the
     32       * few predefined ones). This is the case both for internal entities
     33       * - in which case the flow is already completely in memory - or
     34       * external entities - in which case we use the buf structure for
     35       * progressive reading and I18N conversions to the internal UTF-8 format.
     36 
     37       * xmlParserInputDeallocate:
     38       * @str:  the string to deallocate
     39       *
     40       * Callback for freeing some parser input allocations.
     41 
     42      d xmlParserInputDeallocate...
     43      d                 s               *   based(######typedef######)
     44      d                                     procptr
     45 
     46       * Input buffer
     47 
     48      d xmlParserInput  ds                  based(xmlParserInputPtr)
     49      d                                     align qualified
     50      d  buf                                like(xmlParserInputBufferPtr)        UTF-8 encoded buffer
     51      d  filename                       *                                        const char *
     52      d  directory                      *                                        const char *
     53      d  base                           *                                        const char *
     54      d  cur                            *                                        const char *
     55      d  end                            *                                        const char *
     56      d  length                       10i 0                                      Length if known
     57      d  line                         10i 0                                      Current line
     58      d  col                          10i 0                                      Current column
     59       *
     60       * NOTE: consumed is only tested for equality in the parser code,
     61       *       so even if there is an overflow this should not give troubles
     62       *       for parsing very large instances.
     63       *
     64      d  consumed                           like(xmlCulong)                      # consumed xmlChars
     65      d  free                               like(xmlParserInputDeallocate)       base deallocator
     66      d  encoding                       *                                        const xmlChar *
     67      d  version                        *                                        const xmlChar *
     68      d  standalone                   10i 0                                      Standalone entity ?
     69      d  id                           10i 0                                      Entity unique ID
     70 
     71       * xmlParserNodeInfo:
     72       *
     73       * The parser can be asked to collect Node informations, i.e. at what
     74       * place in the file they were detected.
     75       * NOTE: This is off by default and not very well tested.
     76 
     77      d xmlParserNodeInfoPtr...
     78      d                 s               *   based(######typedef######)
     79 
     80      d xmlParserNodeInfo...
     81      d                 ds                  based(xmlParserNodeInfoPtr)
     82      d                                     align qualified
     83      d  node                               like(xmlNodePtr)                     const
     84       * Position & line # that text that created the node begins & ends on
     85      d  begin_pos                          like(xmlCulong)
     86      d  begin_line                         like(xmlCulong)
     87      d  end_pos                            like(xmlCulong)
     88      d  end_line                           like(xmlCulong)
     89 
     90      d xmlParserNodeInfoSeqPtr...
     91      d                 s               *   based(######typedef######)
     92 
     93      d xmlParserNodeInfoSeq...
     94      d                 ds                  based(xmlParserNodeInfoSeqPtr)
     95      d                                     align qualified
     96      d  maximum                            like(xmlCulong)
     97      d  length                             like(xmlCulong)
     98      d  buffer                             like(xmlParserNodeInfoPtr)
     99 
    100       * xmlParserInputState:
    101       *
    102       * The parser is now working also as a state based parser.
    103       * The recursive one use the state info for entities processing.
    104 
    105      d xmlParserInputState...
    106      d                 s             10i 0 based(######typedef######)           enum
    107      d  XML_PARSER_EOF...                                                       Nothing to parse
    108      d                 c                   -1
    109      d  XML_PARSER_START...                                                     Nothing parsed
    110      d                 c                   0
    111      d  XML_PARSER_MISC...                                                      Misc* b4 int subset
    112      d                 c                   1
    113      d  XML_PARSER_PI  c                   2                                    In proc instr
    114      d  XML_PARSER_DTD...                                                       In some DTD content
    115      d                 c                   3
    116      d  XML_PARSER_PROLOG...                                                    Misc* after int sbst
    117      d                 c                   4
    118      d  XML_PARSER_COMMENT...                                                   Within a comment
    119      d                 c                   5
    120      d  XML_PARSER_START_TAG...                                                 Within a start tag
    121      d                 c                   6
    122      d  XML_PARSER_CONTENT...                                                   Within the content
    123      d                 c                   7
    124      d  XML_PARSER_CDATA_SECTION...                                             Within a CDATA
    125      d                 c                   8
    126      d  XML_PARSER_END_TAG...                                                   Within a closing tag
    127      d                 c                   9
    128      d  XML_PARSER_ENTITY_DECL...                                               In an entity decl
    129      d                 c                   10
    130      d  XML_PARSER_ENTITY_VALUE...                                              In entity decl value
    131      d                 c                   11
    132      d  XML_PARSER_ATTRIBUTE_VALUE...                                           In attribute value
    133      d                 c                   12
    134      d  XML_PARSER_SYSTEM_LITERAL...                                            In a SYSTEM value
    135      d                 c                   13
    136      d  XML_PARSER_EPILOG...                                                    Last end tag Misc*
    137      d                 c                   14
    138      d  XML_PARSER_IGNORE...                                                    In IGNORED section
    139      d                 c                   15
    140      d  XML_PARSER_PUBLIC_LITERAL...                                            In a PUBLIC value
    141      d                 c                   16
    142 
    143       * XML_DETECT_IDS:
    144       *
    145       * Bit in the loadsubset context field to tell to do ID/REFs lookups.
    146       * Use it to initialize xmlLoadExtDtdDefaultValue.
    147 
    148      d XML_DETECT_IDS  c                   2
    149 
    150       * XML_COMPLETE_ATTRS:
    151       *
    152       * Bit in the loadsubset context field to tell to do complete the
    153       * elements attributes lists with the ones defaulted from the DTDs.
    154       * Use it to initialize xmlLoadExtDtdDefaultValue.
    155 
    156      d XML_COMPLETE_ATTRS...
    157      d                 c                   4
    158 
    159       * XML_SKIP_IDS:
    160       *
    161       * Bit in the loadsubset context field to tell to not do ID/REFs
    162       *   registration.
    163       * Used to initialize xmlLoadExtDtdDefaultValue in some special cases.
    164 
    165      d XML_SKIP_IDS    c                   8
    166 
    167       * xmlParserMode:
    168       *
    169       * A parser can operate in various modes
    170 
    171      d xmlParserMode   s             10i 0 based(######typedef######)           enum
    172      d  XML_PARSE_UNKNOWN...
    173      d                 c                   0
    174      d  XML_PARSE_DOM...
    175      d                 c                   1
    176      d  XML_PARSE_SAX...
    177      d                 c                   2
    178      d  XML_PARSE_PUSH_DOM...
    179      d                 c                   3
    180      d  XML_PARSE_PUSH_SAX...
    181      d                 c                   4
    182      d  XML_PARSE_READER...
    183      d                 c                   5
    184 
    185       * xmlParserCtxt:
    186       *
    187       * The parser context.
    188       * NOTE This doesn't completely define the parser state, the (current ?)
    189       *      design of the parser uses recursive function calls since this allow
    190       *      and easy mapping from the production rules of the specification
    191       *      to the actual code. The drawback is that the actual function call
    192       *      also reflect the parser state. However most of the parsing routines
    193       *      takes as the only argument the parser context pointer, so migrating
    194       *      to a state based parser for progressive parsing shouldn't be too
    195       *      hard.
    196 
    197      d xmlParserCtxt   ds                  based(xmlParserCtxtPtr)
    198      d                                     align qualified
    199      d  sax                                like(xmlSAXHandlerPtr)               The SAX handler
    200      d  userData                       *                                        SAX only-4 DOM build
    201      d  myDoc                              like(xmlDocPtr)                      Document being built
    202      d  wellFormed                   10i 0                                      Well formed doc ?
    203      d  replaceEntities...                                                      Replace entities ?
    204      d                               10i 0
    205      d  version                        *                                        const xmlChar *
    206      d  encoding                       *                                        const xmlChar *
    207      d  standalone                   10i 0                                      Standalone document
    208      d  html                         10i 0                                      HTML state/type
    209       *
    210       * Input stream stack
    211       *
    212      d  input                              like(xmlParserInputPtr)              Current input stream
    213      d  inputNr                      10i 0                                      # current in streams
    214      d  inputMax                     10i 0                                      Max # of in streams
    215      d  inputTab                       *                                        xmlParserInputPtr *
    216       *
    217       * Node analysis stack only used for DOM building
    218       *
    219      d  node                               like(xmlNodePtr)                     Current parsed node
    220      d  nodeNr                       10i 0                                      Parsing stack depth
    221      d  nodeMax                      10i 0                                      Max stack depth
    222      d  nodeTab                        *                                        xmlNodePtr *
    223       *
    224      d  record_info                  10i 0                                      Keep node info ?
    225      d  node_seq                           likeds(xmlParserNodeInfoSeq)         Parsed nodes info
    226       *
    227      d  errNo                        10i 0                                      Error code
    228       *
    229      d  hasExternalSubset...
    230      d                               10i 0
    231      d  hasPErefs                    10i 0
    232      d  external                     10i 0                                      Parsing ext. entity?
    233       *
    234      d  valid                        10i 0                                      Valid document ?
    235      d  validate                     10i 0                                      Try to validate ?
    236      d  vctxt                              likeds(xmlValidCtxt)                 Validity context
    237       *
    238      d  instate                            like(xmlParserInputState)            Current input type
    239      d  token                        10i 0                                      Next look-ahead char
    240       *
    241      d  directory                      *                                        char *
    242       *
    243       * Node name stack
    244       *
    245      d  name                           *                                        const xmlChar *
    246      d  nameNr                       10i 0                                      Parsing stack depth
    247      d  nameMax                      10i 0                                      Max stack depth
    248      d  nameTab                        *                                        const xmlChar * *
    249       *
    250      d  nbChars                            like(xmlClong)                       # xmlChars processed
    251      d  checkIndex                         like(xmlClong)                       4 progressive parse
    252      d  keepBlanks                   10i 0                                      Ugly but ...
    253      d  disableSAX                   10i 0                                      Disable SAX cllbacks
    254      d  inSubset                     10i 0                                      In int 1/ext 2 sbset
    255      d  intSubName                     *                                        const xmlChar *
    256      d  extSubURI                      *                                        const xmlChar *
    257      d  extSubSytem                    *                                        const xmlChar *
    258       *
    259       * xml:space values
    260       *
    261      d  space                          *                                        int *
    262      d  spaceNr                      10i 0                                      Parsing stack depth
    263      d  spaceMax                     10i 0                                      Max stack depth
    264      d  spaceTab                       *                                        int *
    265       *
    266      d  depth                        10i 0                                      To detect loops
    267      d  entity                             like(xmlParserInputPtr)              To check boundaries
    268      d  charset                      10i 0                                      In-memory content
    269      d  nodelen                      10i 0                                      Speed up parsing
    270      d  nodemem                      10i 0                                      Speed up parsing
    271      d  pedantic                     10i 0                                      Enb. pedantic warng
    272      d  #private                       *                                        void *
    273       *
    274      d  loadsubset                   10i 0                                      Load ext. subset ?
    275      d  linenumbers                  10i 0                                      Set line numbers ?
    276      d  catalogs                       *                                        void *
    277      d  recovery                     10i 0                                      Run in recovery mode
    278      d  progressive                  10i 0                                      Progressive parsing?
    279      d  dict                               like(xmlDictPtr)                     Parser dictionary
    280      d  atts                           *                                        const xmlChar *
    281      d  maxatts                      10i 0                                      Above array size
    282      d  docdict                      10i 0                                      Use dictionary ?
    283       *
    284       * pre-interned strings
    285       *
    286      d  str_xml                        *                                        const xmlChar *
    287      d  str_xmlns                      *                                        const xmlChar *
    288      d  str_xml_ms                     *                                        const xmlChar *
    289       *
    290       * Everything below is used only by the new SAX mode
    291       *
    292      d  sax2                         10i 0                                      New SAX mode ?
    293      d  nsNr                         10i 0                                      # inherited nmspaces
    294      d  nsMax                        10i 0                                      Array size
    295      d  nsTab                          *                                        const xmlChar *
    296      d  attallocs                      *                                        int *
    297      d  pushTab                        *                                        void *
    298      d  attsDefault                        like(xmlHashTablePtr)                Defaulted attrs
    299      d  attsSpecial                        like(xmlHashTablePtr)                non-CDATA attrs
    300      d  nsWellFormed                 10i 0                                      Doc namespace OK ?
    301      d  options                      10i 0                                      Extra options
    302       *
    303       * Those fields are needed only for treaming parsing so far
    304       *
    305      d  dictNames                    10i 0                                      Dict names in tree ?
    306      d  freeElemsNr                  10i 0                                      # free element nodes
    307      d  freeElems                          like(xmlNodePtr)                     Free elem nodes list
    308      d  freeAttrsNr                  10i 0                                      # free attr. nodes
    309      d  freeAttrs                          like(xmlAttrPtr)                     Free attr noes list
    310       *
    311       * the complete error informations for the last error.
    312       *
    313      d  lastError                          likeds(xmlError)
    314      d  parseMode                          like(xmlParserMode)                  The parser mode
    315      d  nbentities                         like(xmlCulong)                      # entity references
    316      d  sizeentities                       like(xmlCulong)                      Parsed entities size
    317       *
    318       * for use by HTML non-recursive parser
    319       *
    320      d  nodeInfo                           like(xmlParserNodeInfoPtr)           Current NodeInfo
    321      d  nodeInfoNr                   10i 0                                      Parsing stack depth
    322      d  nodeInfoMax                  10i 0                                      Max stack depth
    323      d  nodeInfoTab                    *                                        xmlParserNodeInfo *
    324       *
    325      d  input_id                     10i 0                                      Label inputs ?
    326      d  sizeentcopy                        like(xmlCulong)                      Entity copy volume
    327 
    328       * xmlSAXLocator:
    329       *
    330       * A SAX Locator.
    331 
    332      d xmlSAXLocator   ds                  based(xmlSAXLocatorPtr)
    333      d                                     align qualified
    334      d  getPublicId                    *   procptr
    335      d  getSystemId                    *   procptr
    336      d  getLineNumber                  *   procptr
    337      d  getColumnNumber...
    338      d                                 *   procptr
    339 
    340       * xmlSAXHandler:
    341       *
    342       * A SAX handler is bunch of callbacks called by the parser when
    343       * processing of the input generate data or structure informations.
    344 
    345       * resolveEntitySAXFunc:
    346       * @ctx:  the user data (XML parser context)
    347       * @publicId: The public ID of the entity
    348       * @systemId: The system ID of the entity
    349       *
    350       * Callback:
    351       * The entity loader, to control the loading of external entities,
    352       * the application can either:
    353       *    - override this resolveEntity() callback in the SAX block
    354       *    - or better use the xmlSetExternalEntityLoader() function to
    355       *      set up it's own entity resolution routine
    356       *
    357       * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
    358 
    359      d resolveEntitySAXFunc...
    360      d                 s               *   based(######typedef######)
    361      d                                     procptr
    362 
    363       * internalSubsetSAXFunc:
    364       * @ctx:  the user data (XML parser context)
    365       * @name:  the root element name
    366       * @ExternalID:  the external ID
    367       * @SystemID:  the SYSTEM ID (e.g. filename or URL)
    368       *
    369       * Callback on internal subset declaration.
    370 
    371      d internalSubsetSAXFunc...
    372      d                 s               *   based(######typedef######)
    373      d                                     procptr
    374 
    375       * externalSubsetSAXFunc:
    376       * @ctx:  the user data (XML parser context)
    377       * @name:  the root element name
    378       * @ExternalID:  the external ID
    379       * @SystemID:  the SYSTEM ID (e.g. filename or URL)
    380       *
    381       * Callback on external subset declaration.
    382 
    383      d externalSubsetSAXFunc...
    384      d                 s               *   based(######typedef######)
    385      d                                     procptr
    386 
    387       * getEntitySAXFunc:
    388       * @ctx:  the user data (XML parser context)
    389       * @name: The entity name
    390       *
    391       * Get an entity by name.
    392       *
    393       * Returns the xmlEntityPtr if found.
    394 
    395      d getEntitySAXFunc...
    396      d                 s               *   based(######typedef######)
    397      d                                     procptr
    398 
    399       * getParameterEntitySAXFunc:
    400       * @ctx:  the user data (XML parser context)
    401       * @name: The entity name
    402       *
    403       * Get a parameter entity by name.
    404       *
    405       * Returns the xmlEntityPtr if found.
    406 
    407      d getParameterEntitySAXFunc...
    408      d                 s               *   based(######typedef######)
    409      d                                     procptr
    410 
    411       * entityDeclSAXFunc:
    412       * @ctx:  the user data (XML parser context)
    413       * @name:  the entity name
    414       * @type:  the entity type
    415       * @publicId: The public ID of the entity
    416       * @systemId: The system ID of the entity
    417       * @content: the entity value (without processing).
    418       *
    419       * An entity definition has been parsed.
    420 
    421      d entityDeclSAXFunc...
    422      d                 s               *   based(######typedef######)
    423      d                                     procptr
    424 
    425       * notationDeclSAXFunc:
    426       * @ctx:  the user data (XML parser context)
    427       * @name: The name of the notation
    428       * @publicId: The public ID of the entity
    429       * @systemId: The system ID of the entity
    430       *
    431       * What to do when a notation declaration has been parsed.
    432 
    433      d notationDeclSAXFunc...
    434      d                 s               *   based(######typedef######)
    435      d                                     procptr
    436 
    437       * attributeDeclSAXFunc:
    438       * @ctx:  the user data (XML parser context)
    439       * @elem:  the name of the element
    440       * @fullname:  the attribute name
    441       * @type:  the attribute type
    442       * @def:  the type of default value
    443       * @defaultValue: the attribute default value
    444       * @tree:  the tree of enumerated value set
    445       *
    446       * An attribute definition has been parsed.
    447 
    448      d attributeDeclSAXFunc...
    449      d                 s               *   based(######typedef######)
    450      d                                     procptr
    451 
    452       * elementDeclSAXFunc:
    453       * @ctx:  the user data (XML parser context)
    454       * @name:  the element name
    455       * @type:  the element type
    456       * @content: the element value tree
    457       *
    458       * An element definition has been parsed.
    459 
    460      d elementDeclSAXFunc...
    461      d                 s               *   based(######typedef######)
    462      d                                     procptr
    463 
    464       * unparsedEntityDeclSAXFunc:
    465       * @ctx:  the user data (XML parser context)
    466       * @name: The name of the entity
    467       * @publicId: The public ID of the entity
    468       * @systemId: The system ID of the entity
    469       * @notationName: the name of the notation
    470       *
    471       * What to do when an unparsed entity declaration is parsed.
    472 
    473      d unparsedEntityDeclSAXFunc...
    474      d                 s               *   based(######typedef######)
    475      d                                     procptr
    476 
    477       * setDocumentLocatorSAXFunc:
    478       * @ctx:  the user data (XML parser context)
    479       * @loc: A SAX Locator
    480       *
    481       * Receive the document locator at startup, actually xmlDefaultSAXLocator.
    482       * Everything is available on the context, so this is useless in our case.
    483 
    484      d setDocumentLocatorSAXFunc...
    485      d                 s               *   based(######typedef######)
    486      d                                     procptr
    487 
    488       * startDocumentSAXFunc:
    489       * @ctx:  the user data (XML parser context)
    490       *
    491       * Called when the document start being processed.
    492 
    493      d startDocumentSAXFunc...
    494      d                 s               *   based(######typedef######)
    495      d                                     procptr
    496 
    497       * endDocumentSAXFunc:
    498       * @ctx:  the user data (XML parser context)
    499       *
    500       * Called when the document end has been detected.
    501 
    502      d endDocumentSAXFunc...
    503      d                 s               *   based(######typedef######)
    504      d                                     procptr
    505 
    506       * startElementSAXFunc:
    507       * @ctx:  the user data (XML parser context)
    508       * @name:  The element name, including namespace prefix
    509       * @atts:  An array of name/value attributes pairs, NULL terminated
    510       *
    511       * Called when an opening tag has been processed.
    512 
    513      d startElementSAXFunc...
    514      d                 s               *   based(######typedef######)
    515      d                                     procptr
    516 
    517       * endElementSAXFunc:
    518       * @ctx:  the user data (XML parser context)
    519       * @name:  The element name
    520       *
    521       * Called when the end of an element has been detected.
    522 
    523      d endElementSAXFunc...
    524      d                 s               *   based(######typedef######)
    525      d                                     procptr
    526 
    527       * attributeSAXFunc:
    528       * @ctx:  the user data (XML parser context)
    529       * @name:  The attribute name, including namespace prefix
    530       * @value:  The attribute value
    531       *
    532       * Handle an attribute that has been read by the parser.
    533       * The default handling is to convert the attribute into an
    534       * DOM subtree and past it in a new xmlAttr element added to
    535       * the element.
    536 
    537      d attributeSAXFunc...
    538      d                 s               *   based(######typedef######)
    539      d                                     procptr
    540 
    541       * referenceSAXFunc:
    542       * @ctx:  the user data (XML parser context)
    543       * @name:  The entity name
    544       *
    545       * Called when an entity reference is detected.
    546 
    547      d referenceSAXFunc...
    548      d                 s               *   based(######typedef######)
    549      d                                     procptr
    550 
    551       * charactersSAXFunc:
    552       * @ctx:  the user data (XML parser context)
    553       * @ch:  a xmlChar string
    554       * @len: the number of xmlChar
    555       *
    556       * Receiving some chars from the parser.
    557 
    558      d charactersSAXFunc...
    559      d                 s               *   based(######typedef######)
    560      d                                     procptr
    561 
    562       * ignorableWhitespaceSAXFunc:
    563       * @ctx:  the user data (XML parser context)
    564       * @ch:  a xmlChar string
    565       * @len: the number of xmlChar
    566       *
    567       * Receiving some ignorable whitespaces from the parser.
    568       * UNUSED: by default the DOM building will use characters.
    569 
    570      d ignorableWhitespaceSAXFunc...
    571      d                 s               *   based(######typedef######)
    572      d                                     procptr
    573 
    574       * processingInstructionSAXFunc:
    575       * @ctx:  the user data (XML parser context)
    576       * @target:  the target name
    577       * @data: the PI data's
    578       *
    579       * A processing instruction has been parsed.
    580 
    581      d processingInstructionSAXFunc...
    582      d                 s               *   based(######typedef######)
    583      d                                     procptr
    584 
    585       * commentSAXFunc:
    586       * @ctx:  the user data (XML parser context)
    587       * @value:  the comment content
    588       *
    589       * A comment has been parsed.
    590 
    591      d commentSAXFunc...
    592      d                 s               *   based(######typedef######)
    593      d                                     procptr
    594 
    595       * cdataBlockSAXFunc:
    596       * @ctx:  the user data (XML parser context)
    597       * @value:  The pcdata content
    598       * @len:  the block length
    599       *
    600       * Called when a pcdata block has been parsed.
    601 
    602      d cdataBlockSAXFunc...
    603      d                 s               *   based(######typedef######)
    604      d                                     procptr
    605 
    606       * warningSAXFunc:
    607       * @ctx:  an XML parser context
    608       * @msg:  the message to display/transmit
    609       * @...:  extra parameters for the message display
    610       *
    611       * Display and format a warning messages, callback.
    612 
    613      d warningSAXFunc...
    614      d                 s               *   based(######typedef######)
    615      d                                     procptr
    616 
    617       * errorSAXFunc:
    618       * @ctx:  an XML parser context
    619       * @msg:  the message to display/transmit
    620       * @...:  extra parameters for the message display
    621       *
    622       * Display and format an error messages, callback.
    623 
    624      d errorSAXFunc...
    625      d                 s               *   based(######typedef######)
    626      d                                     procptr
    627 
    628       * fatalErrorSAXFunc:
    629       * @ctx:  an XML parser context
    630       * @msg:  the message to display/transmit
    631       * @...:  extra parameters for the message display
    632       *
    633       * Display and format fatal error messages, callback.
    634       * Note: so far fatalError() SAX callbacks are not used, error()
    635       *       get all the callbacks for errors.
    636 
    637      d fatalErrorSAXFunc...
    638      d                 s               *   based(######typedef######)
    639      d                                     procptr
    640 
    641       * isStandaloneSAXFunc:
    642       * @ctx:  the user data (XML parser context)
    643       *
    644       * Is this document tagged standalone?
    645       *
    646       * Returns 1 if true
    647 
    648      d isStandaloneSAXFunc...
    649      d                 s               *   based(######typedef######)
    650      d                                     procptr
    651 
    652       * hasInternalSubsetSAXFunc:
    653       * @ctx:  the user data (XML parser context)
    654       *
    655       * Does this document has an internal subset.
    656       *
    657       * Returns 1 if true
    658 
    659      d hasInternalSubsetSAXFunc...
    660      d                 s               *   based(######typedef######)
    661      d                                     procptr
    662 
    663       * hasExternalSubsetSAXFunc:
    664       * @ctx:  the user data (XML parser context)
    665       *
    666       * Does this document has an external subset?
    667       *
    668       * Returns 1 if true
    669 
    670      d hasExternalSubsetSAXFunc...
    671      d                 s               *   based(######typedef######)
    672      d                                     procptr
    673 
    674       ************************************************************************
    675       *                                                                      *
    676       *                      The SAX version 2 API extensions                *
    677       *                                                                      *
    678       ************************************************************************
    679 
    680       * XML_SAX2_MAGIC:
    681       *
    682       * Special constant found in SAX2 blocks initialized fields
    683 
    684      d XML_SAX2_MAGIC  c                   X'DEEDBEAF'
    685 
    686       * startElementNsSAX2Func:
    687       * @ctx:           the user data (XML parser context)
    688       * @localname:     the local name of the element
    689       * @prefix:        the element namespace prefix if available
    690       * @URI:           the element namespace name if available
    691       * @nb_namespaces: number of namespace definitions on that node
    692       * @namespaces:    pointer to the array of prefix/URI pairs namespace
    693       *                 definitions
    694       * @nb_attributes:  the number of attributes on that node
    695       * @nb_defaulted:   the number of defaulted attributes. The defaulted
    696       *                  ones are at the end of the array
    697       * @attributes:     pointer to the array of
    698       *                  (localname/prefix/URI/value/end) attribute values.
    699       *
    700       * SAX2 callback when an element start has been detected by the parser.
    701       * It provides the namespace informations for the element, as well as
    702       * the new namespace declarations on the element.
    703 
    704      d startElementNsSAX2Func...
    705      d                 s               *   based(######typedef######)
    706      d                                     procptr
    707 
    708       * endElementNsSAX2Func:
    709       * @ctx:  the user data (XML parser context)
    710       * @localname:  the local name of the element
    711       * @prefix:  the element namespace prefix if available
    712       * @URI:  the element namespace name if available
    713       *
    714       * SAX2 callback when an element end has been detected by the parser.
    715       * It provides the namespace informations for the element.
    716 
    717      d endElementNsSAX2Func...
    718      d                 s               *   based(######typedef######)
    719      d                                     procptr
    720 
    721      d xmlSAXHandler   ds                  based(xmlSAXHandlerPtr)
    722      d                                     align qualified
    723      d  internalSubset...
    724      d                                     like(internalSubsetSAXFunc)
    725      d  isStandalone                       like(isStandaloneSAXFunc)
    726      d  hasInternalSubset...
    727      d                                     like(hasInternalSubsetSAXFunc)
    728      d  hasExternalSubset...
    729      d                                     like(hasExternalSubsetSAXFunc)
    730      d  resolveEntity                      like(resolveEntitySAXFunc)
    731      d  getEntity                          like(getEntitySAXFunc)
    732      d  entityDecl                         like(entityDeclSAXFunc)
    733      d  notationDecl                       like(notationDeclSAXFunc)
    734      d  attributeDecl                      like(attributeDeclSAXFunc)
    735      d  elementDecl                        like(elementDeclSAXFunc)
    736      d  unparsedEntityDecl...
    737      d                                     like(unparsedEntityDeclSAXFunc)
    738      d  setDocumentLocator...
    739      d                                     like(setDocumentLocatorSAXFunc)
    740      d  startDocument                      like(startDocumentSAXFunc)
    741      d  endDocument                        like(endDocumentSAXFunc)
    742      d  startElement                       like(startElementSAXFunc)
    743      d  endElement                         like(endElementSAXFunc)
    744      d  reference                          like(referenceSAXFunc)
    745      d  characters                         like(charactersSAXFunc)
    746      d  ignorableWhitespace...
    747      d                                     like(ignorableWhitespaceSAXFunc)
    748      d  processingInstruction...
    749      d                                     like(processingInstructionSAXFunc)
    750      d  comment                            like(commentSAXFunc)
    751      d  warning                            like(warningSAXFunc)
    752      d  error                              like(errorSAXFunc)
    753      d  fatalError                         like(fatalErrorSAXFunc)
    754      d  getParameterEntity...
    755      d                                     like(getParameterEntitySAXFunc)
    756      d  cdataBlock                         like(cdataBlockSAXFunc)
    757      d  externalSubset...
    758      d                                     like(externalSubsetSAXFunc)
    759      d  initialized                  10u 0
    760       *
    761       * The following fields are extensions available only on version 2
    762       *
    763      d  #private                       *                                        void *
    764      d  startElementNs...
    765      d                                     like(startElementNsSAX2Func)
    766      d  endELementNs                       like(endElementNsSAX2Func)
    767      d  serror                             like(xmlStructuredErrorFunc)
    768 
    769       * SAX Version 1
    770 
    771      d xmlSAXHandlerV1Ptr...
    772      d                 s               *   based(######typedef######)
    773 
    774      d xmlSAXHandlerV1...
    775      d                 ds                  based(xmlSAXHandlerV1Ptr)
    776      d                                     align qualified
    777      d  internalSubset...
    778      d                                     like(internalSubsetSAXFunc)
    779      d  isStandalone                       like(isStandaloneSAXFunc)
    780      d  hasInternalSubset...
    781      d                                     like(hasInternalSubsetSAXFunc)
    782      d  hasExternalSubset...
    783      d                                     like(hasExternalSubsetSAXFunc)
    784      d  resolveEntity                      like(resolveEntitySAXFunc)
    785      d  getEntity                          like(getEntitySAXFunc)
    786      d  entityDecl                         like(entityDeclSAXFunc)
    787      d  notationDecl                       like(notationDeclSAXFunc)
    788      d  attributeDecl                      like(attributeDeclSAXFunc)
    789      d  elementDecl                        like(elementDeclSAXFunc)
    790      d  unparsedEntityDecl...
    791      d                                     like(unparsedEntityDeclSAXFunc)
    792      d  setDocumentLocator...
    793      d                                     like(setDocumentLocatorSAXFunc)
    794      d  startDocument                      like(startDocumentSAXFunc)
    795      d  endDocument                        like(endDocumentSAXFunc)
    796      d  startElement                       like(startElementSAXFunc)
    797      d  endElement                         like(endElementSAXFunc)
    798      d  reference                          like(referenceSAXFunc)
    799      d  characters                         like(charactersSAXFunc)
    800      d  ignorableWhitespace...
    801      d                                     like(ignorableWhitespaceSAXFunc)
    802      d  processingInstruction...
    803      d                                     like(processingInstructionSAXFunc)
    804      d  comment                            like(commentSAXFunc)
    805      d  warning                            like(warningSAXFunc)
    806      d  error                              like(errorSAXFunc)
    807      d  fatalError                         like(fatalErrorSAXFunc)
    808      d  getParameterEntity...
    809      d                                     like(getParameterEntitySAXFunc)
    810      d  cdataBlock                         like(cdataBlockSAXFunc)
    811      d  externalSubset...
    812      d                                     like(externalSubsetSAXFunc)
    813      d  initialized                  10u 0
    814 
    815       * xmlExternalEntityLoader:
    816       * @URL: The System ID of the resource requested
    817       * @ID: The Public ID of the resource requested
    818       * @context: the XML parser context
    819       *
    820       * External entity loaders types.
    821       *
    822       * Returns the entity input parser.
    823 
    824      d xmlExternalEntityLoader...
    825      d                 s               *   based(######typedef######)
    826      d                                     procptr
    827 
    828       /include "libxmlrpg/encoding"
    829       /include "libxmlrpg/xmlIO"
    830       /include "libxmlrpg/globals"
    831 
    832       * Init/Cleanup
    833 
    834      d xmlInitParser   pr                  extproc('xmlInitParser')
    835 
    836      d xmlCleanupParser...
    837      d                 pr                  extproc('xmlCleanupParser')
    838 
    839       * Input functions
    840 
    841      d xmlParserInputRead...
    842      d                 pr            10i 0 extproc('xmlParserInputRead')
    843      d  in                                 value like(xmlParserInputPtr)
    844      d  len                          10i 0 value
    845 
    846      d xmlParserInputGrow...
    847      d                 pr            10i 0 extproc('xmlParserInputGrow')
    848      d  in                                 value like(xmlParserInputPtr)
    849      d  len                          10i 0 value
    850 
    851       * Basic parsing Interfaces
    852 
    853       /if defined(LIBXML_SAX1_ENABLED)
    854      d xmlParseDoc     pr                  extproc('xmlParseDoc')
    855      d                                     like(xmlDocPtr)
    856      d  cur                            *   value options(*string)               const xmlChar *
    857 
    858      d xmlParseFile    pr                  extproc('xmlParseFile')
    859      d                                     like(xmlDocPtr)
    860      d  filename                       *   value options(*string)               const char *
    861 
    862      d xmlParseMemory  pr                  extproc('xmlParseMemory')
    863      d                                     like(xmlDocPtr)
    864      d  buffer                         *   value options(*string)               const char *
    865      d  size                         10i 0 value
    866       /endif                                                                    LIBXML_SAX1_ENABLED
    867 
    868      d xmlSubstituteEntitiesDefault...
    869      d                 pr            10i 0 extproc(
    870      d                                      'xmlSubstituteEntitiesDefault')
    871      d  val                          10i 0 value
    872 
    873      d xmlKeepBlanksDefault...
    874      d                 pr            10i 0 extproc('xmlKeepBlanksDefault')
    875      d  val                          10i 0 value
    876 
    877      d xmlStopParser   pr                  extproc('xmlStopParser')
    878      d  ctxt                               value like(xmlParserCtxtPtr)
    879 
    880      d xmlPedanticParserDefault...
    881      d                 pr            10i 0 extproc('xmlPedanticParserDefault')
    882      d  val                          10i 0 value
    883 
    884      d xmlLineNumbersDefault...
    885      d                 pr            10i 0 extproc('xmlLineNumbersDefault')
    886      d  val                          10i 0 value
    887 
    888       /if defined(LIBXML_SAX1_ENABLED)
    889       * Recovery mode
    890 
    891      d xmlRecoverDoc   pr                  extproc('xmlRecoverDoc')
    892      d                                     like(xmlDocPtr)
    893      d  cur                            *   value options(*string)               const xmlChar *
    894 
    895      d xmlRecoverMemory...
    896      d                 pr                  extproc('xmlRecoverMemory')
    897      d                                     like(xmlDocPtr)
    898      d  buffer                         *   value options(*string)               const char *
    899      d  size                         10i 0 value
    900 
    901      d xmlRecoverFile  pr                  extproc('xmlRecoverFile')
    902      d                                     like(xmlDocPtr)
    903      d  filename                       *   value options(*string)               const char *
    904       /endif                                                                    LIBXML_SAX1_ENABLED
    905 
    906       * Less common routines and SAX interfaces
    907 
    908      d xmlParseDocument...
    909      d                 pr            10i 0 extproc('xmlParseDocument')
    910      d  ctxt                               value like(xmlParserCtxtPtr)
    911 
    912      d xmlParseExtParsedEnt...
    913      d                 pr            10i 0 extproc('xmlParseExtParsedEnt')
    914      d  ctxt                               value like(xmlParserCtxtPtr)
    915 
    916       /if defined(LIBXML_SAX1_ENABLED)
    917      d xmlSAXUserParseFile...
    918      d                 pr            10i 0 extproc('xmlSAXUserParseFile')
    919      d  sax                                value like(xmlSAXHandlerPtr)
    920      d  user_data                      *   value                                void *
    921      d  filename                       *   value options(*string)               const char *
    922 
    923      d xmlSAXUserParseMemory...
    924      d                 pr            10i 0 extproc('xmlSAXUserParseMemory')
    925      d  sax                                value like(xmlSAXHandlerPtr)
    926      d  user_data                      *   value                                void *
    927      d  buffer                         *   value options(*string)               const char *
    928      d  size                         10i 0 value
    929 
    930      d xmlSAXParseDoc  pr                  extproc('xmlSAXParseDoc')
    931      d                                     like(xmlDocPtr)
    932      d  sax                                value like(xmlSAXHandlerPtr)
    933      d  cur                            *   value options(*string)               const xmlChar *
    934      d  recovery                     10i 0 value
    935 
    936      d xmlSAXParseMemory...
    937      d                 pr                  extproc('xmlSAXParseMemory')
    938      d                                     like(xmlDocPtr)
    939      d  sax                                value like(xmlSAXHandlerPtr)
    940      d  buffer                         *   value options(*string)               const char *
    941      d  size                         10i 0 value
    942      d  recovery                     10i 0 value
    943 
    944      d xmlSAXParseMemoryWithData...
    945      d                 pr                  extproc('xmlSAXParseMemoryWithData')
    946      d                                     like(xmlDocPtr)
    947      d  sax                                value like(xmlSAXHandlerPtr)
    948      d  buffer                         *   value options(*string)               const char *
    949      d  size                         10i 0 value
    950      d  recovery                     10i 0 value
    951      d  data                           *   value                                void *
    952 
    953      d xmlSAXParseFile...
    954      d                 pr                  extproc('xmlSAXParseFile')
    955      d                                     like(xmlDocPtr)
    956      d  sax                                value like(xmlSAXHandlerPtr)
    957      d  filename                       *   value options(*string)               const char *
    958      d  recovery                     10i 0 value
    959 
    960      d xmlSAXParseFileWithData...
    961      d                 pr                  extproc('xmlSAXParseFileWithData')
    962      d                                     like(xmlDocPtr)
    963      d  sax                                value like(xmlSAXHandlerPtr)
    964      d  filename                       *   value options(*string)               const char *
    965      d  recovery                     10i 0 value
    966      d  data                           *   value                                void *
    967 
    968      d xmlSAXParseEntity...
    969      d                 pr                  extproc('xmlSAXParseEntity')
    970      d                                     like(xmlDocPtr)
    971      d  sax                                value like(xmlSAXHandlerPtr)
    972      d  filename                       *   value options(*string)               const char *
    973 
    974      d xmlParseEntity...
    975      d                 pr                  extproc('xmlParseEntity')
    976      d                                     like(xmlDocPtr)
    977      d  filename                       *   value options(*string)               const char *
    978       /endif                                                                    LIBXML_SAX1_ENABLED
    979 
    980       /if defined(LIBXML_VALID_ENABLED)
    981      d xmlSAXParseDTD  pr                  extproc('xmlSAXParseDTD')
    982      d                                     like(xmlDtdPtr)
    983      d  sax                                value like(xmlSAXHandlerPtr)
    984      d  ExternalID                     *   value options(*string)               const xmlChar *
    985      d  SystemID                       *   value options(*string)               const xmlChar *
    986 
    987      d xmlParseDTD     pr                  extproc('xmlParseDTD')
    988      d                                     like(xmlDtdPtr)
    989      d  ExternalID                     *   value options(*string)               const xmlChar *
    990      d  SystemID                       *   value options(*string)               const xmlChar *
    991 
    992      d xmlIOParseDTD   pr                  extproc('xmlIOParseDTD')
    993      d                                     like(xmlDtdPtr)
    994      d  sax                                value like(xmlSAXHandlerPtr)
    995      d  input                              value like(xmlParserInputBufferPtr)
    996      d  enc                                value like(xmlCharEncoding)
    997       /endif                                                                    LIBXML_VALID_ENABLED
    998 
    999       /if defined(LIBXML_SAX1_ENABLED)
   1000      d xmlParseBalancedChunkMemory...
   1001      d                 pr            10i 0 extproc(
   1002      d                                      'xmlParseBalancedChunkMemory')
   1003      d  doc                                value like(xmlDocPtr)
   1004      d  sax                                value like(xmlSAXHandlerPtr)
   1005      d  user_data                      *   value                                void *
   1006      d  depth                        10i 0 value
   1007      d  user_data                      *   value                                void *
   1008      d  string                         *   value options(*string)               const xmlChar *
   1009      d  lst                            *   value                                xmlNodePtr *
   1010       /endif                                                                    LIBXML_SAX1_ENABLED
   1011 
   1012      d xmlParseInNodeContext...
   1013      d                 pr                  extproc('xmlParseInNodeContext')
   1014      d                                     like(xmlParserErrors)
   1015      d  node                               value like(xmlNodePtr)
   1016      d  data                           *   value options(*string)               const char *
   1017      d  datalen                      10i 0 value
   1018      d  options                      10i 0 value
   1019      d  lst                            *   value                                xmlNodePtr *
   1020 
   1021       /if defined(LIBXML_SAX1_ENABLED)
   1022      d xmlParseBalancedChunkMemoryRecover...
   1023      d                 pr            10i 0 extproc(
   1024      d                                     'xmlParseBalancedChunkMemoryRecover')
   1025      d  doc                                value like(xmlDocPtr)
   1026      d  sax                                value like(xmlSAXHandlerPtr)
   1027      d  user_data                      *   value                                void *
   1028      d  depth                        10i 0 value
   1029      d  string                         *   value options(*string)               const xmlChar *
   1030      d  lst                            *   value                                xmlNodePtr *
   1031      d  recover                      10i 0 value
   1032 
   1033      d xmlParseExternalEntity...
   1034      d                 pr            10i 0 extproc('xmlParseExternalEntity')
   1035      d  doc                                value like(xmlDocPtr)
   1036      d  sax                                value like(xmlSAXHandlerPtr)
   1037      d  user_data                      *   value                                void *
   1038      d  depth                        10i 0 value
   1039      d  URL                            *   value options(*string)               const xmlChar *
   1040      d  ID                             *   value options(*string)               const xmlChar *
   1041      d  lst                            *   value                                xmlNodePtr *
   1042       /endif                                                                    LIBXML_SAX1_ENABLED
   1043 
   1044      d xmlParseCtxtExternalEntity...
   1045      d                 pr            10i 0 extproc('xmlParseCtxtExternalEntity')
   1046      d  sax                                value like(xmlSAXHandlerPtr)
   1047      d  URL                            *   value options(*string)               const xmlChar *
   1048      d  ID                             *   value options(*string)               const xmlChar *
   1049      d  lst                            *   value                                xmlNodePtr *
   1050 
   1051       * Parser contexts handling.
   1052 
   1053      d xmlNewParserCtxt...
   1054      d                 pr                  extproc('xmlNewParserCtxt')
   1055      d                                     like(xmlParserCtxtPtr)
   1056 
   1057      d xmlInitParserCtxt...
   1058      d                 pr            10i 0 extproc('xmlInitParserCtxt')
   1059      d  ctxt                               value like(xmlParserCtxtPtr)
   1060 
   1061      d xmlClearParserCtxt...
   1062      d                 pr                  extproc('xmlClearParserCtxt')
   1063      d  ctxt                               value like(xmlParserCtxtPtr)
   1064 
   1065      d xmlFreeParserCtxt...
   1066      d                 pr                  extproc('xmlFreeParserCtxt')
   1067      d  ctxt                               value like(xmlParserCtxtPtr)
   1068 
   1069       /if defined(LIBXML_SAX1_ENABLED)
   1070      d xmlSetupParserForBuffer...
   1071      d                 pr                  extproc('xmlSetupParserForBuffer')
   1072      d  ctxt                               value like(xmlParserCtxtPtr)
   1073      d  buffer                         *   value options(*string)               const xmlChar *
   1074      d  filename                       *   value options(*string)               const char *
   1075       /endif                                                                    LIBXML_SAX1_ENABLED
   1076 
   1077      d xmlCreateDocParserCtxt...
   1078      d                 pr                  extproc('xmlCreateDocParserCtxt')
   1079      d                                     like(xmlParserCtxtPtr)
   1080      d  cur                            *   value options(*string)               const xmlChar *
   1081 
   1082       /if defined(LIBXML_LEGACY_ENABLED)
   1083       * Reading/setting optional parsing features.
   1084 
   1085      d xmlGetFeaturesList...
   1086      d                 pr            10i 0 extproc('xmlGetFeaturesList')
   1087      d  len                          10i 0
   1088      d  result                         *                                        const char *(*)
   1089 
   1090      d xmlGetFeature   pr            10i 0 extproc('xmlGetFeature')
   1091      d  ctxt                               value like(xmlParserCtxtPtr)
   1092      d  name                           *   value options(*string)               const char *
   1093      d  result                         *   value                                void *
   1094 
   1095      d xmlSetFeature   pr            10i 0 extproc('xmlSetFeature')
   1096      d  ctxt                               value like(xmlParserCtxtPtr)
   1097      d  name                           *   value options(*string)               const char *
   1098      d  result                         *   value                                void *
   1099       /endif                                                                    LIBXML_LEGACY_ENABLD
   1100 
   1101       /if defined(LIBXML_PUSH_ENABLED)
   1102       * Interfaces for the Push mode.
   1103 
   1104      d xmlCreatePushParserCtxt...
   1105      d                 pr                  extproc('xmlCreatePushParserCtxt')
   1106      d                                     like(xmlParserCtxtPtr)
   1107      d  sax                                value like(xmlSAXHandlerPtr)
   1108      d  user_data                      *   value                                void *
   1109      d  chunk                          *   value options(*string)               const char *
   1110      d  size                         10i 0 value
   1111      d  filename                       *   value options(*string)               const char *
   1112 
   1113      d xmlParseChunk   pr            10i 0 extproc('xmlParseChunk')
   1114      d  ctxt                               value like(xmlParserCtxtPtr)
   1115      d  chunk                          *   value options(*string)               const char *
   1116      d  size                         10i 0 value
   1117      d  terminate                    10i 0 value
   1118       /endif                                                                    LIBXML_PUSH_ENABLED
   1119 
   1120       * Special I/O mode.
   1121 
   1122      d xmlCreateIOParserCtxt...
   1123      d                 pr                  extproc('xmlCreateIOParserCtxt')
   1124      d                                     like(xmlParserCtxtPtr)
   1125      d  sax                                value like(xmlSAXHandlerPtr)
   1126      d  user_data                      *   value                                void *
   1127      d  ioread                             value like(xmlInputReadCallback)
   1128      d  ioclose                            value like(xmlInputCloseCallback)
   1129      d  ioctx                          *   value                                void *
   1130      d  enc                                value like(xmlCharEncoding)
   1131 
   1132      d xmlNewIOInputStream...
   1133      d                 pr                  extproc('xmlNewIOInputStream')
   1134      d                                     like(xmlParserInputPtr)
   1135      d  ctxt                               value like(xmlParserCtxtPtr)
   1136      d  input                              value like(xmlParserInputBufferPtr)
   1137      d  enc                                value like(xmlCharEncoding)
   1138 
   1139       * Node infos.
   1140 
   1141      d xmlParserFindNodeInfo...
   1142      d                 pr              *   extproc('xmlParserFindNodeInfo')     xmlParserNodeInfo *
   1143      d  ctxt                               value like(xmlParserCtxtPtr)
   1144      d  node                               value like(xmlNodePtr)               const
   1145 
   1146      d xmlInitNodeInfoSeq...
   1147      d                 pr                  extproc('xmlInitNodeInfoSeq')
   1148      d  seq                                value like(xmlParserNodeInfoSeqPtr)
   1149 
   1150      d xmlClearNodeInfoSeq...
   1151      d                 pr                  extproc('xmlClearNodeInfoSeq')
   1152      d  seq                                value like(xmlParserNodeInfoSeqPtr)
   1153 
   1154      d xmlParserFindNodeInfoIndex...
   1155      d                 pr                  extproc('xmlParserFindNodeInfoIndex')
   1156      d                                     like(xmlCulong)
   1157      d  seq                                value like(xmlParserNodeInfoSeqPtr)
   1158      d  node                               value like(xmlNodePtr)               const
   1159 
   1160      d xmlParserAddNodeInfo...
   1161      d                 pr                  extproc('xmlParserAddNodeInfo')
   1162      d  ctxt                               value like(xmlParserCtxtPtr)
   1163      d  info                               value like(xmlParserNodeInfoPtr)     const
   1164 
   1165       * External entities handling actually implemented in xmlIO.
   1166 
   1167      d xmlSetExternalEntityLoader...
   1168      d                 pr                  extproc('xmlSetExternalEntityLoader')
   1169      d  f                                  value like(xmlExternalEntityLoader)
   1170 
   1171      d xmlGetExternalEntityLoader...
   1172      d                 pr                  extproc('xmlGetExternalEntityLoader')
   1173      d                                     like(xmlExternalEntityLoader)
   1174 
   1175      d xmlLoadExternalEntity...
   1176      d                 pr                  extproc('xmlLoadExternalEntity')
   1177      d                                     like(xmlParserInputPtr)
   1178      d  URL                            *   value options(*string)               const char *
   1179      d  ID                             *   value options(*string)               const char *
   1180      d  ctxt                               value like(xmlParserCtxtPtr)
   1181 
   1182       * Index lookup, actually implemented in the encoding module
   1183 
   1184      d xmlByteConsumed...
   1185      d                 pr                  extproc('xmlByteConsumed')
   1186      d                                     like(xmlClong)
   1187      d  ctxt                               value like(xmlParserCtxtPtr)
   1188 
   1189       * New set of simpler/more flexible APIs
   1190 
   1191       * xmlParserOption:
   1192       *
   1193       * This is the set of XML parser options that can be passed down
   1194       * to the xmlReadDoc() and similar calls.
   1195 
   1196      d xmlParserOption...
   1197      d                 s             10i 0 based(######typedef######)           enum
   1198      d  XML_PARSE_RECOVER...                                                    Recover on errors
   1199      d                 c                   X'00000001'
   1200      d  XML_PARSE_NOENT...                                                      Substitute entities
   1201      d                 c                   X'00000002'
   1202      d  XML_PARSE_DTDLOAD...                                                    Load external subset
   1203      d                 c                   X'00000004'
   1204      d  XML_PARSE_DTDATTR...                                                    Default DTD attrs
   1205      d                 c                   X'00000008'
   1206      d  XML_PARSE_DTDVALID...                                                   Validate with DTD
   1207      d                 c                   X'00000010'
   1208      d  XML_PARSE_NOERROR...                                                    Suppress err reports
   1209      d                 c                   X'00000020'
   1210      d  XML_PARSE_NOWARNING...                                                  Suppr warn reports
   1211      d                 c                   X'00000040'
   1212      d  XML_PARSE_PEDANTIC...                                                   Pedantic err report
   1213      d                 c                   X'00000080'
   1214      d  XML_PARSE_NOBLANKS...                                                   Remove blank nodes
   1215      d                 c                   X'00000100'
   1216      d  XML_PARSE_SAX1...                                                       Use SAX1 internally
   1217      d                 c                   X'00000200'
   1218      d  XML_PARSE_XINCLUDE...                                                   Impl XInclude subst
   1219      d                 c                   X'00000400'
   1220      d  XML_PARSE_NONET...                                                      Forbid netwrk access
   1221      d                 c                   X'00000800'
   1222      d  XML_PARSE_NODICT...                                                     No contxt dict reuse
   1223      d                 c                   X'00001000'
   1224      d  XML_PARSE_NSCLEAN...                                                    Rmv redndnt ns decls
   1225      d                 c                   X'00002000'
   1226      d  XML_PARSE_NOCDATA...                                                    CDATA as text nodes
   1227      d                 c                   X'00004000'
   1228      d  XML_PARSE_NOXINCNODE...                                                 No XINCL START/END
   1229      d                 c                   X'00008000'
   1230      d  XML_PARSE_COMPACT...                                                    Compact text nodes
   1231      d                 c                   X'00010000'
   1232      d  XML_PARSE_OLD10...                                                      B4 upd5 compatible
   1233      d                 c                   X'00020000'
   1234      d  XML_PARSE_NOBASEFIX...                                                  No XINC xml:base fix
   1235      d                 c                   X'00040000'
   1236      d  XML_PARSE_HUGE...                                                       No parsing limit
   1237      d                 c                   X'00080000'
   1238      d  XML_PARSE_OLDSAX...                                                     Use SAX2 b4 2.7.0
   1239      d                 c                   X'00100000'
   1240      d  XML_PARSE_IGNORE_ENC...                                                 No int doc code hint
   1241      d                 c                   X'00200000'
   1242      d  XML_PARSE_BIG_LINES...                                                  Big line#-->PSVI fld
   1243      d                 c                   X'00400000'
   1244 
   1245      d xmlCtxtReset    pr                  extproc('xmlCtxtReset')
   1246      d  ctxt                               value like(xmlParserCtxtPtr)
   1247 
   1248      d xmlCtxtResetPush...
   1249      d                 pr            10i 0 extproc('xmlCtxtResetPush')
   1250      d  ctxt                               value like(xmlParserCtxtPtr)
   1251      d  chunk                          *   value options(*string)               const char *
   1252      d  size                         10i 0 value
   1253      d  filename                       *   value options(*string)               const char *
   1254      d  encoding                       *   value options(*string)               const char *
   1255 
   1256      d xmlCtxtUseOptions...
   1257      d                 pr            10i 0 extproc('xmlCtxtUseOptions')
   1258      d  ctxt                               value like(xmlParserCtxtPtr)
   1259      d  options                      10i 0 value
   1260 
   1261      d xmlReadDoc      pr                  extproc('xmlReadDoc')
   1262      d                                     like(xmlDocPtr)
   1263      d  cur                            *   value options(*string)               const xmlChar *
   1264      d  URL                            *   value options(*string)               const char *
   1265      d  encoding                       *   value options(*string)               const char *
   1266      d  options                      10i 0 value
   1267 
   1268      d xmlReadFile     pr                  extproc('xmlReadFile')
   1269      d                                     like(xmlDocPtr)
   1270      d  URL                            *   value options(*string)               const char *
   1271      d  encoding                       *   value options(*string)               const char *
   1272      d  options                      10i 0 value
   1273 
   1274      d xmlReadMemory   pr                  extproc('xmlReadMemory')
   1275      d                                     like(xmlDocPtr)
   1276      d  buffer                         *   value options(*string)               const char *
   1277      d  size                         10i 0 value
   1278      d  URL                            *   value options(*string)               const char *
   1279      d  encoding                       *   value options(*string)               const char *
   1280      d  options                      10i 0 value
   1281 
   1282      d xmlReadFd       pr                  extproc('xmlReadFd')
   1283      d                                     like(xmlDocPtr)
   1284      d  fd                           10i 0 value
   1285      d  URL                            *   value options(*string)               const char *
   1286      d  encoding                       *   value options(*string)               const char *
   1287      d  options                      10i 0 value
   1288 
   1289      d xmlReadIO       pr                  extproc('xmlReadIO')
   1290      d                                     like(xmlDocPtr)
   1291      d  ioread                             value like(xmlInputReadCallback)
   1292      d  ioclose                            value like(xmlInputCloseCallback)
   1293      d  ioctx                          *   value                                void *
   1294      d  URL                            *   value options(*string)               const char *
   1295      d  encoding                       *   value options(*string)               const char *
   1296      d  options                      10i 0 value
   1297 
   1298      d xmlCtxtReadDoc  pr                  extproc('xmlCtxtReadDoc')
   1299      d                                     like(xmlDocPtr)
   1300      d  ctxt                               value like(xmlParserCtxtPtr)
   1301      d  cur                            *   value options(*string)               const xmlChar *
   1302      d  URL                            *   value options(*string)               const char *
   1303      d  encoding                       *   value options(*string)               const char *
   1304      d  options                      10i 0 value
   1305 
   1306      d xmlCtxtReadFile...
   1307      d                 pr                  extproc('xmlCtxtReadFile')
   1308      d                                     like(xmlDocPtr)
   1309      d  ctxt                               value like(xmlParserCtxtPtr)
   1310      d  filename                       *   value options(*string)               const char *
   1311      d  encoding                       *   value options(*string)               const char *
   1312      d  options                      10i 0 value
   1313 
   1314      d xmlCtxtReadMemory...
   1315      d                 pr                  extproc('xmlCtxtReadMemory')
   1316      d                                     like(xmlDocPtr)
   1317      d  ctxt                               value like(xmlParserCtxtPtr)
   1318      d  buffer                         *   value options(*string)               const char *
   1319      d  size                         10i 0 value
   1320      d  URL                            *   value options(*string)               const char *
   1321      d  encoding                       *   value options(*string)               const char *
   1322      d  options                      10i 0 value
   1323 
   1324      d xmlCtxtReadFd   pr                  extproc('xmlCtxtReadFd')
   1325      d                                     like(xmlDocPtr)
   1326      d  ctxt                               value like(xmlParserCtxtPtr)
   1327      d  fd                           10i 0 value
   1328      d  URL                            *   value options(*string)               const char *
   1329      d  encoding                       *   value options(*string)               const char *
   1330      d  options                      10i 0 value
   1331 
   1332      d xmlCtxtReadIO   pr                  extproc('xmlCtxtReadIO')
   1333      d                                     like(xmlDocPtr)
   1334      d  ctxt                               value like(xmlParserCtxtPtr)
   1335      d  ioread                             value like(xmlInputReadCallback)
   1336      d  ioclose                            value like(xmlInputCloseCallback)
   1337      d  ioctx                          *   value                                void *
   1338      d  URL                            *   value options(*string)               const char *
   1339      d  encoding                       *   value options(*string)               const char *
   1340      d  options                      10i 0 value
   1341 
   1342       * Library wide options
   1343 
   1344       * xmlFeature:
   1345       *
   1346       * Used to examine the existance of features that can be enabled
   1347       * or disabled at compile-time.
   1348       * They used to be called XML_FEATURE_xxx but this clashed with Expat
   1349 
   1350      d xmlFeature      s             10i 0 based(######typedef######)           enum
   1351      d  XML_WITH_THREAD...
   1352      d                 c                   1
   1353      d  XML_WITH_TREE  c                   2
   1354      d  XML_WITH_OUTPUT...
   1355      d                 c                   3
   1356      d  XML_WITH_PUSH  c                   4
   1357      d  XML_WITH_READER...
   1358      d                 c                   5
   1359      d  XML_WITH_PATTERN...
   1360      d                 c                   6
   1361      d  XML_WITH_WRITER...
   1362      d                 c                   7
   1363      d  XML_WITH_SAX1  c                   8
   1364      d  XML_WITH_FTP   c                   9
   1365      d  XML_WITH_HTTP  c                   10
   1366      d  XML_WITH_VALID...
   1367      d                 c                   11
   1368      d  XML_WITH_HTML  c                   12
   1369      d  XML_WITH_LEGACY...
   1370      d                 c                   13
   1371      d  XML_WITH_C14N  c                   14
   1372      d  XML_WITH_CATALOG...
   1373      d                 c                   15
   1374      d  XML_WITH_XPATH...
   1375      d                 c                   16
   1376      d  XML_WITH_XPTR  c                   17
   1377      d  XML_WITH_XINCLUDE...
   1378      d                 c                   18
   1379      d  XML_WITH_ICONV...
   1380      d                 c                   19
   1381      d  XML_WITH_ISO8859X...
   1382      d                 c                   20
   1383      d  XML_WITH_UNICODE...
   1384      d                 c                   21
   1385      d  XML_WITH_REGEXP...
   1386      d                 c                   22
   1387      d  XML_WITH_AUTOMATA...
   1388      d                 c                   23
   1389      d  XML_WITH_EXPR  c                   24
   1390      d  XML_WITH_SCHEMAS...
   1391      d                 c                   25
   1392      d  XML_WITH_SCHEMATRON...
   1393      d                 c                   26
   1394      d  XML_WITH_MODULES...
   1395      d                 c                   27
   1396      d  XML_WITH_DEBUG...
   1397      d                 c                   28
   1398      d  XML_WITH_DEBUG_MEM...
   1399      d                 c                   29
   1400      d  XML_WITH_DEBUG_RUN...
   1401      d                 c                   30
   1402      d  XML_WITH_ZLIB  c                   31
   1403      d  XML_WITH_ICU   c                   32
   1404      d  XML_WITH_LZMA  c                   33
   1405      d  XML_WITH_NONE  c                   99999
   1406 
   1407      d xmlHasFeature   pr            10i 0 extproc('xmlHasFeature')
   1408      d  feature                            value like(xmlFeature)
   1409 
   1410       /endif                                                                    XML_PARSER_H__
   1411