1 | /*
|
---|
2 | * legacy.c: set of deprecated routines, not to be used anymore but
|
---|
3 | * kept purely for ABI compatibility
|
---|
4 | *
|
---|
5 | * See Copyright for the status of this software.
|
---|
6 | *
|
---|
7 | * daniel@veillard.com
|
---|
8 | */
|
---|
9 |
|
---|
10 | #define IN_LIBXML
|
---|
11 | #include "libxml.h"
|
---|
12 |
|
---|
13 | #ifdef LIBXML_LEGACY_ENABLED
|
---|
14 | #include <stdio.h>
|
---|
15 | #include <string.h>
|
---|
16 |
|
---|
17 | #include <libxml/tree.h>
|
---|
18 | #include <libxml/entities.h>
|
---|
19 | #include <libxml/SAX.h>
|
---|
20 | #include <libxml/parserInternals.h>
|
---|
21 | #include <libxml/HTMLparser.h>
|
---|
22 |
|
---|
23 | void xmlUpgradeOldNs(xmlDocPtr doc);
|
---|
24 |
|
---|
25 | /************************************************************************
|
---|
26 | * *
|
---|
27 | * Deprecated functions kept for compatibility *
|
---|
28 | * *
|
---|
29 | ************************************************************************/
|
---|
30 |
|
---|
31 | #ifdef LIBXML_HTML_ENABLED
|
---|
32 | xmlChar *htmlDecodeEntities(htmlParserCtxtPtr ctxt, int len, xmlChar end,
|
---|
33 | xmlChar end2, xmlChar end3);
|
---|
34 |
|
---|
35 | /**
|
---|
36 | * htmlDecodeEntities:
|
---|
37 | * @ctxt: the parser context
|
---|
38 | * @len: the len to decode (in bytes !), -1 for no size limit
|
---|
39 | * @end: an end marker xmlChar, 0 if none
|
---|
40 | * @end2: an end marker xmlChar, 0 if none
|
---|
41 | * @end3: an end marker xmlChar, 0 if none
|
---|
42 | *
|
---|
43 | * Substitute the HTML entities by their value
|
---|
44 | *
|
---|
45 | * DEPRECATED !!!!
|
---|
46 | *
|
---|
47 | * Returns A newly allocated string with the substitution done. The caller
|
---|
48 | * must deallocate it !
|
---|
49 | */
|
---|
50 | xmlChar *
|
---|
51 | htmlDecodeEntities(htmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
|
---|
52 | int len ATTRIBUTE_UNUSED, xmlChar end ATTRIBUTE_UNUSED,
|
---|
53 | xmlChar end2 ATTRIBUTE_UNUSED,
|
---|
54 | xmlChar end3 ATTRIBUTE_UNUSED)
|
---|
55 | {
|
---|
56 | static int deprecated = 0;
|
---|
57 |
|
---|
58 | if (!deprecated) {
|
---|
59 | fprintf(stderr,
|
---|
60 | "htmlDecodeEntities() deprecated function reached\n");
|
---|
61 | deprecated = 1;
|
---|
62 | }
|
---|
63 | return (NULL);
|
---|
64 | }
|
---|
65 | #endif
|
---|
66 |
|
---|
67 | /**
|
---|
68 | * xmlInitializePredefinedEntities:
|
---|
69 | *
|
---|
70 | * Set up the predefined entities.
|
---|
71 | * Deprecated call
|
---|
72 | */
|
---|
73 | void
|
---|
74 | xmlInitializePredefinedEntities(void)
|
---|
75 | {
|
---|
76 | }
|
---|
77 |
|
---|
78 | /**
|
---|
79 | * xmlCleanupPredefinedEntities:
|
---|
80 | *
|
---|
81 | * Cleanup up the predefined entities table.
|
---|
82 | * Deprecated call
|
---|
83 | */
|
---|
84 | void
|
---|
85 | xmlCleanupPredefinedEntities(void)
|
---|
86 | {
|
---|
87 | }
|
---|
88 |
|
---|
89 | static const char* const xmlFeaturesList[] = {
|
---|
90 | "validate",
|
---|
91 | "load subset",
|
---|
92 | "keep blanks",
|
---|
93 | "disable SAX",
|
---|
94 | "fetch external entities",
|
---|
95 | "substitute entities",
|
---|
96 | "gather line info",
|
---|
97 | "user data",
|
---|
98 | "is html",
|
---|
99 | "is standalone",
|
---|
100 | "stop parser",
|
---|
101 | "document",
|
---|
102 | "is well formed",
|
---|
103 | "is valid",
|
---|
104 | "SAX block",
|
---|
105 | "SAX function internalSubset",
|
---|
106 | "SAX function isStandalone",
|
---|
107 | "SAX function hasInternalSubset",
|
---|
108 | "SAX function hasExternalSubset",
|
---|
109 | "SAX function resolveEntity",
|
---|
110 | "SAX function getEntity",
|
---|
111 | "SAX function entityDecl",
|
---|
112 | "SAX function notationDecl",
|
---|
113 | "SAX function attributeDecl",
|
---|
114 | "SAX function elementDecl",
|
---|
115 | "SAX function unparsedEntityDecl",
|
---|
116 | "SAX function setDocumentLocator",
|
---|
117 | "SAX function startDocument",
|
---|
118 | "SAX function endDocument",
|
---|
119 | "SAX function startElement",
|
---|
120 | "SAX function endElement",
|
---|
121 | "SAX function reference",
|
---|
122 | "SAX function characters",
|
---|
123 | "SAX function ignorableWhitespace",
|
---|
124 | "SAX function processingInstruction",
|
---|
125 | "SAX function comment",
|
---|
126 | "SAX function warning",
|
---|
127 | "SAX function error",
|
---|
128 | "SAX function fatalError",
|
---|
129 | "SAX function getParameterEntity",
|
---|
130 | "SAX function cdataBlock",
|
---|
131 | "SAX function externalSubset",
|
---|
132 | };
|
---|
133 |
|
---|
134 | /**
|
---|
135 | * xmlGetFeaturesList:
|
---|
136 | * @len: the length of the features name array (input/output)
|
---|
137 | * @result: an array of string to be filled with the features name.
|
---|
138 | *
|
---|
139 | * Copy at most *@len feature names into the @result array
|
---|
140 | *
|
---|
141 | * Returns -1 in case or error, or the total number of features,
|
---|
142 | * len is updated with the number of strings copied,
|
---|
143 | * strings must not be deallocated
|
---|
144 | */
|
---|
145 | int
|
---|
146 | xmlGetFeaturesList(int *len, const char **result)
|
---|
147 | {
|
---|
148 | int ret, i;
|
---|
149 |
|
---|
150 | ret = sizeof(xmlFeaturesList) / sizeof(xmlFeaturesList[0]);
|
---|
151 | if ((len == NULL) || (result == NULL))
|
---|
152 | return (ret);
|
---|
153 | if ((*len < 0) || (*len >= 1000))
|
---|
154 | return (-1);
|
---|
155 | if (*len > ret)
|
---|
156 | *len = ret;
|
---|
157 | for (i = 0; i < *len; i++)
|
---|
158 | result[i] = xmlFeaturesList[i];
|
---|
159 | return (ret);
|
---|
160 | }
|
---|
161 |
|
---|
162 | /**
|
---|
163 | * xmlGetFeature:
|
---|
164 | * @ctxt: an XML/HTML parser context
|
---|
165 | * @name: the feature name
|
---|
166 | * @result: location to store the result
|
---|
167 | *
|
---|
168 | * Read the current value of one feature of this parser instance
|
---|
169 | *
|
---|
170 | * Returns -1 in case or error, 0 otherwise
|
---|
171 | */
|
---|
172 | int
|
---|
173 | xmlGetFeature(xmlParserCtxtPtr ctxt, const char *name, void *result)
|
---|
174 | {
|
---|
175 | if ((ctxt == NULL) || (name == NULL) || (result == NULL))
|
---|
176 | return (-1);
|
---|
177 |
|
---|
178 | if (!strcmp(name, "validate")) {
|
---|
179 | *((int *) result) = ctxt->validate;
|
---|
180 | } else if (!strcmp(name, "keep blanks")) {
|
---|
181 | *((int *) result) = ctxt->keepBlanks;
|
---|
182 | } else if (!strcmp(name, "disable SAX")) {
|
---|
183 | *((int *) result) = ctxt->disableSAX;
|
---|
184 | } else if (!strcmp(name, "fetch external entities")) {
|
---|
185 | *((int *) result) = ctxt->loadsubset;
|
---|
186 | } else if (!strcmp(name, "substitute entities")) {
|
---|
187 | *((int *) result) = ctxt->replaceEntities;
|
---|
188 | } else if (!strcmp(name, "gather line info")) {
|
---|
189 | *((int *) result) = ctxt->record_info;
|
---|
190 | } else if (!strcmp(name, "user data")) {
|
---|
191 | *((void **) result) = ctxt->userData;
|
---|
192 | } else if (!strcmp(name, "is html")) {
|
---|
193 | *((int *) result) = ctxt->html;
|
---|
194 | } else if (!strcmp(name, "is standalone")) {
|
---|
195 | *((int *) result) = ctxt->standalone;
|
---|
196 | } else if (!strcmp(name, "document")) {
|
---|
197 | *((xmlDocPtr *) result) = ctxt->myDoc;
|
---|
198 | } else if (!strcmp(name, "is well formed")) {
|
---|
199 | *((int *) result) = ctxt->wellFormed;
|
---|
200 | } else if (!strcmp(name, "is valid")) {
|
---|
201 | *((int *) result) = ctxt->valid;
|
---|
202 | } else if (!strcmp(name, "SAX block")) {
|
---|
203 | *((xmlSAXHandlerPtr *) result) = ctxt->sax;
|
---|
204 | } else if (!strcmp(name, "SAX function internalSubset")) {
|
---|
205 | *((internalSubsetSAXFunc *) result) = ctxt->sax->internalSubset;
|
---|
206 | } else if (!strcmp(name, "SAX function isStandalone")) {
|
---|
207 | *((isStandaloneSAXFunc *) result) = ctxt->sax->isStandalone;
|
---|
208 | } else if (!strcmp(name, "SAX function hasInternalSubset")) {
|
---|
209 | *((hasInternalSubsetSAXFunc *) result) =
|
---|
210 | ctxt->sax->hasInternalSubset;
|
---|
211 | } else if (!strcmp(name, "SAX function hasExternalSubset")) {
|
---|
212 | *((hasExternalSubsetSAXFunc *) result) =
|
---|
213 | ctxt->sax->hasExternalSubset;
|
---|
214 | } else if (!strcmp(name, "SAX function resolveEntity")) {
|
---|
215 | *((resolveEntitySAXFunc *) result) = ctxt->sax->resolveEntity;
|
---|
216 | } else if (!strcmp(name, "SAX function getEntity")) {
|
---|
217 | *((getEntitySAXFunc *) result) = ctxt->sax->getEntity;
|
---|
218 | } else if (!strcmp(name, "SAX function entityDecl")) {
|
---|
219 | *((entityDeclSAXFunc *) result) = ctxt->sax->entityDecl;
|
---|
220 | } else if (!strcmp(name, "SAX function notationDecl")) {
|
---|
221 | *((notationDeclSAXFunc *) result) = ctxt->sax->notationDecl;
|
---|
222 | } else if (!strcmp(name, "SAX function attributeDecl")) {
|
---|
223 | *((attributeDeclSAXFunc *) result) = ctxt->sax->attributeDecl;
|
---|
224 | } else if (!strcmp(name, "SAX function elementDecl")) {
|
---|
225 | *((elementDeclSAXFunc *) result) = ctxt->sax->elementDecl;
|
---|
226 | } else if (!strcmp(name, "SAX function unparsedEntityDecl")) {
|
---|
227 | *((unparsedEntityDeclSAXFunc *) result) =
|
---|
228 | ctxt->sax->unparsedEntityDecl;
|
---|
229 | } else if (!strcmp(name, "SAX function setDocumentLocator")) {
|
---|
230 | *((setDocumentLocatorSAXFunc *) result) =
|
---|
231 | ctxt->sax->setDocumentLocator;
|
---|
232 | } else if (!strcmp(name, "SAX function startDocument")) {
|
---|
233 | *((startDocumentSAXFunc *) result) = ctxt->sax->startDocument;
|
---|
234 | } else if (!strcmp(name, "SAX function endDocument")) {
|
---|
235 | *((endDocumentSAXFunc *) result) = ctxt->sax->endDocument;
|
---|
236 | } else if (!strcmp(name, "SAX function startElement")) {
|
---|
237 | *((startElementSAXFunc *) result) = ctxt->sax->startElement;
|
---|
238 | } else if (!strcmp(name, "SAX function endElement")) {
|
---|
239 | *((endElementSAXFunc *) result) = ctxt->sax->endElement;
|
---|
240 | } else if (!strcmp(name, "SAX function reference")) {
|
---|
241 | *((referenceSAXFunc *) result) = ctxt->sax->reference;
|
---|
242 | } else if (!strcmp(name, "SAX function characters")) {
|
---|
243 | *((charactersSAXFunc *) result) = ctxt->sax->characters;
|
---|
244 | } else if (!strcmp(name, "SAX function ignorableWhitespace")) {
|
---|
245 | *((ignorableWhitespaceSAXFunc *) result) =
|
---|
246 | ctxt->sax->ignorableWhitespace;
|
---|
247 | } else if (!strcmp(name, "SAX function processingInstruction")) {
|
---|
248 | *((processingInstructionSAXFunc *) result) =
|
---|
249 | ctxt->sax->processingInstruction;
|
---|
250 | } else if (!strcmp(name, "SAX function comment")) {
|
---|
251 | *((commentSAXFunc *) result) = ctxt->sax->comment;
|
---|
252 | } else if (!strcmp(name, "SAX function warning")) {
|
---|
253 | *((warningSAXFunc *) result) = ctxt->sax->warning;
|
---|
254 | } else if (!strcmp(name, "SAX function error")) {
|
---|
255 | *((errorSAXFunc *) result) = ctxt->sax->error;
|
---|
256 | } else if (!strcmp(name, "SAX function fatalError")) {
|
---|
257 | *((fatalErrorSAXFunc *) result) = ctxt->sax->fatalError;
|
---|
258 | } else if (!strcmp(name, "SAX function getParameterEntity")) {
|
---|
259 | *((getParameterEntitySAXFunc *) result) =
|
---|
260 | ctxt->sax->getParameterEntity;
|
---|
261 | } else if (!strcmp(name, "SAX function cdataBlock")) {
|
---|
262 | *((cdataBlockSAXFunc *) result) = ctxt->sax->cdataBlock;
|
---|
263 | } else if (!strcmp(name, "SAX function externalSubset")) {
|
---|
264 | *((externalSubsetSAXFunc *) result) = ctxt->sax->externalSubset;
|
---|
265 | } else {
|
---|
266 | return (-1);
|
---|
267 | }
|
---|
268 | return (0);
|
---|
269 | }
|
---|
270 |
|
---|
271 | /**
|
---|
272 | * xmlSetFeature:
|
---|
273 | * @ctxt: an XML/HTML parser context
|
---|
274 | * @name: the feature name
|
---|
275 | * @value: pointer to the location of the new value
|
---|
276 | *
|
---|
277 | * Change the current value of one feature of this parser instance
|
---|
278 | *
|
---|
279 | * Returns -1 in case or error, 0 otherwise
|
---|
280 | */
|
---|
281 | int
|
---|
282 | xmlSetFeature(xmlParserCtxtPtr ctxt, const char *name, void *value)
|
---|
283 | {
|
---|
284 | if ((ctxt == NULL) || (name == NULL) || (value == NULL))
|
---|
285 | return (-1);
|
---|
286 |
|
---|
287 | if (!strcmp(name, "validate")) {
|
---|
288 | int newvalidate = *((int *) value);
|
---|
289 |
|
---|
290 | if ((!ctxt->validate) && (newvalidate != 0)) {
|
---|
291 | if (ctxt->vctxt.warning == NULL)
|
---|
292 | ctxt->vctxt.warning = xmlParserValidityWarning;
|
---|
293 | if (ctxt->vctxt.error == NULL)
|
---|
294 | ctxt->vctxt.error = xmlParserValidityError;
|
---|
295 | ctxt->vctxt.nodeMax = 0;
|
---|
296 | }
|
---|
297 | ctxt->validate = newvalidate;
|
---|
298 | } else if (!strcmp(name, "keep blanks")) {
|
---|
299 | ctxt->keepBlanks = *((int *) value);
|
---|
300 | } else if (!strcmp(name, "disable SAX")) {
|
---|
301 | ctxt->disableSAX = *((int *) value);
|
---|
302 | } else if (!strcmp(name, "fetch external entities")) {
|
---|
303 | ctxt->loadsubset = *((int *) value);
|
---|
304 | } else if (!strcmp(name, "substitute entities")) {
|
---|
305 | ctxt->replaceEntities = *((int *) value);
|
---|
306 | } else if (!strcmp(name, "gather line info")) {
|
---|
307 | ctxt->record_info = *((int *) value);
|
---|
308 | } else if (!strcmp(name, "user data")) {
|
---|
309 | ctxt->userData = *((void **) value);
|
---|
310 | } else if (!strcmp(name, "is html")) {
|
---|
311 | ctxt->html = *((int *) value);
|
---|
312 | } else if (!strcmp(name, "is standalone")) {
|
---|
313 | ctxt->standalone = *((int *) value);
|
---|
314 | } else if (!strcmp(name, "document")) {
|
---|
315 | ctxt->myDoc = *((xmlDocPtr *) value);
|
---|
316 | } else if (!strcmp(name, "is well formed")) {
|
---|
317 | ctxt->wellFormed = *((int *) value);
|
---|
318 | } else if (!strcmp(name, "is valid")) {
|
---|
319 | ctxt->valid = *((int *) value);
|
---|
320 | } else if (!strcmp(name, "SAX block")) {
|
---|
321 | ctxt->sax = *((xmlSAXHandlerPtr *) value);
|
---|
322 | } else if (!strcmp(name, "SAX function internalSubset")) {
|
---|
323 | ctxt->sax->internalSubset = *((internalSubsetSAXFunc *) value);
|
---|
324 | } else if (!strcmp(name, "SAX function isStandalone")) {
|
---|
325 | ctxt->sax->isStandalone = *((isStandaloneSAXFunc *) value);
|
---|
326 | } else if (!strcmp(name, "SAX function hasInternalSubset")) {
|
---|
327 | ctxt->sax->hasInternalSubset =
|
---|
328 | *((hasInternalSubsetSAXFunc *) value);
|
---|
329 | } else if (!strcmp(name, "SAX function hasExternalSubset")) {
|
---|
330 | ctxt->sax->hasExternalSubset =
|
---|
331 | *((hasExternalSubsetSAXFunc *) value);
|
---|
332 | } else if (!strcmp(name, "SAX function resolveEntity")) {
|
---|
333 | ctxt->sax->resolveEntity = *((resolveEntitySAXFunc *) value);
|
---|
334 | } else if (!strcmp(name, "SAX function getEntity")) {
|
---|
335 | ctxt->sax->getEntity = *((getEntitySAXFunc *) value);
|
---|
336 | } else if (!strcmp(name, "SAX function entityDecl")) {
|
---|
337 | ctxt->sax->entityDecl = *((entityDeclSAXFunc *) value);
|
---|
338 | } else if (!strcmp(name, "SAX function notationDecl")) {
|
---|
339 | ctxt->sax->notationDecl = *((notationDeclSAXFunc *) value);
|
---|
340 | } else if (!strcmp(name, "SAX function attributeDecl")) {
|
---|
341 | ctxt->sax->attributeDecl = *((attributeDeclSAXFunc *) value);
|
---|
342 | } else if (!strcmp(name, "SAX function elementDecl")) {
|
---|
343 | ctxt->sax->elementDecl = *((elementDeclSAXFunc *) value);
|
---|
344 | } else if (!strcmp(name, "SAX function unparsedEntityDecl")) {
|
---|
345 | ctxt->sax->unparsedEntityDecl =
|
---|
346 | *((unparsedEntityDeclSAXFunc *) value);
|
---|
347 | } else if (!strcmp(name, "SAX function setDocumentLocator")) {
|
---|
348 | ctxt->sax->setDocumentLocator =
|
---|
349 | *((setDocumentLocatorSAXFunc *) value);
|
---|
350 | } else if (!strcmp(name, "SAX function startDocument")) {
|
---|
351 | ctxt->sax->startDocument = *((startDocumentSAXFunc *) value);
|
---|
352 | } else if (!strcmp(name, "SAX function endDocument")) {
|
---|
353 | ctxt->sax->endDocument = *((endDocumentSAXFunc *) value);
|
---|
354 | } else if (!strcmp(name, "SAX function startElement")) {
|
---|
355 | ctxt->sax->startElement = *((startElementSAXFunc *) value);
|
---|
356 | } else if (!strcmp(name, "SAX function endElement")) {
|
---|
357 | ctxt->sax->endElement = *((endElementSAXFunc *) value);
|
---|
358 | } else if (!strcmp(name, "SAX function reference")) {
|
---|
359 | ctxt->sax->reference = *((referenceSAXFunc *) value);
|
---|
360 | } else if (!strcmp(name, "SAX function characters")) {
|
---|
361 | ctxt->sax->characters = *((charactersSAXFunc *) value);
|
---|
362 | } else if (!strcmp(name, "SAX function ignorableWhitespace")) {
|
---|
363 | ctxt->sax->ignorableWhitespace =
|
---|
364 | *((ignorableWhitespaceSAXFunc *) value);
|
---|
365 | } else if (!strcmp(name, "SAX function processingInstruction")) {
|
---|
366 | ctxt->sax->processingInstruction =
|
---|
367 | *((processingInstructionSAXFunc *) value);
|
---|
368 | } else if (!strcmp(name, "SAX function comment")) {
|
---|
369 | ctxt->sax->comment = *((commentSAXFunc *) value);
|
---|
370 | } else if (!strcmp(name, "SAX function warning")) {
|
---|
371 | ctxt->sax->warning = *((warningSAXFunc *) value);
|
---|
372 | } else if (!strcmp(name, "SAX function error")) {
|
---|
373 | ctxt->sax->error = *((errorSAXFunc *) value);
|
---|
374 | } else if (!strcmp(name, "SAX function fatalError")) {
|
---|
375 | ctxt->sax->fatalError = *((fatalErrorSAXFunc *) value);
|
---|
376 | } else if (!strcmp(name, "SAX function getParameterEntity")) {
|
---|
377 | ctxt->sax->getParameterEntity =
|
---|
378 | *((getParameterEntitySAXFunc *) value);
|
---|
379 | } else if (!strcmp(name, "SAX function cdataBlock")) {
|
---|
380 | ctxt->sax->cdataBlock = *((cdataBlockSAXFunc *) value);
|
---|
381 | } else if (!strcmp(name, "SAX function externalSubset")) {
|
---|
382 | ctxt->sax->externalSubset = *((externalSubsetSAXFunc *) value);
|
---|
383 | } else {
|
---|
384 | return (-1);
|
---|
385 | }
|
---|
386 | return (0);
|
---|
387 | }
|
---|
388 |
|
---|
389 | /**
|
---|
390 | * xmlDecodeEntities:
|
---|
391 | * @ctxt: the parser context
|
---|
392 | * @len: the len to decode (in bytes !), -1 for no size limit
|
---|
393 | * @what: combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF
|
---|
394 | * @end: an end marker xmlChar, 0 if none
|
---|
395 | * @end2: an end marker xmlChar, 0 if none
|
---|
396 | * @end3: an end marker xmlChar, 0 if none
|
---|
397 | *
|
---|
398 | * This function is deprecated, we now always process entities content
|
---|
399 | * through xmlStringDecodeEntities
|
---|
400 | *
|
---|
401 | * TODO: remove it in next major release.
|
---|
402 | *
|
---|
403 | * [67] Reference ::= EntityRef | CharRef
|
---|
404 | *
|
---|
405 | * [69] PEReference ::= '%' Name ';'
|
---|
406 | *
|
---|
407 | * Returns A newly allocated string with the substitution done. The caller
|
---|
408 | * must deallocate it !
|
---|
409 | */
|
---|
410 | xmlChar *
|
---|
411 | xmlDecodeEntities(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
|
---|
412 | int len ATTRIBUTE_UNUSED, int what ATTRIBUTE_UNUSED,
|
---|
413 | xmlChar end ATTRIBUTE_UNUSED,
|
---|
414 | xmlChar end2 ATTRIBUTE_UNUSED,
|
---|
415 | xmlChar end3 ATTRIBUTE_UNUSED)
|
---|
416 | {
|
---|
417 | static int deprecated = 0;
|
---|
418 |
|
---|
419 | if (!deprecated) {
|
---|
420 | fprintf(stderr,
|
---|
421 | "xmlDecodeEntities() deprecated function reached\n");
|
---|
422 | deprecated = 1;
|
---|
423 | }
|
---|
424 | return (NULL);
|
---|
425 | }
|
---|
426 |
|
---|
427 | /**
|
---|
428 | * xmlNamespaceParseNCName:
|
---|
429 | * @ctxt: an XML parser context
|
---|
430 | *
|
---|
431 | * parse an XML namespace name.
|
---|
432 | *
|
---|
433 | * TODO: this seems not in use anymore, the namespace handling is done on
|
---|
434 | * top of the SAX interfaces, i.e. not on raw input.
|
---|
435 | *
|
---|
436 | * [NS 3] NCName ::= (Letter | '_') (NCNameChar)*
|
---|
437 | *
|
---|
438 | * [NS 4] NCNameChar ::= Letter | Digit | '.' | '-' | '_' |
|
---|
439 | * CombiningChar | Extender
|
---|
440 | *
|
---|
441 | * Returns the namespace name or NULL
|
---|
442 | */
|
---|
443 |
|
---|
444 | xmlChar *
|
---|
445 | xmlNamespaceParseNCName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
|
---|
446 | {
|
---|
447 | static int deprecated = 0;
|
---|
448 |
|
---|
449 | if (!deprecated) {
|
---|
450 | fprintf(stderr,
|
---|
451 | "xmlNamespaceParseNCName() deprecated function reached\n");
|
---|
452 | deprecated = 1;
|
---|
453 | }
|
---|
454 | return (NULL);
|
---|
455 | }
|
---|
456 |
|
---|
457 | /**
|
---|
458 | * xmlNamespaceParseQName:
|
---|
459 | * @ctxt: an XML parser context
|
---|
460 | * @prefix: a xmlChar **
|
---|
461 | *
|
---|
462 | * TODO: this seems not in use anymore, the namespace handling is done on
|
---|
463 | * top of the SAX interfaces, i.e. not on raw input.
|
---|
464 | *
|
---|
465 | * parse an XML qualified name
|
---|
466 | *
|
---|
467 | * [NS 5] QName ::= (Prefix ':')? LocalPart
|
---|
468 | *
|
---|
469 | * [NS 6] Prefix ::= NCName
|
---|
470 | *
|
---|
471 | * [NS 7] LocalPart ::= NCName
|
---|
472 | *
|
---|
473 | * Returns the local part, and prefix is updated
|
---|
474 | * to get the Prefix if any.
|
---|
475 | */
|
---|
476 |
|
---|
477 | xmlChar *
|
---|
478 | xmlNamespaceParseQName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
|
---|
479 | xmlChar ** prefix ATTRIBUTE_UNUSED)
|
---|
480 | {
|
---|
481 |
|
---|
482 | static int deprecated = 0;
|
---|
483 |
|
---|
484 | if (!deprecated) {
|
---|
485 | fprintf(stderr,
|
---|
486 | "xmlNamespaceParseQName() deprecated function reached\n");
|
---|
487 | deprecated = 1;
|
---|
488 | }
|
---|
489 | return (NULL);
|
---|
490 | }
|
---|
491 |
|
---|
492 | /**
|
---|
493 | * xmlNamespaceParseNSDef:
|
---|
494 | * @ctxt: an XML parser context
|
---|
495 | *
|
---|
496 | * parse a namespace prefix declaration
|
---|
497 | *
|
---|
498 | * TODO: this seems not in use anymore, the namespace handling is done on
|
---|
499 | * top of the SAX interfaces, i.e. not on raw input.
|
---|
500 | *
|
---|
501 | * [NS 1] NSDef ::= PrefixDef Eq SystemLiteral
|
---|
502 | *
|
---|
503 | * [NS 2] PrefixDef ::= 'xmlns' (':' NCName)?
|
---|
504 | *
|
---|
505 | * Returns the namespace name
|
---|
506 | */
|
---|
507 |
|
---|
508 | xmlChar *
|
---|
509 | xmlNamespaceParseNSDef(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
|
---|
510 | {
|
---|
511 | static int deprecated = 0;
|
---|
512 |
|
---|
513 | if (!deprecated) {
|
---|
514 | fprintf(stderr,
|
---|
515 | "xmlNamespaceParseNSDef() deprecated function reached\n");
|
---|
516 | deprecated = 1;
|
---|
517 | }
|
---|
518 | return (NULL);
|
---|
519 | }
|
---|
520 |
|
---|
521 | /**
|
---|
522 | * xmlParseQuotedString:
|
---|
523 | * @ctxt: an XML parser context
|
---|
524 | *
|
---|
525 | * Parse and return a string between quotes or doublequotes
|
---|
526 | *
|
---|
527 | * TODO: Deprecated, to be removed at next drop of binary compatibility
|
---|
528 | *
|
---|
529 | * Returns the string parser or NULL.
|
---|
530 | */
|
---|
531 | xmlChar *
|
---|
532 | xmlParseQuotedString(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
|
---|
533 | {
|
---|
534 | static int deprecated = 0;
|
---|
535 |
|
---|
536 | if (!deprecated) {
|
---|
537 | fprintf(stderr,
|
---|
538 | "xmlParseQuotedString() deprecated function reached\n");
|
---|
539 | deprecated = 1;
|
---|
540 | }
|
---|
541 | return (NULL);
|
---|
542 | }
|
---|
543 |
|
---|
544 | /**
|
---|
545 | * xmlParseNamespace:
|
---|
546 | * @ctxt: an XML parser context
|
---|
547 | *
|
---|
548 | * xmlParseNamespace: parse specific PI '<?namespace ...' constructs.
|
---|
549 | *
|
---|
550 | * This is what the older xml-name Working Draft specified, a bunch of
|
---|
551 | * other stuff may still rely on it, so support is still here as
|
---|
552 | * if it was declared on the root of the Tree:-(
|
---|
553 | *
|
---|
554 | * TODO: remove from library
|
---|
555 | *
|
---|
556 | * To be removed at next drop of binary compatibility
|
---|
557 | */
|
---|
558 |
|
---|
559 | void
|
---|
560 | xmlParseNamespace(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
|
---|
561 | {
|
---|
562 | static int deprecated = 0;
|
---|
563 |
|
---|
564 | if (!deprecated) {
|
---|
565 | fprintf(stderr,
|
---|
566 | "xmlParseNamespace() deprecated function reached\n");
|
---|
567 | deprecated = 1;
|
---|
568 | }
|
---|
569 | }
|
---|
570 |
|
---|
571 | /**
|
---|
572 | * xmlScanName:
|
---|
573 | * @ctxt: an XML parser context
|
---|
574 | *
|
---|
575 | * Trickery: parse an XML name but without consuming the input flow
|
---|
576 | * Needed for rollback cases. Used only when parsing entities references.
|
---|
577 | *
|
---|
578 | * TODO: seems deprecated now, only used in the default part of
|
---|
579 | * xmlParserHandleReference
|
---|
580 | *
|
---|
581 | * [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' |
|
---|
582 | * CombiningChar | Extender
|
---|
583 | *
|
---|
584 | * [5] Name ::= (Letter | '_' | ':') (NameChar)*
|
---|
585 | *
|
---|
586 | * [6] Names ::= Name (S Name)*
|
---|
587 | *
|
---|
588 | * Returns the Name parsed or NULL
|
---|
589 | */
|
---|
590 |
|
---|
591 | xmlChar *
|
---|
592 | xmlScanName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
|
---|
593 | {
|
---|
594 | static int deprecated = 0;
|
---|
595 |
|
---|
596 | if (!deprecated) {
|
---|
597 | fprintf(stderr,
|
---|
598 | "xmlScanName() deprecated function reached\n");
|
---|
599 | deprecated = 1;
|
---|
600 | }
|
---|
601 | return (NULL);
|
---|
602 | }
|
---|
603 |
|
---|
604 | /**
|
---|
605 | * xmlParserHandleReference:
|
---|
606 | * @ctxt: the parser context
|
---|
607 | *
|
---|
608 | * TODO: Remove, now deprecated ... the test is done directly in the
|
---|
609 | * content parsing
|
---|
610 | * routines.
|
---|
611 | *
|
---|
612 | * [67] Reference ::= EntityRef | CharRef
|
---|
613 | *
|
---|
614 | * [68] EntityRef ::= '&' Name ';'
|
---|
615 | *
|
---|
616 | * [ WFC: Entity Declared ]
|
---|
617 | * the Name given in the entity reference must match that in an entity
|
---|
618 | * declaration, except that well-formed documents need not declare any
|
---|
619 | * of the following entities: amp, lt, gt, apos, quot.
|
---|
620 | *
|
---|
621 | * [ WFC: Parsed Entity ]
|
---|
622 | * An entity reference must not contain the name of an unparsed entity
|
---|
623 | *
|
---|
624 | * [66] CharRef ::= '&#' [0-9]+ ';' |
|
---|
625 | * '&#x' [0-9a-fA-F]+ ';'
|
---|
626 | *
|
---|
627 | * A PEReference may have been detected in the current input stream
|
---|
628 | * the handling is done accordingly to
|
---|
629 | * http://www.w3.org/TR/REC-xml#entproc
|
---|
630 | */
|
---|
631 | void
|
---|
632 | xmlParserHandleReference(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
|
---|
633 | {
|
---|
634 | static int deprecated = 0;
|
---|
635 |
|
---|
636 | if (!deprecated) {
|
---|
637 | fprintf(stderr,
|
---|
638 | "xmlParserHandleReference() deprecated function reached\n");
|
---|
639 | deprecated = 1;
|
---|
640 | }
|
---|
641 |
|
---|
642 | return;
|
---|
643 | }
|
---|
644 |
|
---|
645 | /**
|
---|
646 | * xmlHandleEntity:
|
---|
647 | * @ctxt: an XML parser context
|
---|
648 | * @entity: an XML entity pointer.
|
---|
649 | *
|
---|
650 | * Default handling of defined entities, when should we define a new input
|
---|
651 | * stream ? When do we just handle that as a set of chars ?
|
---|
652 | *
|
---|
653 | * OBSOLETE: to be removed at some point.
|
---|
654 | */
|
---|
655 |
|
---|
656 | void
|
---|
657 | xmlHandleEntity(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
|
---|
658 | xmlEntityPtr entity ATTRIBUTE_UNUSED)
|
---|
659 | {
|
---|
660 | static int deprecated = 0;
|
---|
661 |
|
---|
662 | if (!deprecated) {
|
---|
663 | fprintf(stderr,
|
---|
664 | "xmlHandleEntity() deprecated function reached\n");
|
---|
665 | deprecated = 1;
|
---|
666 | }
|
---|
667 | }
|
---|
668 |
|
---|
669 | /**
|
---|
670 | * xmlNewGlobalNs:
|
---|
671 | * @doc: the document carrying the namespace
|
---|
672 | * @href: the URI associated
|
---|
673 | * @prefix: the prefix for the namespace
|
---|
674 | *
|
---|
675 | * Creation of a Namespace, the old way using PI and without scoping
|
---|
676 | * DEPRECATED !!!
|
---|
677 | * Returns NULL this functionality had been removed
|
---|
678 | */
|
---|
679 | xmlNsPtr
|
---|
680 | xmlNewGlobalNs(xmlDocPtr doc ATTRIBUTE_UNUSED,
|
---|
681 | const xmlChar * href ATTRIBUTE_UNUSED,
|
---|
682 | const xmlChar * prefix ATTRIBUTE_UNUSED)
|
---|
683 | {
|
---|
684 | static int deprecated = 0;
|
---|
685 |
|
---|
686 | if (!deprecated) {
|
---|
687 | fprintf(stderr,
|
---|
688 | "xmlNewGlobalNs() deprecated function reached\n");
|
---|
689 | deprecated = 1;
|
---|
690 | }
|
---|
691 | return (NULL);
|
---|
692 | }
|
---|
693 |
|
---|
694 | /**
|
---|
695 | * xmlUpgradeOldNs:
|
---|
696 | * @doc: a document pointer
|
---|
697 | *
|
---|
698 | * Upgrade old style Namespaces (PI) and move them to the root of the document.
|
---|
699 | * DEPRECATED
|
---|
700 | */
|
---|
701 | void
|
---|
702 | xmlUpgradeOldNs(xmlDocPtr doc ATTRIBUTE_UNUSED)
|
---|
703 | {
|
---|
704 | static int deprecated = 0;
|
---|
705 |
|
---|
706 | if (!deprecated) {
|
---|
707 | fprintf(stderr,
|
---|
708 | "xmlUpgradeOldNs() deprecated function reached\n");
|
---|
709 | deprecated = 1;
|
---|
710 | }
|
---|
711 | }
|
---|
712 |
|
---|
713 | /**
|
---|
714 | * xmlEncodeEntities:
|
---|
715 | * @doc: the document containing the string
|
---|
716 | * @input: A string to convert to XML.
|
---|
717 | *
|
---|
718 | * TODO: remove xmlEncodeEntities, once we are not afraid of breaking binary
|
---|
719 | * compatibility
|
---|
720 | *
|
---|
721 | * People must migrate their code to xmlEncodeEntitiesReentrant !
|
---|
722 | * This routine will issue a warning when encountered.
|
---|
723 | *
|
---|
724 | * Returns NULL
|
---|
725 | */
|
---|
726 | const xmlChar *
|
---|
727 | xmlEncodeEntities(xmlDocPtr doc ATTRIBUTE_UNUSED,
|
---|
728 | const xmlChar * input ATTRIBUTE_UNUSED)
|
---|
729 | {
|
---|
730 | static int warning = 1;
|
---|
731 |
|
---|
732 | if (warning) {
|
---|
733 | fprintf(stderr,
|
---|
734 | "Deprecated API xmlEncodeEntities() used\n");
|
---|
735 | fprintf(stderr,
|
---|
736 | " change code to use xmlEncodeEntitiesReentrant()\n");
|
---|
737 | warning = 0;
|
---|
738 | }
|
---|
739 | return (NULL);
|
---|
740 | }
|
---|
741 |
|
---|
742 | /**
|
---|
743 | * xmlSetEntityReferenceFunc:
|
---|
744 | * @func: A valid function
|
---|
745 | *
|
---|
746 | * Set the function to call call back when a xml reference has been made
|
---|
747 | */
|
---|
748 | void
|
---|
749 | xmlSetEntityReferenceFunc(xmlEntityReferenceFunc func ATTRIBUTE_UNUSED)
|
---|
750 | {
|
---|
751 | }
|
---|
752 |
|
---|
753 | /************************************************************************
|
---|
754 | * *
|
---|
755 | * Old set of SAXv1 functions *
|
---|
756 | * *
|
---|
757 | ************************************************************************/
|
---|
758 | static int deprecated_v1_msg = 0;
|
---|
759 |
|
---|
760 | #define DEPRECATED(n) \
|
---|
761 | if (deprecated_v1_msg == 0) \
|
---|
762 | fprintf(stderr, \
|
---|
763 | "Use of deprecated SAXv1 function %s\n", n); \
|
---|
764 | deprecated_v1_msg++;
|
---|
765 |
|
---|
766 | /**
|
---|
767 | * getPublicId:
|
---|
768 | * @ctx: the user data (XML parser context)
|
---|
769 | *
|
---|
770 | * Provides the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN"
|
---|
771 | * DEPRECATED: use xmlSAX2GetPublicId()
|
---|
772 | *
|
---|
773 | * Returns a xmlChar *
|
---|
774 | */
|
---|
775 | const xmlChar *
|
---|
776 | getPublicId(void *ctx)
|
---|
777 | {
|
---|
778 | DEPRECATED("getPublicId")
|
---|
779 | return (xmlSAX2GetPublicId(ctx));
|
---|
780 | }
|
---|
781 |
|
---|
782 | /**
|
---|
783 | * getSystemId:
|
---|
784 | * @ctx: the user data (XML parser context)
|
---|
785 | *
|
---|
786 | * Provides the system ID, basically URL or filename e.g.
|
---|
787 | * http://www.sgmlsource.com/dtds/memo.dtd
|
---|
788 | * DEPRECATED: use xmlSAX2GetSystemId()
|
---|
789 | *
|
---|
790 | * Returns a xmlChar *
|
---|
791 | */
|
---|
792 | const xmlChar *
|
---|
793 | getSystemId(void *ctx)
|
---|
794 | {
|
---|
795 | DEPRECATED("getSystemId")
|
---|
796 | return (xmlSAX2GetSystemId(ctx));
|
---|
797 | }
|
---|
798 |
|
---|
799 | /**
|
---|
800 | * getLineNumber:
|
---|
801 | * @ctx: the user data (XML parser context)
|
---|
802 | *
|
---|
803 | * Provide the line number of the current parsing point.
|
---|
804 | * DEPRECATED: use xmlSAX2GetLineNumber()
|
---|
805 | *
|
---|
806 | * Returns an int
|
---|
807 | */
|
---|
808 | int
|
---|
809 | getLineNumber(void *ctx)
|
---|
810 | {
|
---|
811 | DEPRECATED("getLineNumber")
|
---|
812 | return (xmlSAX2GetLineNumber(ctx));
|
---|
813 | }
|
---|
814 |
|
---|
815 | /**
|
---|
816 | * getColumnNumber:
|
---|
817 | * @ctx: the user data (XML parser context)
|
---|
818 | *
|
---|
819 | * Provide the column number of the current parsing point.
|
---|
820 | * DEPRECATED: use xmlSAX2GetColumnNumber()
|
---|
821 | *
|
---|
822 | * Returns an int
|
---|
823 | */
|
---|
824 | int
|
---|
825 | getColumnNumber(void *ctx)
|
---|
826 | {
|
---|
827 | DEPRECATED("getColumnNumber")
|
---|
828 | return (xmlSAX2GetColumnNumber(ctx));
|
---|
829 | }
|
---|
830 |
|
---|
831 | /**
|
---|
832 | * isStandalone:
|
---|
833 | * @ctx: the user data (XML parser context)
|
---|
834 | *
|
---|
835 | * Is this document tagged standalone ?
|
---|
836 | * DEPRECATED: use xmlSAX2IsStandalone()
|
---|
837 | *
|
---|
838 | * Returns 1 if true
|
---|
839 | */
|
---|
840 | int
|
---|
841 | isStandalone(void *ctx)
|
---|
842 | {
|
---|
843 | DEPRECATED("isStandalone")
|
---|
844 | return (xmlSAX2IsStandalone(ctx));
|
---|
845 | }
|
---|
846 |
|
---|
847 | /**
|
---|
848 | * hasInternalSubset:
|
---|
849 | * @ctx: the user data (XML parser context)
|
---|
850 | *
|
---|
851 | * Does this document has an internal subset
|
---|
852 | * DEPRECATED: use xmlSAX2HasInternalSubset()
|
---|
853 | *
|
---|
854 | * Returns 1 if true
|
---|
855 | */
|
---|
856 | int
|
---|
857 | hasInternalSubset(void *ctx)
|
---|
858 | {
|
---|
859 | DEPRECATED("hasInternalSubset")
|
---|
860 | return (xmlSAX2HasInternalSubset(ctx));
|
---|
861 | }
|
---|
862 |
|
---|
863 | /**
|
---|
864 | * hasExternalSubset:
|
---|
865 | * @ctx: the user data (XML parser context)
|
---|
866 | *
|
---|
867 | * Does this document has an external subset
|
---|
868 | * DEPRECATED: use xmlSAX2HasExternalSubset()
|
---|
869 | *
|
---|
870 | * Returns 1 if true
|
---|
871 | */
|
---|
872 | int
|
---|
873 | hasExternalSubset(void *ctx)
|
---|
874 | {
|
---|
875 | DEPRECATED("hasExternalSubset")
|
---|
876 | return (xmlSAX2HasExternalSubset(ctx));
|
---|
877 | }
|
---|
878 |
|
---|
879 | /**
|
---|
880 | * internalSubset:
|
---|
881 | * @ctx: the user data (XML parser context)
|
---|
882 | * @name: the root element name
|
---|
883 | * @ExternalID: the external ID
|
---|
884 | * @SystemID: the SYSTEM ID (e.g. filename or URL)
|
---|
885 | *
|
---|
886 | * Callback on internal subset declaration.
|
---|
887 | * DEPRECATED: use xmlSAX2InternalSubset()
|
---|
888 | */
|
---|
889 | void
|
---|
890 | internalSubset(void *ctx, const xmlChar * name,
|
---|
891 | const xmlChar * ExternalID, const xmlChar * SystemID)
|
---|
892 | {
|
---|
893 | DEPRECATED("internalSubset")
|
---|
894 | xmlSAX2InternalSubset(ctx, name, ExternalID, SystemID);
|
---|
895 | }
|
---|
896 |
|
---|
897 | /**
|
---|
898 | * externalSubset:
|
---|
899 | * @ctx: the user data (XML parser context)
|
---|
900 | * @name: the root element name
|
---|
901 | * @ExternalID: the external ID
|
---|
902 | * @SystemID: the SYSTEM ID (e.g. filename or URL)
|
---|
903 | *
|
---|
904 | * Callback on external subset declaration.
|
---|
905 | * DEPRECATED: use xmlSAX2ExternalSubset()
|
---|
906 | */
|
---|
907 | void
|
---|
908 | externalSubset(void *ctx, const xmlChar * name,
|
---|
909 | const xmlChar * ExternalID, const xmlChar * SystemID)
|
---|
910 | {
|
---|
911 | DEPRECATED("externalSubset")
|
---|
912 | xmlSAX2ExternalSubset(ctx, name, ExternalID, SystemID);
|
---|
913 | }
|
---|
914 |
|
---|
915 | /**
|
---|
916 | * resolveEntity:
|
---|
917 | * @ctx: the user data (XML parser context)
|
---|
918 | * @publicId: The public ID of the entity
|
---|
919 | * @systemId: The system ID of the entity
|
---|
920 | *
|
---|
921 | * The entity loader, to control the loading of external entities,
|
---|
922 | * the application can either:
|
---|
923 | * - override this resolveEntity() callback in the SAX block
|
---|
924 | * - or better use the xmlSetExternalEntityLoader() function to
|
---|
925 | * set up it's own entity resolution routine
|
---|
926 | * DEPRECATED: use xmlSAX2ResolveEntity()
|
---|
927 | *
|
---|
928 | * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
|
---|
929 | */
|
---|
930 | xmlParserInputPtr
|
---|
931 | resolveEntity(void *ctx, const xmlChar * publicId,
|
---|
932 | const xmlChar * systemId)
|
---|
933 | {
|
---|
934 | DEPRECATED("resolveEntity")
|
---|
935 | return (xmlSAX2ResolveEntity(ctx, publicId, systemId));
|
---|
936 | }
|
---|
937 |
|
---|
938 | /**
|
---|
939 | * getEntity:
|
---|
940 | * @ctx: the user data (XML parser context)
|
---|
941 | * @name: The entity name
|
---|
942 | *
|
---|
943 | * Get an entity by name
|
---|
944 | * DEPRECATED: use xmlSAX2GetEntity()
|
---|
945 | *
|
---|
946 | * Returns the xmlEntityPtr if found.
|
---|
947 | */
|
---|
948 | xmlEntityPtr
|
---|
949 | getEntity(void *ctx, const xmlChar * name)
|
---|
950 | {
|
---|
951 | DEPRECATED("getEntity")
|
---|
952 | return (xmlSAX2GetEntity(ctx, name));
|
---|
953 | }
|
---|
954 |
|
---|
955 | /**
|
---|
956 | * getParameterEntity:
|
---|
957 | * @ctx: the user data (XML parser context)
|
---|
958 | * @name: The entity name
|
---|
959 | *
|
---|
960 | * Get a parameter entity by name
|
---|
961 | * DEPRECATED: use xmlSAX2GetParameterEntity()
|
---|
962 | *
|
---|
963 | * Returns the xmlEntityPtr if found.
|
---|
964 | */
|
---|
965 | xmlEntityPtr
|
---|
966 | getParameterEntity(void *ctx, const xmlChar * name)
|
---|
967 | {
|
---|
968 | DEPRECATED("getParameterEntity")
|
---|
969 | return (xmlSAX2GetParameterEntity(ctx, name));
|
---|
970 | }
|
---|
971 |
|
---|
972 |
|
---|
973 | /**
|
---|
974 | * entityDecl:
|
---|
975 | * @ctx: the user data (XML parser context)
|
---|
976 | * @name: the entity name
|
---|
977 | * @type: the entity type
|
---|
978 | * @publicId: The public ID of the entity
|
---|
979 | * @systemId: The system ID of the entity
|
---|
980 | * @content: the entity value (without processing).
|
---|
981 | *
|
---|
982 | * An entity definition has been parsed
|
---|
983 | * DEPRECATED: use xmlSAX2EntityDecl()
|
---|
984 | */
|
---|
985 | void
|
---|
986 | entityDecl(void *ctx, const xmlChar * name, int type,
|
---|
987 | const xmlChar * publicId, const xmlChar * systemId,
|
---|
988 | xmlChar * content)
|
---|
989 | {
|
---|
990 | DEPRECATED("entityDecl")
|
---|
991 | xmlSAX2EntityDecl(ctx, name, type, publicId, systemId, content);
|
---|
992 | }
|
---|
993 |
|
---|
994 | /**
|
---|
995 | * attributeDecl:
|
---|
996 | * @ctx: the user data (XML parser context)
|
---|
997 | * @elem: the name of the element
|
---|
998 | * @fullname: the attribute name
|
---|
999 | * @type: the attribute type
|
---|
1000 | * @def: the type of default value
|
---|
1001 | * @defaultValue: the attribute default value
|
---|
1002 | * @tree: the tree of enumerated value set
|
---|
1003 | *
|
---|
1004 | * An attribute definition has been parsed
|
---|
1005 | * DEPRECATED: use xmlSAX2AttributeDecl()
|
---|
1006 | */
|
---|
1007 | void
|
---|
1008 | attributeDecl(void *ctx, const xmlChar * elem, const xmlChar * fullname,
|
---|
1009 | int type, int def, const xmlChar * defaultValue,
|
---|
1010 | xmlEnumerationPtr tree)
|
---|
1011 | {
|
---|
1012 | DEPRECATED("attributeDecl")
|
---|
1013 | xmlSAX2AttributeDecl(ctx, elem, fullname, type, def, defaultValue,
|
---|
1014 | tree);
|
---|
1015 | }
|
---|
1016 |
|
---|
1017 | /**
|
---|
1018 | * elementDecl:
|
---|
1019 | * @ctx: the user data (XML parser context)
|
---|
1020 | * @name: the element name
|
---|
1021 | * @type: the element type
|
---|
1022 | * @content: the element value tree
|
---|
1023 | *
|
---|
1024 | * An element definition has been parsed
|
---|
1025 | * DEPRECATED: use xmlSAX2ElementDecl()
|
---|
1026 | */
|
---|
1027 | void
|
---|
1028 | elementDecl(void *ctx, const xmlChar * name, int type,
|
---|
1029 | xmlElementContentPtr content)
|
---|
1030 | {
|
---|
1031 | DEPRECATED("elementDecl")
|
---|
1032 | xmlSAX2ElementDecl(ctx, name, type, content);
|
---|
1033 | }
|
---|
1034 |
|
---|
1035 | /**
|
---|
1036 | * notationDecl:
|
---|
1037 | * @ctx: the user data (XML parser context)
|
---|
1038 | * @name: The name of the notation
|
---|
1039 | * @publicId: The public ID of the entity
|
---|
1040 | * @systemId: The system ID of the entity
|
---|
1041 | *
|
---|
1042 | * What to do when a notation declaration has been parsed.
|
---|
1043 | * DEPRECATED: use xmlSAX2NotationDecl()
|
---|
1044 | */
|
---|
1045 | void
|
---|
1046 | notationDecl(void *ctx, const xmlChar * name,
|
---|
1047 | const xmlChar * publicId, const xmlChar * systemId)
|
---|
1048 | {
|
---|
1049 | DEPRECATED("notationDecl")
|
---|
1050 | xmlSAX2NotationDecl(ctx, name, publicId, systemId);
|
---|
1051 | }
|
---|
1052 |
|
---|
1053 | /**
|
---|
1054 | * unparsedEntityDecl:
|
---|
1055 | * @ctx: the user data (XML parser context)
|
---|
1056 | * @name: The name of the entity
|
---|
1057 | * @publicId: The public ID of the entity
|
---|
1058 | * @systemId: The system ID of the entity
|
---|
1059 | * @notationName: the name of the notation
|
---|
1060 | *
|
---|
1061 | * What to do when an unparsed entity declaration is parsed
|
---|
1062 | * DEPRECATED: use xmlSAX2UnparsedEntityDecl()
|
---|
1063 | */
|
---|
1064 | void
|
---|
1065 | unparsedEntityDecl(void *ctx, const xmlChar * name,
|
---|
1066 | const xmlChar * publicId, const xmlChar * systemId,
|
---|
1067 | const xmlChar * notationName)
|
---|
1068 | {
|
---|
1069 | DEPRECATED("unparsedEntityDecl")
|
---|
1070 | xmlSAX2UnparsedEntityDecl(ctx, name, publicId, systemId,
|
---|
1071 | notationName);
|
---|
1072 | }
|
---|
1073 |
|
---|
1074 | /**
|
---|
1075 | * setDocumentLocator:
|
---|
1076 | * @ctx: the user data (XML parser context)
|
---|
1077 | * @loc: A SAX Locator
|
---|
1078 | *
|
---|
1079 | * Receive the document locator at startup, actually xmlDefaultSAXLocator
|
---|
1080 | * Everything is available on the context, so this is useless in our case.
|
---|
1081 | * DEPRECATED
|
---|
1082 | */
|
---|
1083 | void
|
---|
1084 | setDocumentLocator(void *ctx ATTRIBUTE_UNUSED,
|
---|
1085 | xmlSAXLocatorPtr loc ATTRIBUTE_UNUSED)
|
---|
1086 | {
|
---|
1087 | DEPRECATED("setDocumentLocator")
|
---|
1088 | }
|
---|
1089 |
|
---|
1090 | /**
|
---|
1091 | * startDocument:
|
---|
1092 | * @ctx: the user data (XML parser context)
|
---|
1093 | *
|
---|
1094 | * called when the document start being processed.
|
---|
1095 | * DEPRECATED: use xmlSAX2StartDocument()
|
---|
1096 | */
|
---|
1097 | void
|
---|
1098 | startDocument(void *ctx)
|
---|
1099 | {
|
---|
1100 | /* don't be too painful for glade users */
|
---|
1101 | /* DEPRECATED("startDocument") */
|
---|
1102 | xmlSAX2StartDocument(ctx);
|
---|
1103 | }
|
---|
1104 |
|
---|
1105 | /**
|
---|
1106 | * endDocument:
|
---|
1107 | * @ctx: the user data (XML parser context)
|
---|
1108 | *
|
---|
1109 | * called when the document end has been detected.
|
---|
1110 | * DEPRECATED: use xmlSAX2EndDocument()
|
---|
1111 | */
|
---|
1112 | void
|
---|
1113 | endDocument(void *ctx)
|
---|
1114 | {
|
---|
1115 | DEPRECATED("endDocument")
|
---|
1116 | xmlSAX2EndDocument(ctx);
|
---|
1117 | }
|
---|
1118 |
|
---|
1119 | /**
|
---|
1120 | * attribute:
|
---|
1121 | * @ctx: the user data (XML parser context)
|
---|
1122 | * @fullname: The attribute name, including namespace prefix
|
---|
1123 | * @value: The attribute value
|
---|
1124 | *
|
---|
1125 | * Handle an attribute that has been read by the parser.
|
---|
1126 | * The default handling is to convert the attribute into an
|
---|
1127 | * DOM subtree and past it in a new xmlAttr element added to
|
---|
1128 | * the element.
|
---|
1129 | * DEPRECATED: use xmlSAX2Attribute()
|
---|
1130 | */
|
---|
1131 | void
|
---|
1132 | attribute(void *ctx ATTRIBUTE_UNUSED,
|
---|
1133 | const xmlChar * fullname ATTRIBUTE_UNUSED,
|
---|
1134 | const xmlChar * value ATTRIBUTE_UNUSED)
|
---|
1135 | {
|
---|
1136 | DEPRECATED("attribute")
|
---|
1137 | }
|
---|
1138 |
|
---|
1139 | /**
|
---|
1140 | * startElement:
|
---|
1141 | * @ctx: the user data (XML parser context)
|
---|
1142 | * @fullname: The element name, including namespace prefix
|
---|
1143 | * @atts: An array of name/value attributes pairs, NULL terminated
|
---|
1144 | *
|
---|
1145 | * called when an opening tag has been processed.
|
---|
1146 | * DEPRECATED: use xmlSAX2StartElement()
|
---|
1147 | */
|
---|
1148 | void
|
---|
1149 | startElement(void *ctx, const xmlChar * fullname, const xmlChar ** atts)
|
---|
1150 | {
|
---|
1151 | xmlSAX2StartElement(ctx, fullname, atts);
|
---|
1152 | }
|
---|
1153 |
|
---|
1154 | /**
|
---|
1155 | * endElement:
|
---|
1156 | * @ctx: the user data (XML parser context)
|
---|
1157 | * @name: The element name
|
---|
1158 | *
|
---|
1159 | * called when the end of an element has been detected.
|
---|
1160 | * DEPRECATED: use xmlSAX2EndElement()
|
---|
1161 | */
|
---|
1162 | void
|
---|
1163 | endElement(void *ctx, const xmlChar * name ATTRIBUTE_UNUSED)
|
---|
1164 | {
|
---|
1165 | DEPRECATED("endElement")
|
---|
1166 | xmlSAX2EndElement(ctx, name);
|
---|
1167 | }
|
---|
1168 |
|
---|
1169 | /**
|
---|
1170 | * reference:
|
---|
1171 | * @ctx: the user data (XML parser context)
|
---|
1172 | * @name: The entity name
|
---|
1173 | *
|
---|
1174 | * called when an entity reference is detected.
|
---|
1175 | * DEPRECATED: use xmlSAX2Reference()
|
---|
1176 | */
|
---|
1177 | void
|
---|
1178 | reference(void *ctx, const xmlChar * name)
|
---|
1179 | {
|
---|
1180 | DEPRECATED("reference")
|
---|
1181 | xmlSAX2Reference(ctx, name);
|
---|
1182 | }
|
---|
1183 |
|
---|
1184 | /**
|
---|
1185 | * characters:
|
---|
1186 | * @ctx: the user data (XML parser context)
|
---|
1187 | * @ch: a xmlChar string
|
---|
1188 | * @len: the number of xmlChar
|
---|
1189 | *
|
---|
1190 | * receiving some chars from the parser.
|
---|
1191 | * DEPRECATED: use xmlSAX2Characters()
|
---|
1192 | */
|
---|
1193 | void
|
---|
1194 | characters(void *ctx, const xmlChar * ch, int len)
|
---|
1195 | {
|
---|
1196 | DEPRECATED("characters")
|
---|
1197 | xmlSAX2Characters(ctx, ch, len);
|
---|
1198 | }
|
---|
1199 |
|
---|
1200 | /**
|
---|
1201 | * ignorableWhitespace:
|
---|
1202 | * @ctx: the user data (XML parser context)
|
---|
1203 | * @ch: a xmlChar string
|
---|
1204 | * @len: the number of xmlChar
|
---|
1205 | *
|
---|
1206 | * receiving some ignorable whitespaces from the parser.
|
---|
1207 | * UNUSED: by default the DOM building will use characters
|
---|
1208 | * DEPRECATED: use xmlSAX2IgnorableWhitespace()
|
---|
1209 | */
|
---|
1210 | void
|
---|
1211 | ignorableWhitespace(void *ctx ATTRIBUTE_UNUSED,
|
---|
1212 | const xmlChar * ch ATTRIBUTE_UNUSED,
|
---|
1213 | int len ATTRIBUTE_UNUSED)
|
---|
1214 | {
|
---|
1215 | DEPRECATED("ignorableWhitespace")
|
---|
1216 | }
|
---|
1217 |
|
---|
1218 | /**
|
---|
1219 | * processingInstruction:
|
---|
1220 | * @ctx: the user data (XML parser context)
|
---|
1221 | * @target: the target name
|
---|
1222 | * @data: the PI data's
|
---|
1223 | *
|
---|
1224 | * A processing instruction has been parsed.
|
---|
1225 | * DEPRECATED: use xmlSAX2ProcessingInstruction()
|
---|
1226 | */
|
---|
1227 | void
|
---|
1228 | processingInstruction(void *ctx, const xmlChar * target,
|
---|
1229 | const xmlChar * data)
|
---|
1230 | {
|
---|
1231 | DEPRECATED("processingInstruction")
|
---|
1232 | xmlSAX2ProcessingInstruction(ctx, target, data);
|
---|
1233 | }
|
---|
1234 |
|
---|
1235 | /**
|
---|
1236 | * globalNamespace:
|
---|
1237 | * @ctx: the user data (XML parser context)
|
---|
1238 | * @href: the namespace associated URN
|
---|
1239 | * @prefix: the namespace prefix
|
---|
1240 | *
|
---|
1241 | * An old global namespace has been parsed.
|
---|
1242 | * DEPRECATED
|
---|
1243 | */
|
---|
1244 | void
|
---|
1245 | globalNamespace(void *ctx ATTRIBUTE_UNUSED,
|
---|
1246 | const xmlChar * href ATTRIBUTE_UNUSED,
|
---|
1247 | const xmlChar * prefix ATTRIBUTE_UNUSED)
|
---|
1248 | {
|
---|
1249 | DEPRECATED("globalNamespace")
|
---|
1250 | }
|
---|
1251 |
|
---|
1252 | /**
|
---|
1253 | * setNamespace:
|
---|
1254 | * @ctx: the user data (XML parser context)
|
---|
1255 | * @name: the namespace prefix
|
---|
1256 | *
|
---|
1257 | * Set the current element namespace.
|
---|
1258 | * DEPRECATED
|
---|
1259 | */
|
---|
1260 |
|
---|
1261 | void
|
---|
1262 | setNamespace(void *ctx ATTRIBUTE_UNUSED,
|
---|
1263 | const xmlChar * name ATTRIBUTE_UNUSED)
|
---|
1264 | {
|
---|
1265 | DEPRECATED("setNamespace")
|
---|
1266 | }
|
---|
1267 |
|
---|
1268 | /**
|
---|
1269 | * getNamespace:
|
---|
1270 | * @ctx: the user data (XML parser context)
|
---|
1271 | *
|
---|
1272 | * Get the current element namespace.
|
---|
1273 | * DEPRECATED
|
---|
1274 | *
|
---|
1275 | * Returns the xmlNsPtr or NULL if none
|
---|
1276 | */
|
---|
1277 |
|
---|
1278 | xmlNsPtr
|
---|
1279 | getNamespace(void *ctx ATTRIBUTE_UNUSED)
|
---|
1280 | {
|
---|
1281 | DEPRECATED("getNamespace")
|
---|
1282 | return (NULL);
|
---|
1283 | }
|
---|
1284 |
|
---|
1285 | /**
|
---|
1286 | * checkNamespace:
|
---|
1287 | * @ctx: the user data (XML parser context)
|
---|
1288 | * @namespace: the namespace to check against
|
---|
1289 | *
|
---|
1290 | * Check that the current element namespace is the same as the
|
---|
1291 | * one read upon parsing.
|
---|
1292 | * DEPRECATED
|
---|
1293 | *
|
---|
1294 | * Returns 1 if true 0 otherwise
|
---|
1295 | */
|
---|
1296 |
|
---|
1297 | int
|
---|
1298 | checkNamespace(void *ctx ATTRIBUTE_UNUSED,
|
---|
1299 | xmlChar * namespace ATTRIBUTE_UNUSED)
|
---|
1300 | {
|
---|
1301 | DEPRECATED("checkNamespace")
|
---|
1302 | return (0);
|
---|
1303 | }
|
---|
1304 |
|
---|
1305 | /**
|
---|
1306 | * namespaceDecl:
|
---|
1307 | * @ctx: the user data (XML parser context)
|
---|
1308 | * @href: the namespace associated URN
|
---|
1309 | * @prefix: the namespace prefix
|
---|
1310 | *
|
---|
1311 | * A namespace has been parsed.
|
---|
1312 | * DEPRECATED
|
---|
1313 | */
|
---|
1314 | void
|
---|
1315 | namespaceDecl(void *ctx ATTRIBUTE_UNUSED,
|
---|
1316 | const xmlChar * href ATTRIBUTE_UNUSED,
|
---|
1317 | const xmlChar * prefix ATTRIBUTE_UNUSED)
|
---|
1318 | {
|
---|
1319 | DEPRECATED("namespaceDecl")
|
---|
1320 | }
|
---|
1321 |
|
---|
1322 | /**
|
---|
1323 | * comment:
|
---|
1324 | * @ctx: the user data (XML parser context)
|
---|
1325 | * @value: the comment content
|
---|
1326 | *
|
---|
1327 | * A comment has been parsed.
|
---|
1328 | * DEPRECATED: use xmlSAX2Comment()
|
---|
1329 | */
|
---|
1330 | void
|
---|
1331 | comment(void *ctx, const xmlChar * value)
|
---|
1332 | {
|
---|
1333 | DEPRECATED("comment")
|
---|
1334 | xmlSAX2Comment(ctx, value);
|
---|
1335 | }
|
---|
1336 |
|
---|
1337 | /**
|
---|
1338 | * cdataBlock:
|
---|
1339 | * @ctx: the user data (XML parser context)
|
---|
1340 | * @value: The pcdata content
|
---|
1341 | * @len: the block length
|
---|
1342 | *
|
---|
1343 | * called when a pcdata block has been parsed
|
---|
1344 | * DEPRECATED: use xmlSAX2CDataBlock()
|
---|
1345 | */
|
---|
1346 | void
|
---|
1347 | cdataBlock(void *ctx, const xmlChar * value, int len)
|
---|
1348 | {
|
---|
1349 | DEPRECATED("cdataBlock")
|
---|
1350 | xmlSAX2CDataBlock(ctx, value, len);
|
---|
1351 | }
|
---|
1352 |
|
---|
1353 | /*
|
---|
1354 | * nanoftp.h
|
---|
1355 | */
|
---|
1356 |
|
---|
1357 | #ifndef LIBXML_FTP_ENABLED
|
---|
1358 |
|
---|
1359 | #include <libxml/nanoftp.h>
|
---|
1360 |
|
---|
1361 | /** DOC_DISABLE */
|
---|
1362 |
|
---|
1363 | #ifdef _WIN32
|
---|
1364 | #include <winsock2.h>
|
---|
1365 | #else
|
---|
1366 | #define SOCKET int
|
---|
1367 | #endif
|
---|
1368 |
|
---|
1369 | typedef void
|
---|
1370 | (*ftpListCallback)(void *userData, const char *filename, const char *attrib,
|
---|
1371 | const char *owner, const char *group, unsigned long size,
|
---|
1372 | int links, int year, const char *month, int day, int hour,
|
---|
1373 | int minute);
|
---|
1374 |
|
---|
1375 | typedef void
|
---|
1376 | (*ftpDataCallback) (void *userData, const char *data, int len);
|
---|
1377 |
|
---|
1378 | XMLPUBFUN void
|
---|
1379 | xmlNanoFTPInit(void);
|
---|
1380 |
|
---|
1381 | void
|
---|
1382 | xmlNanoFTPInit(void) {
|
---|
1383 | }
|
---|
1384 |
|
---|
1385 | XMLPUBFUN void
|
---|
1386 | xmlNanoFTPCleanup(void);
|
---|
1387 |
|
---|
1388 | void
|
---|
1389 | xmlNanoFTPCleanup(void) {
|
---|
1390 | }
|
---|
1391 |
|
---|
1392 | XMLPUBFUN void
|
---|
1393 | xmlNanoFTPProxy(const char *host, int port, const char *user,
|
---|
1394 | const char *passwd, int type);
|
---|
1395 |
|
---|
1396 | void
|
---|
1397 | xmlNanoFTPProxy(const char *host ATTRIBUTE_UNUSED, int port ATTRIBUTE_UNUSED,
|
---|
1398 | const char *user ATTRIBUTE_UNUSED,
|
---|
1399 | const char *passwd ATTRIBUTE_UNUSED, int type ATTRIBUTE_UNUSED) {
|
---|
1400 | }
|
---|
1401 |
|
---|
1402 | XMLPUBFUN int
|
---|
1403 | xmlNanoFTPUpdateURL(void *ctx, const char *URL);
|
---|
1404 |
|
---|
1405 | int
|
---|
1406 | xmlNanoFTPUpdateURL(void *ctx ATTRIBUTE_UNUSED,
|
---|
1407 | const char *URL ATTRIBUTE_UNUSED) {
|
---|
1408 | return(-1);
|
---|
1409 | }
|
---|
1410 |
|
---|
1411 | XMLPUBFUN void
|
---|
1412 | xmlNanoFTPScanProxy(const char *URL);
|
---|
1413 |
|
---|
1414 | void
|
---|
1415 | xmlNanoFTPScanProxy(const char *URL ATTRIBUTE_UNUSED) {
|
---|
1416 | }
|
---|
1417 |
|
---|
1418 | XMLPUBFUN void *
|
---|
1419 | xmlNanoFTPNewCtxt(const char *URL);
|
---|
1420 |
|
---|
1421 | void*
|
---|
1422 | xmlNanoFTPNewCtxt(const char *URL ATTRIBUTE_UNUSED) {
|
---|
1423 | return(NULL);
|
---|
1424 | }
|
---|
1425 |
|
---|
1426 | XMLPUBFUN void
|
---|
1427 | xmlNanoFTPFreeCtxt(void *ctx);
|
---|
1428 |
|
---|
1429 | void
|
---|
1430 | xmlNanoFTPFreeCtxt(void * ctx ATTRIBUTE_UNUSED) {
|
---|
1431 | }
|
---|
1432 |
|
---|
1433 | XMLPUBFUN int
|
---|
1434 | xmlNanoFTPGetResponse(void *ctx);
|
---|
1435 |
|
---|
1436 | int
|
---|
1437 | xmlNanoFTPGetResponse(void *ctx ATTRIBUTE_UNUSED) {
|
---|
1438 | return(-1);
|
---|
1439 | }
|
---|
1440 |
|
---|
1441 | XMLPUBFUN int
|
---|
1442 | xmlNanoFTPCheckResponse(void *ctx);
|
---|
1443 |
|
---|
1444 | int
|
---|
1445 | xmlNanoFTPCheckResponse(void *ctx ATTRIBUTE_UNUSED) {
|
---|
1446 | return(-1);
|
---|
1447 | }
|
---|
1448 |
|
---|
1449 | XMLPUBFUN int
|
---|
1450 | xmlNanoFTPQuit(void *ctx);
|
---|
1451 |
|
---|
1452 | int
|
---|
1453 | xmlNanoFTPQuit(void *ctx ATTRIBUTE_UNUSED) {
|
---|
1454 | return(-1);
|
---|
1455 | }
|
---|
1456 |
|
---|
1457 | XMLPUBFUN int
|
---|
1458 | xmlNanoFTPConnect(void *ctx);
|
---|
1459 |
|
---|
1460 | int
|
---|
1461 | xmlNanoFTPConnect(void *ctx ATTRIBUTE_UNUSED) {
|
---|
1462 | return(-1);
|
---|
1463 | }
|
---|
1464 |
|
---|
1465 | XMLPUBFUN void *
|
---|
1466 | xmlNanoFTPConnectTo(const char *server, int port);
|
---|
1467 |
|
---|
1468 | void*
|
---|
1469 | xmlNanoFTPConnectTo(const char *server ATTRIBUTE_UNUSED,
|
---|
1470 | int port ATTRIBUTE_UNUSED) {
|
---|
1471 | return(NULL);
|
---|
1472 | }
|
---|
1473 |
|
---|
1474 | XMLPUBFUN int
|
---|
1475 | xmlNanoFTPCwd(void *ctx, const char *directory);
|
---|
1476 |
|
---|
1477 | int
|
---|
1478 | xmlNanoFTPCwd(void *ctx ATTRIBUTE_UNUSED,
|
---|
1479 | const char *directory ATTRIBUTE_UNUSED) {
|
---|
1480 | return(-1);
|
---|
1481 | }
|
---|
1482 |
|
---|
1483 | XMLPUBFUN int
|
---|
1484 | xmlNanoFTPDele(void *ctx, const char *file);
|
---|
1485 |
|
---|
1486 | int
|
---|
1487 | xmlNanoFTPDele(void *ctx ATTRIBUTE_UNUSED, const char *file ATTRIBUTE_UNUSED) {
|
---|
1488 | return(-1);
|
---|
1489 | }
|
---|
1490 |
|
---|
1491 | XMLPUBFUN SOCKET
|
---|
1492 | xmlNanoFTPGetConnection(void *ctx);
|
---|
1493 |
|
---|
1494 | SOCKET
|
---|
1495 | xmlNanoFTPGetConnection(void *ctx ATTRIBUTE_UNUSED) {
|
---|
1496 | return(-1);
|
---|
1497 | }
|
---|
1498 |
|
---|
1499 | XMLPUBFUN int
|
---|
1500 | xmlNanoFTPCloseConnection(void *ctx);
|
---|
1501 |
|
---|
1502 | int
|
---|
1503 | xmlNanoFTPCloseConnection(void *ctx ATTRIBUTE_UNUSED) {
|
---|
1504 | return(-1);
|
---|
1505 | }
|
---|
1506 |
|
---|
1507 | XMLPUBFUN int
|
---|
1508 | xmlNanoFTPList(void *ctx, ftpListCallback callback, void *userData,
|
---|
1509 | const char *filename);
|
---|
1510 |
|
---|
1511 | int
|
---|
1512 | xmlNanoFTPList(void *ctx ATTRIBUTE_UNUSED,
|
---|
1513 | ftpListCallback callback ATTRIBUTE_UNUSED,
|
---|
1514 | void *userData ATTRIBUTE_UNUSED,
|
---|
1515 | const char *filename ATTRIBUTE_UNUSED) {
|
---|
1516 | return(-1);
|
---|
1517 | }
|
---|
1518 |
|
---|
1519 | XMLPUBFUN SOCKET
|
---|
1520 | xmlNanoFTPGetSocket(void *ctx, const char *filename);
|
---|
1521 |
|
---|
1522 | SOCKET
|
---|
1523 | xmlNanoFTPGetSocket(void *ctx ATTRIBUTE_UNUSED,
|
---|
1524 | const char *filename ATTRIBUTE_UNUSED) {
|
---|
1525 | return(-1);
|
---|
1526 | }
|
---|
1527 |
|
---|
1528 | XMLPUBFUN int
|
---|
1529 | xmlNanoFTPGet(void *ctx, ftpDataCallback callback, void *userData,
|
---|
1530 | const char *filename);
|
---|
1531 |
|
---|
1532 | int
|
---|
1533 | xmlNanoFTPGet(void *ctx ATTRIBUTE_UNUSED,
|
---|
1534 | ftpDataCallback callback ATTRIBUTE_UNUSED,
|
---|
1535 | void *userData ATTRIBUTE_UNUSED,
|
---|
1536 | const char *filename ATTRIBUTE_UNUSED) {
|
---|
1537 | return(-1);
|
---|
1538 | }
|
---|
1539 |
|
---|
1540 | XMLPUBFUN int
|
---|
1541 | xmlNanoFTPRead(void *ctx, void *dest, int len);
|
---|
1542 |
|
---|
1543 | int
|
---|
1544 | xmlNanoFTPRead(void *ctx ATTRIBUTE_UNUSED, void *dest ATTRIBUTE_UNUSED,
|
---|
1545 | int len ATTRIBUTE_UNUSED) {
|
---|
1546 | return(-1);
|
---|
1547 | }
|
---|
1548 |
|
---|
1549 | XMLPUBFUN void *
|
---|
1550 | xmlNanoFTPOpen(const char *URL);
|
---|
1551 |
|
---|
1552 | void*
|
---|
1553 | xmlNanoFTPOpen(const char *URL ATTRIBUTE_UNUSED) {
|
---|
1554 | return(NULL);
|
---|
1555 | }
|
---|
1556 |
|
---|
1557 | XMLPUBFUN int
|
---|
1558 | xmlNanoFTPClose(void *ctx);
|
---|
1559 |
|
---|
1560 | int
|
---|
1561 | xmlNanoFTPClose(void *ctx ATTRIBUTE_UNUSED) {
|
---|
1562 | return(-1);
|
---|
1563 | }
|
---|
1564 |
|
---|
1565 | XMLPUBFUN int
|
---|
1566 | xmlIOFTPMatch(const char *filename);
|
---|
1567 |
|
---|
1568 | int
|
---|
1569 | xmlIOFTPMatch(const char *filename ATTRIBUTE_UNUSED) {
|
---|
1570 | return(0);
|
---|
1571 | }
|
---|
1572 |
|
---|
1573 | XMLPUBFUN void *
|
---|
1574 | xmlIOFTPOpen(const char *filename);
|
---|
1575 |
|
---|
1576 | void *
|
---|
1577 | xmlIOFTPOpen(const char *filename ATTRIBUTE_UNUSED) {
|
---|
1578 | return(NULL);
|
---|
1579 | }
|
---|
1580 |
|
---|
1581 | XMLPUBFUN int
|
---|
1582 | xmlIOFTPRead(void *context, char *buffer, int len);
|
---|
1583 |
|
---|
1584 | int
|
---|
1585 | xmlIOFTPRead(void *context ATTRIBUTE_UNUSED, char *buffer ATTRIBUTE_UNUSED,
|
---|
1586 | int len ATTRIBUTE_UNUSED) {
|
---|
1587 | return(-1);
|
---|
1588 | }
|
---|
1589 |
|
---|
1590 | XMLPUBFUN int
|
---|
1591 | xmlIOFTPClose(void *context);
|
---|
1592 |
|
---|
1593 | int
|
---|
1594 | xmlIOFTPClose(void *context ATTRIBUTE_UNUSED) {
|
---|
1595 | return(-1);
|
---|
1596 | }
|
---|
1597 |
|
---|
1598 | /** DOC_ENABLE */
|
---|
1599 |
|
---|
1600 | #endif /* #ifndef LIBXML_FTP_ENABLED */
|
---|
1601 |
|
---|
1602 | /*
|
---|
1603 | * xpointer.h
|
---|
1604 | */
|
---|
1605 |
|
---|
1606 | #ifndef LIBXML_XPTR_LOCS_ENABLED
|
---|
1607 |
|
---|
1608 | #include <libxml/xpath.h>
|
---|
1609 | #include <libxml/xpathInternals.h>
|
---|
1610 | #include <libxml/xpointer.h>
|
---|
1611 |
|
---|
1612 | /** DOC_DISABLE */
|
---|
1613 |
|
---|
1614 | typedef struct _xmlLocationSet *xmlLocationSetPtr;
|
---|
1615 |
|
---|
1616 | XMLPUBFUN xmlXPathObjectPtr
|
---|
1617 | xmlXPtrNewRange(xmlNodePtr start, int startindex,
|
---|
1618 | xmlNodePtr end, int endindex);
|
---|
1619 |
|
---|
1620 | xmlXPathObjectPtr
|
---|
1621 | xmlXPtrNewRange(xmlNodePtr start ATTRIBUTE_UNUSED,
|
---|
1622 | int startindex ATTRIBUTE_UNUSED,
|
---|
1623 | xmlNodePtr end ATTRIBUTE_UNUSED,
|
---|
1624 | int endindex ATTRIBUTE_UNUSED) {
|
---|
1625 | return(NULL);
|
---|
1626 | }
|
---|
1627 |
|
---|
1628 | XMLPUBFUN xmlXPathObjectPtr
|
---|
1629 | xmlXPtrNewRangePoints(xmlXPathObjectPtr start, xmlXPathObjectPtr end);
|
---|
1630 |
|
---|
1631 | xmlXPathObjectPtr
|
---|
1632 | xmlXPtrNewRangePoints(xmlXPathObjectPtr start ATTRIBUTE_UNUSED,
|
---|
1633 | xmlXPathObjectPtr end ATTRIBUTE_UNUSED) {
|
---|
1634 | return(NULL);
|
---|
1635 | }
|
---|
1636 |
|
---|
1637 | XMLPUBFUN xmlXPathObjectPtr
|
---|
1638 | xmlXPtrNewRangePointNode(xmlXPathObjectPtr start, xmlNodePtr end);
|
---|
1639 |
|
---|
1640 | xmlXPathObjectPtr
|
---|
1641 | xmlXPtrNewRangePointNode(xmlXPathObjectPtr start ATTRIBUTE_UNUSED,
|
---|
1642 | xmlNodePtr end ATTRIBUTE_UNUSED) {
|
---|
1643 | return(NULL);
|
---|
1644 | }
|
---|
1645 |
|
---|
1646 | XMLPUBFUN xmlXPathObjectPtr
|
---|
1647 | xmlXPtrNewRangeNodePoint(xmlNodePtr start, xmlXPathObjectPtr end);
|
---|
1648 |
|
---|
1649 | xmlXPathObjectPtr
|
---|
1650 | xmlXPtrNewRangeNodePoint(xmlNodePtr start ATTRIBUTE_UNUSED,
|
---|
1651 | xmlXPathObjectPtr end ATTRIBUTE_UNUSED) {
|
---|
1652 | return(NULL);
|
---|
1653 | }
|
---|
1654 |
|
---|
1655 | XMLPUBFUN xmlXPathObjectPtr
|
---|
1656 | xmlXPtrNewRangeNodes(xmlNodePtr start, xmlNodePtr end);
|
---|
1657 |
|
---|
1658 | xmlXPathObjectPtr
|
---|
1659 | xmlXPtrNewRangeNodes(xmlNodePtr start ATTRIBUTE_UNUSED,
|
---|
1660 | xmlNodePtr end ATTRIBUTE_UNUSED) {
|
---|
1661 | return(NULL);
|
---|
1662 | }
|
---|
1663 |
|
---|
1664 | XMLPUBFUN xmlXPathObjectPtr
|
---|
1665 | xmlXPtrNewCollapsedRange(xmlNodePtr start);
|
---|
1666 |
|
---|
1667 | xmlXPathObjectPtr
|
---|
1668 | xmlXPtrNewCollapsedRange(xmlNodePtr start ATTRIBUTE_UNUSED) {
|
---|
1669 | return(NULL);
|
---|
1670 | }
|
---|
1671 |
|
---|
1672 | XMLPUBFUN xmlXPathObjectPtr
|
---|
1673 | xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end);
|
---|
1674 |
|
---|
1675 | xmlXPathObjectPtr
|
---|
1676 | xmlXPtrNewRangeNodeObject(xmlNodePtr start ATTRIBUTE_UNUSED,
|
---|
1677 | xmlXPathObjectPtr end ATTRIBUTE_UNUSED) {
|
---|
1678 | return(NULL);
|
---|
1679 | }
|
---|
1680 |
|
---|
1681 | XMLPUBFUN xmlLocationSetPtr
|
---|
1682 | xmlXPtrLocationSetCreate(xmlXPathObjectPtr val);
|
---|
1683 |
|
---|
1684 | xmlLocationSetPtr
|
---|
1685 | xmlXPtrLocationSetCreate(xmlXPathObjectPtr val ATTRIBUTE_UNUSED) {
|
---|
1686 | return(NULL);
|
---|
1687 | }
|
---|
1688 |
|
---|
1689 | XMLPUBFUN void
|
---|
1690 | xmlXPtrLocationSetAdd(xmlLocationSetPtr cur, xmlXPathObjectPtr val);
|
---|
1691 |
|
---|
1692 | void
|
---|
1693 | xmlXPtrLocationSetAdd(xmlLocationSetPtr cur ATTRIBUTE_UNUSED,
|
---|
1694 | xmlXPathObjectPtr val ATTRIBUTE_UNUSED) {
|
---|
1695 | }
|
---|
1696 |
|
---|
1697 | XMLPUBFUN xmlLocationSetPtr
|
---|
1698 | xmlXPtrLocationSetMerge(xmlLocationSetPtr val1, xmlLocationSetPtr val2);
|
---|
1699 |
|
---|
1700 | xmlLocationSetPtr
|
---|
1701 | xmlXPtrLocationSetMerge(xmlLocationSetPtr val1 ATTRIBUTE_UNUSED,
|
---|
1702 | xmlLocationSetPtr val2 ATTRIBUTE_UNUSED) {
|
---|
1703 | return(NULL);
|
---|
1704 | }
|
---|
1705 |
|
---|
1706 | XMLPUBFUN void
|
---|
1707 | xmlXPtrLocationSetDel(xmlLocationSetPtr cur, xmlXPathObjectPtr val);
|
---|
1708 |
|
---|
1709 | void
|
---|
1710 | xmlXPtrLocationSetDel(xmlLocationSetPtr cur ATTRIBUTE_UNUSED,
|
---|
1711 | xmlXPathObjectPtr val ATTRIBUTE_UNUSED) {
|
---|
1712 | }
|
---|
1713 |
|
---|
1714 | XMLPUBFUN void
|
---|
1715 | xmlXPtrLocationSetRemove(xmlLocationSetPtr cur, int val);
|
---|
1716 |
|
---|
1717 | void
|
---|
1718 | xmlXPtrLocationSetRemove(xmlLocationSetPtr cur ATTRIBUTE_UNUSED,
|
---|
1719 | int val ATTRIBUTE_UNUSED) {
|
---|
1720 | }
|
---|
1721 |
|
---|
1722 | XMLPUBFUN void
|
---|
1723 | xmlXPtrFreeLocationSet(xmlLocationSetPtr obj);
|
---|
1724 |
|
---|
1725 | void
|
---|
1726 | xmlXPtrFreeLocationSet(xmlLocationSetPtr obj ATTRIBUTE_UNUSED) {
|
---|
1727 | }
|
---|
1728 |
|
---|
1729 | XMLPUBFUN xmlXPathObjectPtr
|
---|
1730 | xmlXPtrNewLocationSetNodes(xmlNodePtr start, xmlNodePtr end);
|
---|
1731 |
|
---|
1732 | xmlXPathObjectPtr
|
---|
1733 | xmlXPtrNewLocationSetNodes(xmlNodePtr start ATTRIBUTE_UNUSED,
|
---|
1734 | xmlNodePtr end ATTRIBUTE_UNUSED) {
|
---|
1735 | return(NULL);
|
---|
1736 | }
|
---|
1737 |
|
---|
1738 | XMLPUBFUN xmlXPathObjectPtr
|
---|
1739 | xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set);
|
---|
1740 |
|
---|
1741 | xmlXPathObjectPtr
|
---|
1742 | xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set ATTRIBUTE_UNUSED) {
|
---|
1743 | return(NULL);
|
---|
1744 | }
|
---|
1745 |
|
---|
1746 | XMLPUBFUN xmlXPathObjectPtr
|
---|
1747 | xmlXPtrWrapLocationSet(xmlLocationSetPtr val);
|
---|
1748 |
|
---|
1749 | xmlXPathObjectPtr
|
---|
1750 | xmlXPtrWrapLocationSet(xmlLocationSetPtr val ATTRIBUTE_UNUSED) {
|
---|
1751 | return(NULL);
|
---|
1752 | }
|
---|
1753 |
|
---|
1754 | XMLPUBFUN xmlNodePtr
|
---|
1755 | xmlXPtrBuildNodeList(xmlXPathObjectPtr obj);
|
---|
1756 |
|
---|
1757 | xmlNodePtr
|
---|
1758 | xmlXPtrBuildNodeList(xmlXPathObjectPtr obj ATTRIBUTE_UNUSED) {
|
---|
1759 | return(NULL);
|
---|
1760 | }
|
---|
1761 |
|
---|
1762 | XMLPUBFUN void
|
---|
1763 | xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
---|
1764 |
|
---|
1765 | void
|
---|
1766 | xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt,
|
---|
1767 | int nargs ATTRIBUTE_UNUSED) {
|
---|
1768 | XP_ERROR(XPATH_EXPR_ERROR);
|
---|
1769 | }
|
---|
1770 |
|
---|
1771 | /** DOC_ENABLE */
|
---|
1772 |
|
---|
1773 | #endif /* #ifndef LIBXML_XPTR_LOCS_ENABLED */
|
---|
1774 |
|
---|
1775 | #endif /* LIBXML_LEGACY_ENABLED */
|
---|
1776 |
|
---|