1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/libxml2/libxml2_entities.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,143 @@
1.4 +/*
1.5 + * Summary: interface for the XML entities handling
1.6 + * Description: this module provides some of the entity API needed
1.7 + * for the parser and applications.
1.8 + *
1.9 + * Copy: See Copyright for the status of this software.
1.10 + *
1.11 + * Author: Daniel Veillard
1.12 + * Portion Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
1.13 + */
1.14 +
1.15 +/** @file
1.16 +@publishedAll
1.17 +@released
1.18 +*/
1.19 +
1.20 +#ifndef XML_ENTITIES_H
1.21 +#define XML_ENTITIES_H
1.22 +
1.23 +#include <stdapis/libxml2/libxml2_tree.h>
1.24 +
1.25 +#ifdef __cplusplus
1.26 +extern "C" {
1.27 +#endif
1.28 +
1.29 +/*
1.30 + * The different valid entity types.
1.31 + */
1.32 +typedef enum {
1.33 + XML_INTERNAL_GENERAL_ENTITY = 1,
1.34 + XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2,
1.35 + XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3,
1.36 + XML_INTERNAL_PARAMETER_ENTITY = 4,
1.37 + XML_EXTERNAL_PARAMETER_ENTITY = 5,
1.38 + XML_INTERNAL_PREDEFINED_ENTITY = 6
1.39 +} xmlEntityType;
1.40 +
1.41 +/*
1.42 + * An unit of storage for an entity, contains the string, the value
1.43 + * and the linkind data needed for the linking in the hash table.
1.44 + */
1.45 +
1.46 +struct _xmlEntity {
1.47 + void *_private; /* application data */
1.48 + xmlElementType type; /* XML_ENTITY_DECL, must be second ! */
1.49 + const xmlChar *name; /* Entity name */
1.50 + struct _xmlNode *children; /* First child link */
1.51 + struct _xmlNode *last; /* Last child link */
1.52 + struct _xmlDtd *parent; /* -> DTD */
1.53 + struct _xmlNode *next; /* next sibling link */
1.54 + struct _xmlNode *prev; /* previous sibling link */
1.55 + struct _xmlDoc *doc; /* the containing document */
1.56 + /* end of common part */
1.57 + xmlChar *orig; /* content without ref substitution */
1.58 + xmlChar *content; /* content or ndata if unparsed */
1.59 + int length; /* the content length */
1.60 + xmlEntityType etype; /* The entity type */
1.61 + const xmlChar *ExternalID; /* External identifier for PUBLIC */
1.62 + const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */
1.63 +
1.64 + struct _xmlEntity *nexte; /* unused */
1.65 + const xmlChar *URI; /* the full URI as computed */
1.66 + int owner; /* does the entity own the childrens */
1.67 +};
1.68 +
1.69 +/*
1.70 + * All entities are stored in an hash table.
1.71 + * There is 2 separate hash tables for global and parameter entities.
1.72 + */
1.73 +
1.74 +typedef struct _xmlHashTable xmlEntitiesTable;
1.75 +typedef xmlEntitiesTable *xmlEntitiesTablePtr;
1.76 +
1.77 +/*
1.78 + * External functions:
1.79 + */
1.80 +
1.81 +XMLPUBFUN void XMLCALL
1.82 + xmlInitializePredefinedEntities (void);
1.83 +XMLPUBFUN xmlEntityPtr XMLCALL
1.84 + xmlAddDocEntity (xmlDocPtr doc,
1.85 + const xmlChar *name,
1.86 + int type,
1.87 + const xmlChar *ExternalID,
1.88 + const xmlChar *SystemID,
1.89 + const xmlChar *content);
1.90 +XMLPUBFUN xmlEntityPtr XMLCALL
1.91 + xmlAddDtdEntity (xmlDocPtr doc,
1.92 + const xmlChar *name,
1.93 + int type,
1.94 + const xmlChar *ExternalID,
1.95 + const xmlChar *SystemID,
1.96 + const xmlChar *content);
1.97 +XMLPUBFUN xmlEntityPtr XMLCALL
1.98 + xmlGetPredefinedEntity (const xmlChar *name);
1.99 +XMLPUBFUN xmlEntityPtr XMLCALL
1.100 + xmlGetDocEntity (xmlDocPtr doc, const xmlChar *name);
1.101 +
1.102 +#ifndef XMLENGINE_EXCLUDE_UNUSED
1.103 +XMLPUBFUN xmlEntityPtr XMLCALL
1.104 + xmlGetDtdEntity (xmlDocPtr doc, const xmlChar *name);
1.105 +#endif /* ifndef XMLENGINE_EXCLUDE_UNUSED */
1.106 +
1.107 +XMLPUBFUN xmlEntityPtr XMLCALL
1.108 + xmlGetParameterEntity (xmlDocPtr doc, const xmlChar *name);
1.109 +
1.110 +
1.111 +// (it is in _excluded-forever code group)
1.112 +#ifdef LIBXML_LEGACY_ENABLED
1.113 +XMLPUBFUN const xmlChar * XMLCALL
1.114 + xmlEncodeEntities (xmlDocPtr doc,
1.115 + const xmlChar *input);
1.116 +#endif /* LIBXML_LEGACY_ENABLED */
1.117 +
1.118 +XMLPUBFUN xmlChar * XMLCALL
1.119 + xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input);
1.120 +XMLPUBFUN xmlChar * XMLCALL
1.121 + xmlEncodeSpecialChars (xmlDocPtr doc, const xmlChar *input);
1.122 +
1.123 +#ifndef XMLENGINE_EXCLUDE_UNUSED
1.124 +XMLPUBFUN xmlEntitiesTablePtr XMLCALL xmlCreateEntitiesTable (void);
1.125 +#endif /* ifndef XMLENGINE_EXCLUDE_UNUSED */
1.126 +
1.127 +XMLPUBFUN xmlEntitiesTablePtr XMLCALL
1.128 + xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
1.129 +XMLPUBFUN void XMLCALL
1.130 + xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
1.131 +XMLPUBFUN void XMLCALL
1.132 + xmlCleanupPredefinedEntities(void);
1.133 +
1.134 +#ifdef LIBXML_OUTPUT_ENABLED
1.135 +XMLPUBFUN void XMLCALL
1.136 + xmlDumpEntitiesTable (xmlBufferPtr buf, xmlEntitiesTablePtr table);
1.137 +XMLPUBFUN void XMLCALL
1.138 + xmlDumpEntityDecl (xmlBufferPtr buf, xmlEntityPtr ent);
1.139 +#endif /* LIBXML_OUTPUT_ENABLED */
1.140 +
1.141 +#ifdef __cplusplus
1.142 +}
1.143 +#endif
1.144 +
1.145 +# endif /* XML_ENTITIES_H */
1.146 +