pocxxeci 0.30.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pocxxeci might be problematic. Click here for more details.

Files changed (160) hide show
  1. package/LICENSE +19 -0
  2. package/Makefile +18 -0
  3. package/README.md +52 -0
  4. package/binding.gyp +81 -0
  5. package/index.d.ts +273 -0
  6. package/index.js +45 -0
  7. package/lib/bindings.js +1 -0
  8. package/lib/document.js +122 -0
  9. package/lib/element.js +82 -0
  10. package/lib/sax_parser.js +38 -0
  11. package/package.json +70 -0
  12. package/src/html_document.cc +7 -0
  13. package/src/html_document.h +18 -0
  14. package/src/libxmljs.cc +252 -0
  15. package/src/libxmljs.h +53 -0
  16. package/src/xml_attribute.cc +173 -0
  17. package/src/xml_attribute.h +40 -0
  18. package/src/xml_comment.cc +117 -0
  19. package/src/xml_comment.h +30 -0
  20. package/src/xml_document.cc +810 -0
  21. package/src/xml_document.h +67 -0
  22. package/src/xml_element.cc +565 -0
  23. package/src/xml_element.h +61 -0
  24. package/src/xml_namespace.cc +158 -0
  25. package/src/xml_namespace.h +39 -0
  26. package/src/xml_node.cc +761 -0
  27. package/src/xml_node.h +73 -0
  28. package/src/xml_pi.cc +161 -0
  29. package/src/xml_pi.h +34 -0
  30. package/src/xml_sax_parser.cc +424 -0
  31. package/src/xml_sax_parser.h +73 -0
  32. package/src/xml_syntax_error.cc +66 -0
  33. package/src/xml_syntax_error.h +25 -0
  34. package/src/xml_text.cc +320 -0
  35. package/src/xml_text.h +48 -0
  36. package/src/xml_textwriter.cc +315 -0
  37. package/src/xml_textwriter.h +62 -0
  38. package/src/xml_xpath_context.cc +70 -0
  39. package/src/xml_xpath_context.h +23 -0
  40. package/vendor/libxml/Copyright +23 -0
  41. package/vendor/libxml/DOCBparser.c +305 -0
  42. package/vendor/libxml/HTMLparser.c +7287 -0
  43. package/vendor/libxml/HTMLtree.c +1200 -0
  44. package/vendor/libxml/Makefile +2983 -0
  45. package/vendor/libxml/SAX.c +180 -0
  46. package/vendor/libxml/SAX2.c +3036 -0
  47. package/vendor/libxml/buf.c +1351 -0
  48. package/vendor/libxml/buf.h +72 -0
  49. package/vendor/libxml/c14n.c +2234 -0
  50. package/vendor/libxml/catalog.c +3828 -0
  51. package/vendor/libxml/chvalid.c +336 -0
  52. package/vendor/libxml/config.h +294 -0
  53. package/vendor/libxml/config.h.gch +0 -0
  54. package/vendor/libxml/debugXML.c +3423 -0
  55. package/vendor/libxml/dict.c +1298 -0
  56. package/vendor/libxml/elfgcchack.h +17818 -0
  57. package/vendor/libxml/enc.h +32 -0
  58. package/vendor/libxml/encoding.c +3975 -0
  59. package/vendor/libxml/entities.c +1163 -0
  60. package/vendor/libxml/error.c +998 -0
  61. package/vendor/libxml/globals.c +1126 -0
  62. package/vendor/libxml/hash.c +1146 -0
  63. package/vendor/libxml/include/libxml/DOCBparser.h +96 -0
  64. package/vendor/libxml/include/libxml/HTMLparser.h +306 -0
  65. package/vendor/libxml/include/libxml/HTMLtree.h +147 -0
  66. package/vendor/libxml/include/libxml/Makefile +725 -0
  67. package/vendor/libxml/include/libxml/Makefile.am +54 -0
  68. package/vendor/libxml/include/libxml/Makefile.in +725 -0
  69. package/vendor/libxml/include/libxml/SAX.h +173 -0
  70. package/vendor/libxml/include/libxml/SAX2.h +178 -0
  71. package/vendor/libxml/include/libxml/c14n.h +128 -0
  72. package/vendor/libxml/include/libxml/catalog.h +182 -0
  73. package/vendor/libxml/include/libxml/chvalid.h +230 -0
  74. package/vendor/libxml/include/libxml/debugXML.h +217 -0
  75. package/vendor/libxml/include/libxml/dict.h +79 -0
  76. package/vendor/libxml/include/libxml/encoding.h +245 -0
  77. package/vendor/libxml/include/libxml/entities.h +151 -0
  78. package/vendor/libxml/include/libxml/globals.h +508 -0
  79. package/vendor/libxml/include/libxml/hash.h +236 -0
  80. package/vendor/libxml/include/libxml/list.h +137 -0
  81. package/vendor/libxml/include/libxml/nanoftp.h +163 -0
  82. package/vendor/libxml/include/libxml/nanohttp.h +81 -0
  83. package/vendor/libxml/include/libxml/parser.h +1243 -0
  84. package/vendor/libxml/include/libxml/parserInternals.h +644 -0
  85. package/vendor/libxml/include/libxml/pattern.h +100 -0
  86. package/vendor/libxml/include/libxml/relaxng.h +217 -0
  87. package/vendor/libxml/include/libxml/schemasInternals.h +958 -0
  88. package/vendor/libxml/include/libxml/schematron.h +142 -0
  89. package/vendor/libxml/include/libxml/threads.h +89 -0
  90. package/vendor/libxml/include/libxml/tree.h +1311 -0
  91. package/vendor/libxml/include/libxml/uri.h +94 -0
  92. package/vendor/libxml/include/libxml/valid.h +458 -0
  93. package/vendor/libxml/include/libxml/xinclude.h +129 -0
  94. package/vendor/libxml/include/libxml/xlink.h +189 -0
  95. package/vendor/libxml/include/libxml/xmlIO.h +368 -0
  96. package/vendor/libxml/include/libxml/xmlautomata.h +146 -0
  97. package/vendor/libxml/include/libxml/xmlerror.h +945 -0
  98. package/vendor/libxml/include/libxml/xmlexports.h +77 -0
  99. package/vendor/libxml/include/libxml/xmlmemory.h +224 -0
  100. package/vendor/libxml/include/libxml/xmlmodule.h +57 -0
  101. package/vendor/libxml/include/libxml/xmlreader.h +428 -0
  102. package/vendor/libxml/include/libxml/xmlregexp.h +222 -0
  103. package/vendor/libxml/include/libxml/xmlsave.h +88 -0
  104. package/vendor/libxml/include/libxml/xmlschemas.h +246 -0
  105. package/vendor/libxml/include/libxml/xmlschemastypes.h +151 -0
  106. package/vendor/libxml/include/libxml/xmlstring.h +140 -0
  107. package/vendor/libxml/include/libxml/xmlunicode.h +202 -0
  108. package/vendor/libxml/include/libxml/xmlversion.h +484 -0
  109. package/vendor/libxml/include/libxml/xmlwin32version.h +239 -0
  110. package/vendor/libxml/include/libxml/xmlwriter.h +488 -0
  111. package/vendor/libxml/include/libxml/xpath.h +564 -0
  112. package/vendor/libxml/include/libxml/xpathInternals.h +632 -0
  113. package/vendor/libxml/include/libxml/xpointer.h +114 -0
  114. package/vendor/libxml/include/win32config.h +122 -0
  115. package/vendor/libxml/include/wsockcompat.h +54 -0
  116. package/vendor/libxml/legacy.c +1343 -0
  117. package/vendor/libxml/libxml.h +134 -0
  118. package/vendor/libxml/list.c +779 -0
  119. package/vendor/libxml/nanoftp.c +2118 -0
  120. package/vendor/libxml/nanohttp.c +1899 -0
  121. package/vendor/libxml/parser.c +15553 -0
  122. package/vendor/libxml/parserInternals.c +2164 -0
  123. package/vendor/libxml/pattern.c +2621 -0
  124. package/vendor/libxml/relaxng.c +11101 -0
  125. package/vendor/libxml/rngparser.c +1595 -0
  126. package/vendor/libxml/runsuite.c +1157 -0
  127. package/vendor/libxml/save.h +36 -0
  128. package/vendor/libxml/schematron.c +1787 -0
  129. package/vendor/libxml/threads.c +1049 -0
  130. package/vendor/libxml/timsort.h +601 -0
  131. package/vendor/libxml/tree.c +10183 -0
  132. package/vendor/libxml/trio.c +6895 -0
  133. package/vendor/libxml/trio.h +230 -0
  134. package/vendor/libxml/triodef.h +228 -0
  135. package/vendor/libxml/trionan.c +914 -0
  136. package/vendor/libxml/trionan.h +84 -0
  137. package/vendor/libxml/triop.h +150 -0
  138. package/vendor/libxml/triostr.c +2112 -0
  139. package/vendor/libxml/triostr.h +144 -0
  140. package/vendor/libxml/uri.c +2561 -0
  141. package/vendor/libxml/valid.c +7138 -0
  142. package/vendor/libxml/xinclude.c +2657 -0
  143. package/vendor/libxml/xlink.c +183 -0
  144. package/vendor/libxml/xmlIO.c +4135 -0
  145. package/vendor/libxml/xmlcatalog.c +624 -0
  146. package/vendor/libxml/xmllint.c +3796 -0
  147. package/vendor/libxml/xmlmemory.c +1163 -0
  148. package/vendor/libxml/xmlmodule.c +468 -0
  149. package/vendor/libxml/xmlreader.c +6033 -0
  150. package/vendor/libxml/xmlregexp.c +8271 -0
  151. package/vendor/libxml/xmlsave.c +2735 -0
  152. package/vendor/libxml/xmlschemas.c +29173 -0
  153. package/vendor/libxml/xmlschemastypes.c +6276 -0
  154. package/vendor/libxml/xmlstring.c +1050 -0
  155. package/vendor/libxml/xmlunicode.c +3179 -0
  156. package/vendor/libxml/xmlwriter.c +4738 -0
  157. package/vendor/libxml/xpath.c +14734 -0
  158. package/vendor/libxml/xpointer.c +2969 -0
  159. package/vendor/libxml/xzlib.c +815 -0
  160. package/vendor/libxml/xzlib.h +19 -0
@@ -0,0 +1,245 @@
1
+ /*
2
+ * Summary: interface for the encoding conversion functions
3
+ * Description: interface for the encoding conversion functions needed for
4
+ * XML basic encoding and iconv() support.
5
+ *
6
+ * Related specs are
7
+ * rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies
8
+ * [ISO-10646] UTF-8 and UTF-16 in Annexes
9
+ * [ISO-8859-1] ISO Latin-1 characters codes.
10
+ * [UNICODE] The Unicode Consortium, "The Unicode Standard --
11
+ * Worldwide Character Encoding -- Version 1.0", Addison-
12
+ * Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is
13
+ * described in Unicode Technical Report #4.
14
+ * [US-ASCII] Coded Character Set--7-bit American Standard Code for
15
+ * Information Interchange, ANSI X3.4-1986.
16
+ *
17
+ * Copy: See Copyright for the status of this software.
18
+ *
19
+ * Author: Daniel Veillard
20
+ */
21
+
22
+ #ifndef __XML_CHAR_ENCODING_H__
23
+ #define __XML_CHAR_ENCODING_H__
24
+
25
+ #include <libxml/xmlversion.h>
26
+
27
+ #ifdef LIBXML_ICONV_ENABLED
28
+ #include <iconv.h>
29
+ #endif
30
+ #ifdef LIBXML_ICU_ENABLED
31
+ #include <unicode/ucnv.h>
32
+ #endif
33
+ #ifdef __cplusplus
34
+ extern "C" {
35
+ #endif
36
+
37
+ /*
38
+ * xmlCharEncoding:
39
+ *
40
+ * Predefined values for some standard encodings.
41
+ * Libxml does not do beforehand translation on UTF8 and ISOLatinX.
42
+ * It also supports ASCII, ISO-8859-1, and UTF16 (LE and BE) by default.
43
+ *
44
+ * Anything else would have to be translated to UTF8 before being
45
+ * given to the parser itself. The BOM for UTF16 and the encoding
46
+ * declaration are looked at and a converter is looked for at that
47
+ * point. If not found the parser stops here as asked by the XML REC. A
48
+ * converter can be registered by the user using xmlRegisterCharEncodingHandler
49
+ * but the current form doesn't allow stateful transcoding (a serious
50
+ * problem agreed !). If iconv has been found it will be used
51
+ * automatically and allow stateful transcoding, the simplest is then
52
+ * to be sure to enable iconv and to provide iconv libs for the encoding
53
+ * support needed.
54
+ *
55
+ * Note that the generic "UTF-16" is not a predefined value. Instead, only
56
+ * the specific UTF-16LE and UTF-16BE are present.
57
+ */
58
+ typedef enum {
59
+ XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */
60
+ XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */
61
+ XML_CHAR_ENCODING_UTF8= 1, /* UTF-8 */
62
+ XML_CHAR_ENCODING_UTF16LE= 2, /* UTF-16 little endian */
63
+ XML_CHAR_ENCODING_UTF16BE= 3, /* UTF-16 big endian */
64
+ XML_CHAR_ENCODING_UCS4LE= 4, /* UCS-4 little endian */
65
+ XML_CHAR_ENCODING_UCS4BE= 5, /* UCS-4 big endian */
66
+ XML_CHAR_ENCODING_EBCDIC= 6, /* EBCDIC uh! */
67
+ XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */
68
+ XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */
69
+ XML_CHAR_ENCODING_UCS2= 9, /* UCS-2 */
70
+ XML_CHAR_ENCODING_8859_1= 10,/* ISO-8859-1 ISO Latin 1 */
71
+ XML_CHAR_ENCODING_8859_2= 11,/* ISO-8859-2 ISO Latin 2 */
72
+ XML_CHAR_ENCODING_8859_3= 12,/* ISO-8859-3 */
73
+ XML_CHAR_ENCODING_8859_4= 13,/* ISO-8859-4 */
74
+ XML_CHAR_ENCODING_8859_5= 14,/* ISO-8859-5 */
75
+ XML_CHAR_ENCODING_8859_6= 15,/* ISO-8859-6 */
76
+ XML_CHAR_ENCODING_8859_7= 16,/* ISO-8859-7 */
77
+ XML_CHAR_ENCODING_8859_8= 17,/* ISO-8859-8 */
78
+ XML_CHAR_ENCODING_8859_9= 18,/* ISO-8859-9 */
79
+ XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */
80
+ XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */
81
+ XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */
82
+ XML_CHAR_ENCODING_ASCII= 22 /* pure ASCII */
83
+ } xmlCharEncoding;
84
+
85
+ /**
86
+ * xmlCharEncodingInputFunc:
87
+ * @out: a pointer to an array of bytes to store the UTF-8 result
88
+ * @outlen: the length of @out
89
+ * @in: a pointer to an array of chars in the original encoding
90
+ * @inlen: the length of @in
91
+ *
92
+ * Take a block of chars in the original encoding and try to convert
93
+ * it to an UTF-8 block of chars out.
94
+ *
95
+ * Returns the number of bytes written, -1 if lack of space, or -2
96
+ * if the transcoding failed.
97
+ * The value of @inlen after return is the number of octets consumed
98
+ * if the return value is positive, else unpredictiable.
99
+ * The value of @outlen after return is the number of octets consumed.
100
+ */
101
+ typedef int (* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen,
102
+ const unsigned char *in, int *inlen);
103
+
104
+
105
+ /**
106
+ * xmlCharEncodingOutputFunc:
107
+ * @out: a pointer to an array of bytes to store the result
108
+ * @outlen: the length of @out
109
+ * @in: a pointer to an array of UTF-8 chars
110
+ * @inlen: the length of @in
111
+ *
112
+ * Take a block of UTF-8 chars in and try to convert it to another
113
+ * encoding.
114
+ * Note: a first call designed to produce heading info is called with
115
+ * in = NULL. If stateful this should also initialize the encoder state.
116
+ *
117
+ * Returns the number of bytes written, -1 if lack of space, or -2
118
+ * if the transcoding failed.
119
+ * The value of @inlen after return is the number of octets consumed
120
+ * if the return value is positive, else unpredictiable.
121
+ * The value of @outlen after return is the number of octets produced.
122
+ */
123
+ typedef int (* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen,
124
+ const unsigned char *in, int *inlen);
125
+
126
+
127
+ /*
128
+ * Block defining the handlers for non UTF-8 encodings.
129
+ * If iconv is supported, there are two extra fields.
130
+ */
131
+ #ifdef LIBXML_ICU_ENABLED
132
+ /* Size of pivot buffer, same as icu/source/common/ucnv.cpp CHUNK_SIZE */
133
+ #define ICU_PIVOT_BUF_SIZE 1024
134
+ struct _uconv_t {
135
+ UConverter *uconv; /* for conversion between an encoding and UTF-16 */
136
+ UConverter *utf8; /* for conversion between UTF-8 and UTF-16 */
137
+ UChar pivot_buf[ICU_PIVOT_BUF_SIZE];
138
+ UChar *pivot_source;
139
+ UChar *pivot_target;
140
+ };
141
+ typedef struct _uconv_t uconv_t;
142
+ #endif
143
+
144
+ typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler;
145
+ typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;
146
+ struct _xmlCharEncodingHandler {
147
+ char *name;
148
+ xmlCharEncodingInputFunc input;
149
+ xmlCharEncodingOutputFunc output;
150
+ #ifdef LIBXML_ICONV_ENABLED
151
+ iconv_t iconv_in;
152
+ iconv_t iconv_out;
153
+ #endif /* LIBXML_ICONV_ENABLED */
154
+ #ifdef LIBXML_ICU_ENABLED
155
+ uconv_t *uconv_in;
156
+ uconv_t *uconv_out;
157
+ #endif /* LIBXML_ICU_ENABLED */
158
+ };
159
+
160
+ #ifdef __cplusplus
161
+ }
162
+ #endif
163
+ #include <libxml/tree.h>
164
+ #ifdef __cplusplus
165
+ extern "C" {
166
+ #endif
167
+
168
+ /*
169
+ * Interfaces for encoding handlers.
170
+ */
171
+ XMLPUBFUN void XMLCALL
172
+ xmlInitCharEncodingHandlers (void);
173
+ XMLPUBFUN void XMLCALL
174
+ xmlCleanupCharEncodingHandlers (void);
175
+ XMLPUBFUN void XMLCALL
176
+ xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler);
177
+ XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
178
+ xmlGetCharEncodingHandler (xmlCharEncoding enc);
179
+ XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
180
+ xmlFindCharEncodingHandler (const char *name);
181
+ XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
182
+ xmlNewCharEncodingHandler (const char *name,
183
+ xmlCharEncodingInputFunc input,
184
+ xmlCharEncodingOutputFunc output);
185
+
186
+ /*
187
+ * Interfaces for encoding names and aliases.
188
+ */
189
+ XMLPUBFUN int XMLCALL
190
+ xmlAddEncodingAlias (const char *name,
191
+ const char *alias);
192
+ XMLPUBFUN int XMLCALL
193
+ xmlDelEncodingAlias (const char *alias);
194
+ XMLPUBFUN const char * XMLCALL
195
+ xmlGetEncodingAlias (const char *alias);
196
+ XMLPUBFUN void XMLCALL
197
+ xmlCleanupEncodingAliases (void);
198
+ XMLPUBFUN xmlCharEncoding XMLCALL
199
+ xmlParseCharEncoding (const char *name);
200
+ XMLPUBFUN const char * XMLCALL
201
+ xmlGetCharEncodingName (xmlCharEncoding enc);
202
+
203
+ /*
204
+ * Interfaces directly used by the parsers.
205
+ */
206
+ XMLPUBFUN xmlCharEncoding XMLCALL
207
+ xmlDetectCharEncoding (const unsigned char *in,
208
+ int len);
209
+
210
+ XMLPUBFUN int XMLCALL
211
+ xmlCharEncOutFunc (xmlCharEncodingHandler *handler,
212
+ xmlBufferPtr out,
213
+ xmlBufferPtr in);
214
+
215
+ XMLPUBFUN int XMLCALL
216
+ xmlCharEncInFunc (xmlCharEncodingHandler *handler,
217
+ xmlBufferPtr out,
218
+ xmlBufferPtr in);
219
+ XMLPUBFUN int XMLCALL
220
+ xmlCharEncFirstLine (xmlCharEncodingHandler *handler,
221
+ xmlBufferPtr out,
222
+ xmlBufferPtr in);
223
+ XMLPUBFUN int XMLCALL
224
+ xmlCharEncCloseFunc (xmlCharEncodingHandler *handler);
225
+
226
+ /*
227
+ * Export a few useful functions
228
+ */
229
+ #ifdef LIBXML_OUTPUT_ENABLED
230
+ XMLPUBFUN int XMLCALL
231
+ UTF8Toisolat1 (unsigned char *out,
232
+ int *outlen,
233
+ const unsigned char *in,
234
+ int *inlen);
235
+ #endif /* LIBXML_OUTPUT_ENABLED */
236
+ XMLPUBFUN int XMLCALL
237
+ isolat1ToUTF8 (unsigned char *out,
238
+ int *outlen,
239
+ const unsigned char *in,
240
+ int *inlen);
241
+ #ifdef __cplusplus
242
+ }
243
+ #endif
244
+
245
+ #endif /* __XML_CHAR_ENCODING_H__ */
@@ -0,0 +1,151 @@
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 {
25
+ XML_INTERNAL_GENERAL_ENTITY = 1,
26
+ XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2,
27
+ XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3,
28
+ XML_INTERNAL_PARAMETER_ENTITY = 4,
29
+ XML_EXTERNAL_PARAMETER_ENTITY = 5,
30
+ XML_INTERNAL_PREDEFINED_ENTITY = 6
31
+ } xmlEntityType;
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
+
70
+ typedef struct _xmlHashTable xmlEntitiesTable;
71
+ typedef xmlEntitiesTable *xmlEntitiesTablePtr;
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
+
82
+ XMLPUBFUN xmlEntityPtr XMLCALL
83
+ xmlNewEntity (xmlDocPtr doc,
84
+ const xmlChar *name,
85
+ int type,
86
+ const xmlChar *ExternalID,
87
+ const xmlChar *SystemID,
88
+ const xmlChar *content);
89
+ XMLPUBFUN xmlEntityPtr XMLCALL
90
+ xmlAddDocEntity (xmlDocPtr doc,
91
+ const xmlChar *name,
92
+ int type,
93
+ const xmlChar *ExternalID,
94
+ const xmlChar *SystemID,
95
+ const xmlChar *content);
96
+ XMLPUBFUN xmlEntityPtr XMLCALL
97
+ xmlAddDtdEntity (xmlDocPtr doc,
98
+ const xmlChar *name,
99
+ int type,
100
+ const xmlChar *ExternalID,
101
+ const xmlChar *SystemID,
102
+ const xmlChar *content);
103
+ XMLPUBFUN xmlEntityPtr XMLCALL
104
+ xmlGetPredefinedEntity (const xmlChar *name);
105
+ XMLPUBFUN xmlEntityPtr XMLCALL
106
+ xmlGetDocEntity (const xmlDoc *doc,
107
+ const xmlChar *name);
108
+ XMLPUBFUN xmlEntityPtr XMLCALL
109
+ xmlGetDtdEntity (xmlDocPtr doc,
110
+ const xmlChar *name);
111
+ XMLPUBFUN xmlEntityPtr XMLCALL
112
+ xmlGetParameterEntity (xmlDocPtr doc,
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 */
119
+ XMLPUBFUN xmlChar * XMLCALL
120
+ xmlEncodeEntitiesReentrant(xmlDocPtr doc,
121
+ const xmlChar *input);
122
+ XMLPUBFUN xmlChar * XMLCALL
123
+ xmlEncodeSpecialChars (const xmlDoc *doc,
124
+ const xmlChar *input);
125
+ XMLPUBFUN xmlEntitiesTablePtr XMLCALL
126
+ xmlCreateEntitiesTable (void);
127
+ #ifdef LIBXML_TREE_ENABLED
128
+ XMLPUBFUN xmlEntitiesTablePtr XMLCALL
129
+ xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
130
+ #endif /* LIBXML_TREE_ENABLED */
131
+ XMLPUBFUN void XMLCALL
132
+ xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
133
+ #ifdef LIBXML_OUTPUT_ENABLED
134
+ XMLPUBFUN void XMLCALL
135
+ xmlDumpEntitiesTable (xmlBufferPtr buf,
136
+ xmlEntitiesTablePtr table);
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__ */