ReactOS  0.4.14-dev-49-gfb4591c
entities.h
Go to the documentation of this file.
1 /*
2  * Summary: interface for the XML entities handling
3  * Description: this module provides some of the entity API needed
4  * for the parser and applications.
5  *
6  * Copy: See Copyright for the status of this software.
7  *
8  * Author: Daniel Veillard
9  */
10 
11 #ifndef __XML_ENTITIES_H__
12 #define __XML_ENTITIES_H__
13 
14 #include <libxml/xmlversion.h>
15 #include <libxml/tree.h>
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 /*
22  * The different valid entity types.
23  */
24 typedef enum {
32 
33 /*
34  * An unit of storage for an entity, contains the string, the value
35  * and the linkind data needed for the linking in the hash table.
36  */
37 
38 struct _xmlEntity {
39  void *_private; /* application data */
40  xmlElementType type; /* XML_ENTITY_DECL, must be second ! */
41  const xmlChar *name; /* Entity name */
42  struct _xmlNode *children; /* First child link */
43  struct _xmlNode *last; /* Last child link */
44  struct _xmlDtd *parent; /* -> DTD */
45  struct _xmlNode *next; /* next sibling link */
46  struct _xmlNode *prev; /* previous sibling link */
47  struct _xmlDoc *doc; /* the containing document */
48 
49  xmlChar *orig; /* content without ref substitution */
50  xmlChar *content; /* content or ndata if unparsed */
51  int length; /* the content length */
52  xmlEntityType etype; /* The entity type */
53  const xmlChar *ExternalID; /* External identifier for PUBLIC */
54  const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */
55 
56  struct _xmlEntity *nexte; /* unused */
57  const xmlChar *URI; /* the full URI as computed */
58  int owner; /* does the entity own the childrens */
59  int checked; /* was the entity content checked */
60  /* this is also used to count entities
61  * references done from that entity
62  * and if it contains '<' */
63 };
64 
65 /*
66  * All entities are stored in an hash table.
67  * There is 2 separate hash tables for global and parameter entities.
68  */
69 
72 
73 /*
74  * External functions:
75  */
76 
77 #ifdef LIBXML_LEGACY_ENABLED
78 XMLPUBFUN void XMLCALL
79  xmlInitializePredefinedEntities (void);
80 #endif /* LIBXML_LEGACY_ENABLED */
81 
84  const xmlChar *name,
85  int type,
86  const xmlChar *ExternalID,
87  const xmlChar *SystemID,
88  const xmlChar *content);
91  const xmlChar *name,
92  int type,
93  const xmlChar *ExternalID,
94  const xmlChar *SystemID,
95  const xmlChar *content);
98  const xmlChar *name,
99  int type,
100  const xmlChar *ExternalID,
101  const xmlChar *SystemID,
102  const xmlChar *content);
106  xmlGetDocEntity (const xmlDoc *doc,
107  const xmlChar *name);
110  const xmlChar *name);
113  const xmlChar *name);
114 #ifdef LIBXML_LEGACY_ENABLED
115 XMLPUBFUN const xmlChar * XMLCALL
116  xmlEncodeEntities (xmlDocPtr doc,
117  const xmlChar *input);
118 #endif /* LIBXML_LEGACY_ENABLED */
121  const xmlChar *input);
123  xmlEncodeSpecialChars (const xmlDoc *doc,
124  const xmlChar *input);
126  xmlCreateEntitiesTable (void);
127 #ifdef LIBXML_TREE_ENABLED
129  xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
130 #endif /* LIBXML_TREE_ENABLED */
131 XMLPUBFUN void XMLCALL
133 #ifdef LIBXML_OUTPUT_ENABLED
134 XMLPUBFUN void XMLCALL
135  xmlDumpEntitiesTable (xmlBufferPtr buf,
137 XMLPUBFUN void XMLCALL
138  xmlDumpEntityDecl (xmlBufferPtr buf,
139  xmlEntityPtr ent);
140 #endif /* LIBXML_OUTPUT_ENABLED */
141 #ifdef LIBXML_LEGACY_ENABLED
142 XMLPUBFUN void XMLCALL
143  xmlCleanupPredefinedEntities(void);
144 #endif /* LIBXML_LEGACY_ENABLED */
145 
146 
147 #ifdef __cplusplus
148 }
149 #endif
150 
151 # endif /* __XML_ENTITIES_H__ */
xmlEntityType etype
Definition: entities.h:52
int checked
Definition: entities.h:59
XMLPUBFUN xmlChar *XMLCALL xmlEncodeSpecialChars(const xmlDoc *doc, const xmlChar *input)
const xmlChar * SystemID
Definition: entities.h:54
int owner
Definition: entities.h:58
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
XMLPUBFUN xmlEntitiesTablePtr XMLCALL xmlCreateEntitiesTable(void)
xmlElementType
Definition: tree.h:159
struct _xmlNode * prev
Definition: entities.h:46
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define XMLPUBFUN
Definition: xmlexports.h:30
XMLPUBFUN xmlChar *XMLCALL xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input)
const xmlChar * URI
Definition: entities.h:57
struct _xmlEntity * nexte
Definition: entities.h:56
Definition: tree.h:406
XMLPUBFUN xmlEntityPtr XMLCALL xmlGetDtdEntity(xmlDocPtr doc, const xmlChar *name)
XMLPUBFUN xmlEntityPtr XMLCALL xmlGetParameterEntity(xmlDocPtr doc, const xmlChar *name)
struct _xmlDtd * parent
Definition: entities.h:44
struct _xmlNode * children
Definition: entities.h:42
xmlChar * orig
Definition: entities.h:49
content
Definition: atl_ax.c:994
XMLPUBFUN xmlEntityPtr XMLCALL xmlNewEntity(xmlDocPtr doc, const xmlChar *name, int type, const xmlChar *ExternalID, const xmlChar *SystemID, const xmlChar *content)
XMLPUBFUN xmlEntityPtr XMLCALL xmlAddDtdEntity(xmlDocPtr doc, const xmlChar *name, int type, const xmlChar *ExternalID, const xmlChar *SystemID, const xmlChar *content)
XMLPUBFUN xmlEntityPtr XMLCALL xmlGetPredefinedEntity(const xmlChar *name)
int length
Definition: entities.h:51
const xmlChar * name
Definition: entities.h:41
Definition: tree.h:489
struct _xmlNode * next
Definition: entities.h:45
XMLPUBFUN xmlEntityPtr XMLCALL xmlGetDocEntity(const xmlDoc *doc, const xmlChar *name)
const xmlChar * ExternalID
Definition: entities.h:53
xmlElementType type
Definition: entities.h:40
unsigned char xmlChar
Definition: xmlstring.h:28
xmlEntitiesTable * xmlEntitiesTablePtr
Definition: entities.h:71
GLenum GLenum GLenum input
Definition: glext.h:9031
XMLPUBFUN xmlEntityPtr XMLCALL xmlAddDocEntity(xmlDocPtr doc, const xmlChar *name, int type, const xmlChar *ExternalID, const xmlChar *SystemID, const xmlChar *content)
struct _xmlDoc * doc
Definition: entities.h:47
Definition: tree.h:551
xmlChar * content
Definition: entities.h:50
#define XMLCALL
Definition: name.c:36
struct _xmlNode * last
Definition: entities.h:43
void * _private
Definition: entities.h:39
xmlEntityType
Definition: entities.h:24
XMLPUBFUN void XMLCALL xmlFreeEntitiesTable(xmlEntitiesTablePtr table)