Home | History | Annotate | Download | only in libxmlrpg
      1       * Summary: interface for the XML entities handling
      2       * Description: this module provides some of the entity API needed
      3       *              for the parser and applications.
      4       *
      5       * Copy: See Copyright for the status of this software.
      6       *
      7       * Author: Patrick Monnerat <pm (a] datasphere.ch>, DATASPHERE S.A.
      8 
      9       /if not defined(XML_ENTITIES_H__)
     10       /define XML_ENTITIES_H__
     11 
     12       /include "libxmlrpg/xmlversion"
     13       /include "libxmlrpg/tree"
     14 
     15       * The different valid entity types.
     16 
     17      d xmlEntityType   s             10i 0 based(######typedef######)           enum
     18      d  XML_INTERNAL_GENERAL_ENTITY...
     19      d                 c                   1
     20      d  XML_EXTERNAL_GENERAL_PARSED_ENTITY...
     21      d                 c                   2
     22      d  XML_EXTERNAL_GENERAL_UNPARSED_ENTITY...
     23      d                 c                   3
     24      d  XML_INTERNAL_PARAMETER_ENTITY...
     25      d                 c                   4
     26      d  XML_EXTERNAL_PARAMETER_ENTITY...
     27      d                 c                   5
     28      d  XML_INTERNAL_PREDEFINED_ENTITY...
     29      d                 c                   6
     30 
     31       * An unit of storage for an entity, contains the string, the value
     32       * and the linkind data needed for the linking in the hash table.
     33 
     34      d xmlEntity       ds                  based(xmlEntityPtr)
     35      d                                     align qualified
     36      d  #private                       *                                        void *
     37      d  type                               like(xmlElementType)                 XML_ENTITY_DECL
     38      d  name                           *                                        const xmlChar *
     39      d  children                           like(xmlNodePtr)                     First child link
     40      d  last                               like(xmlNodePtr)                     Last child link
     41      d  parent                             like(xmlDtdPtr)                      -> DTD
     42      d  next                               like(xmlNodePtr)                     next sibling link
     43      d  prev                               like(xmlNodePtr)                     prev sibling link
     44      d  doc                                like(xmlDocPtr)                      containing document
     45      d  orig                           *                                        xmlChar *
     46      d  content                        *                                        xmlChar *
     47      d  length                       10i 0                                      content length
     48      d  etype                              like(xmlEntityType)                  The entity type
     49      d  ExternalID                     *                                        const xmlChar *
     50      d  SystemlID                      *                                        const xmlChar *
     51      d  nexte                              like(xmlEntityPtr)                   unused
     52      d  URI                            *                                        const xmlChar *
     53      d  owner                        10i 0                                      Owns children ?
     54      d  checked                      10i 0                                      Content checked ?
     55 
     56       * All entities are stored in an hash table.
     57       * There is 2 separate hash tables for global and parameter entities.
     58 
     59      d xmlEntitiesTablePtr...
     60      d                 s               *   based(######typedef######)
     61 
     62       * External functions:
     63 
     64       /if defined(LIBXML_LEGACY_ENABLED)
     65      d xmlInitializePredefinedEntities...
     66      d                 pr                  extproc(
     67      d                                      'xmlInitializePredefinedEntities')
     68       /endif                                                                    LIBXML_LEGACY_ENABLD
     69 
     70      d xmlNewEntity    pr                  extproc('xmlNewEntity')
     71      d                                     like(xmlEntityPtr)
     72      d  doc                                value like(xmlDocPtr)
     73      d  name                           *   value options(*string)               const xmlChar *
     74      d  type                         10i 0 value
     75      d  ExternalID                     *   value options(*string)               const xmlChar *
     76      d  SystemID                       *   value options(*string)               const xmlChar *
     77      d  content                        *   value options(*string)               const xmlChar *
     78 
     79      d xmlAddDocEntity...
     80      d                 pr                  extproc('xmlAddDocEntity')
     81      d                                     like(xmlEntityPtr)
     82      d  doc                                value like(xmlDocPtr)
     83      d  name                           *   value options(*string)               const xmlChar *
     84      d  type                         10i 0 value
     85      d  ExternalID                     *   value options(*string)               const xmlChar *
     86      d  SystemID                       *   value options(*string)               const xmlChar *
     87      d  content                        *   value options(*string)               const xmlChar *
     88 
     89      d xmlAddDtdEntity...
     90      d                 pr                  extproc('xmlAddDtdEntity')
     91      d                                     like(xmlEntityPtr)
     92      d  doc                                value like(xmlDocPtr)
     93      d  name                           *   value options(*string)               const xmlChar *
     94      d  type                         10i 0 value
     95      d  ExternalID                     *   value options(*string)               const xmlChar *
     96      d  SystemID                       *   value options(*string)               const xmlChar *
     97      d  content                        *   value options(*string)               const xmlChar *
     98 
     99      d xmlGetPredefinedEntity...
    100      d                 pr                  extproc('xmlGetPredefinedEntity')
    101      d                                     like(xmlEntityPtr)
    102      d  name                           *   value options(*string)               const xmlChar *
    103 
    104      d xmlGetDocEntity...
    105      d                 pr                  extproc('xmlGetDocEntity')
    106      d                                     like(xmlEntityPtr)
    107      d  doc                                value like(xmlDocPtr)
    108      d  name                           *   value options(*string)               const xmlChar *
    109 
    110      d xmlGetDtdEntity...
    111      d                 pr                  extproc('xmlGetDtdEntity')
    112      d                                     like(xmlEntityPtr)
    113      d  doc                                value like(xmlDocPtr)
    114      d  name                           *   value options(*string)               const xmlChar *
    115 
    116      d xmlGetParameterEntity...
    117      d                 pr                  extproc('xmlGetParameterEntity')
    118      d                                     like(xmlEntityPtr)
    119      d  doc                                value like(xmlDocPtr)
    120      d  name                           *   value options(*string)               const xmlChar *
    121 
    122 
    123       /if defined(LIBXML_LEGACY_ENABLED)
    124      d xmlEncodeEntities...
    125      d                 pr              *   extproc('xmlEncodeEntities')         xmlChar *
    126      d  doc                                value like(xmlDocPtr)
    127      d  input                          *   value options(*string)               const xmlChar *
    128       /endif                                                                    LIBXML_LEGACY_ENABLD
    129 
    130      d xmlEncodeEntitiesReentrant...
    131      d                 pr              *   extproc(                             xmlChar *
    132      d                                      'xmlEncodeEntitiesReentrant')
    133      d  doc                                value like(xmlDocPtr)
    134      d  input                          *   value options(*string)               const xmlChar *
    135 XMLPU
    136      d xmlEncodeSpecialChars...
    137      d                 pr              *   extproc('xmlSpecialChars')           xmlChar *
    138      d  doc                                value like(xmlDocPtr)
    139      d  input                          *   value options(*string)               const xmlChar *
    140 XMLPU
    141      d xmlCreateEntitiesTable...
    142      d                 pr                  extproc('xmlCreateEntitiesTable')
    143      d                                     like(xmlEntitiesTablePtr)
    144 
    145       /if defined(LIBXML_TREE_ENABLED)
    146      d xmlCopyEntitiesTable...
    147      d                 pr                  extproc('xmlCopyEntitiesTable')
    148      d                                     like(xmlEntitiesTablePtr)
    149      d  table                              value like(xmlEntitiesTablePtr)
    150       /endif                                                                    LIBXML_TREE_ENABLED
    151 
    152      d xmlFreeEntitiesTable...
    153      d                 pr                  extproc('xmlFreeEntitiesTable')
    154      d  table                              value like(xmlEntitiesTablePtr)
    155 XMLPU
    156       /if defined(LIBXML_OUTPUT_ENABLED)
    157      d xmlDumpEntitiesTable...
    158      d                 pr                  extproc('xmlDumpEntitiesTable')
    159      d  buf                                value like(xmlBufferPtr)
    160      d  table                              value like(xmlEntitiesTablePtr)
    161 XMLPU
    162      d xmlDumpEntityDecl...
    163      d                 pr                  extproc('xmlDumpEntityDecl')
    164      d  buf                                value like(xmlBufferPtr)
    165      d  ent                                value like(xmlEntityPtr)
    166       /endif                                                                    LIBXML_OUTPUT_ENABLD
    167 
    168       /if defined(LIBXML_LEGACY_ENABLED)
    169      d xmlCleanupPredefinedEntities...
    170      d                 pr                  extproc(
    171 XMLPUd                                      'xmlCleanupPredefinedEntities')
    172       /endif                                                                    LIBXML_LEGACY_ENABLD
    173 
    174       /endif                                                                    XML_ENTITIES_H__
    175