VirtualBox

source: vbox/trunk/src/libs/libxml2-2.13.2/include/libxml/entities.h@ 105420

Last change on this file since 105420 was 105420, checked in by vboxsync, 7 months ago

libxml2-2.12.6: Applied and adjusted our libxml2 changes to 2.12.6. bugref:10730

  • Property svn:eol-style set to native
File size: 4.8 KB
Line 
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/** DOC_DISABLE */
15#include <libxml/xmlversion.h>
16#define XML_TREE_INTERNALS
17#include <libxml/tree.h>
18#undef XML_TREE_INTERNALS
19/** DOC_ENABLE */
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25/*
26 * The different valid entity types.
27 */
28typedef enum {
29 XML_INTERNAL_GENERAL_ENTITY = 1,
30 XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2,
31 XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3,
32 XML_INTERNAL_PARAMETER_ENTITY = 4,
33 XML_EXTERNAL_PARAMETER_ENTITY = 5,
34 XML_INTERNAL_PREDEFINED_ENTITY = 6
35} xmlEntityType;
36
37/*
38 * An unit of storage for an entity, contains the string, the value
39 * and the linkind data needed for the linking in the hash table.
40 */
41
42struct _xmlEntity {
43 void *_private; /* application data */
44 xmlElementType type; /* XML_ENTITY_DECL, must be second ! */
45 const xmlChar *name; /* Entity name */
46 struct _xmlNode *children; /* First child link */
47 struct _xmlNode *last; /* Last child link */
48 struct _xmlDtd *parent; /* -> DTD */
49 struct _xmlNode *next; /* next sibling link */
50 struct _xmlNode *prev; /* previous sibling link */
51 struct _xmlDoc *doc; /* the containing document */
52
53 xmlChar *orig; /* content without ref substitution */
54 xmlChar *content; /* content or ndata if unparsed */
55 int length; /* the content length */
56 xmlEntityType etype; /* The entity type */
57 const xmlChar *ExternalID; /* External identifier for PUBLIC */
58 const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */
59
60 struct _xmlEntity *nexte; /* unused */
61 const xmlChar *URI; /* the full URI as computed */
62 int owner; /* unused */
63 int flags; /* various flags */
64 unsigned long expandedSize; /* expanded size */
65};
66
67/*
68 * All entities are stored in an hash table.
69 * There is 2 separate hash tables for global and parameter entities.
70 */
71
72typedef struct _xmlHashTable xmlEntitiesTable;
73typedef xmlEntitiesTable *xmlEntitiesTablePtr;
74
75/*
76 * External functions:
77 */
78
79#ifdef LIBXML_LEGACY_ENABLED
80XML_DEPRECATED
81XMLPUBFUN void
82 xmlInitializePredefinedEntities (void);
83#endif /* LIBXML_LEGACY_ENABLED */
84
85XMLPUBFUN xmlEntityPtr
86 xmlNewEntity (xmlDocPtr doc,
87 const xmlChar *name,
88 int type,
89 const xmlChar *ExternalID,
90 const xmlChar *SystemID,
91 const xmlChar *content);
92XMLPUBFUN void
93 xmlFreeEntity (xmlEntityPtr entity);
94XMLPUBFUN int
95 xmlAddEntity (xmlDocPtr doc,
96 int extSubset,
97 const xmlChar *name,
98 int type,
99 const xmlChar *ExternalID,
100 const xmlChar *SystemID,
101 const xmlChar *content,
102 xmlEntityPtr *out);
103XMLPUBFUN xmlEntityPtr
104 xmlAddDocEntity (xmlDocPtr doc,
105 const xmlChar *name,
106 int type,
107 const xmlChar *ExternalID,
108 const xmlChar *SystemID,
109 const xmlChar *content);
110XMLPUBFUN xmlEntityPtr
111 xmlAddDtdEntity (xmlDocPtr doc,
112 const xmlChar *name,
113 int type,
114 const xmlChar *ExternalID,
115 const xmlChar *SystemID,
116 const xmlChar *content);
117XMLPUBFUN xmlEntityPtr
118 xmlGetPredefinedEntity (const xmlChar *name);
119XMLPUBFUN xmlEntityPtr
120 xmlGetDocEntity (const xmlDoc *doc,
121 const xmlChar *name);
122XMLPUBFUN xmlEntityPtr
123 xmlGetDtdEntity (xmlDocPtr doc,
124 const xmlChar *name);
125XMLPUBFUN xmlEntityPtr
126 xmlGetParameterEntity (xmlDocPtr doc,
127 const xmlChar *name);
128#ifdef LIBXML_LEGACY_ENABLED
129XML_DEPRECATED
130XMLPUBFUN const xmlChar *
131 xmlEncodeEntities (xmlDocPtr doc,
132 const xmlChar *input);
133#endif /* LIBXML_LEGACY_ENABLED */
134XMLPUBFUN xmlChar *
135 xmlEncodeEntitiesReentrant(xmlDocPtr doc,
136 const xmlChar *input);
137XMLPUBFUN xmlChar *
138 xmlEncodeSpecialChars (const xmlDoc *doc,
139 const xmlChar *input);
140XMLPUBFUN xmlEntitiesTablePtr
141 xmlCreateEntitiesTable (void);
142#ifdef LIBXML_TREE_ENABLED
143XMLPUBFUN xmlEntitiesTablePtr
144 xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
145#endif /* LIBXML_TREE_ENABLED */
146XMLPUBFUN void
147 xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
148#ifdef LIBXML_OUTPUT_ENABLED
149XMLPUBFUN void
150 xmlDumpEntitiesTable (xmlBufferPtr buf,
151 xmlEntitiesTablePtr table);
152XMLPUBFUN void
153 xmlDumpEntityDecl (xmlBufferPtr buf,
154 xmlEntityPtr ent);
155#endif /* LIBXML_OUTPUT_ENABLED */
156#ifdef LIBXML_LEGACY_ENABLED
157XMLPUBFUN void
158 xmlCleanupPredefinedEntities(void);
159#endif /* LIBXML_LEGACY_ENABLED */
160
161
162#ifdef __cplusplus
163}
164#endif
165
166# endif /* __XML_ENTITIES_H__ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette