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