Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 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 | |
Daniel Veillard | d3a2e4c | 2003-09-30 13:38:04 +0000 | [diff] [blame] | 13 | #ifdef LIBXML_LEGACY_ENABLED |
| 14 | #include <string.h> |
| 15 | |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 16 | #include <libxml/tree.h> |
| 17 | #include <libxml/entities.h> |
| 18 | #include <libxml/SAX.h> |
| 19 | #include <libxml/parserInternals.h> |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 20 | #include <libxml/HTMLparser.h> |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 21 | |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 22 | void xmlUpgradeOldNs(xmlDocPtr doc); |
| 23 | |
| 24 | /************************************************************************ |
| 25 | * * |
| 26 | * Deprecated functions kept for compatibility * |
| 27 | * * |
| 28 | ************************************************************************/ |
| 29 | |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 30 | xmlChar *htmlDecodeEntities(htmlParserCtxtPtr ctxt, int len, xmlChar end, |
| 31 | xmlChar end2, xmlChar end3); |
| 32 | |
| 33 | /** |
| 34 | * htmlDecodeEntities: |
| 35 | * @ctxt: the parser context |
| 36 | * @len: the len to decode (in bytes !), -1 for no size limit |
| 37 | * @end: an end marker xmlChar, 0 if none |
| 38 | * @end2: an end marker xmlChar, 0 if none |
| 39 | * @end3: an end marker xmlChar, 0 if none |
| 40 | * |
| 41 | * Substitute the HTML entities by their value |
| 42 | * |
| 43 | * DEPRECATED !!!! |
| 44 | * |
| 45 | * Returns A newly allocated string with the substitution done. The caller |
| 46 | * must deallocate it ! |
| 47 | */ |
| 48 | xmlChar * |
| 49 | htmlDecodeEntities(htmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED, |
| 50 | int len ATTRIBUTE_UNUSED, xmlChar end ATTRIBUTE_UNUSED, |
| 51 | xmlChar end2 ATTRIBUTE_UNUSED, |
| 52 | xmlChar end3 ATTRIBUTE_UNUSED) |
| 53 | { |
| 54 | static int deprecated = 0; |
| 55 | |
| 56 | if (!deprecated) { |
| 57 | xmlGenericError(xmlGenericErrorContext, |
| 58 | "htmlDecodeEntities() deprecated function reached\n"); |
| 59 | deprecated = 1; |
| 60 | } |
| 61 | return (NULL); |
| 62 | } |
| 63 | |
Daniel Veillard | d3a2e4c | 2003-09-30 13:38:04 +0000 | [diff] [blame] | 64 | /** |
| 65 | * xmlInitializePredefinedEntities: |
| 66 | * |
| 67 | * Set up the predefined entities. |
| 68 | * Deprecated call |
| 69 | */ |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 70 | void |
| 71 | xmlInitializePredefinedEntities(void) |
| 72 | { |
Daniel Veillard | d3a2e4c | 2003-09-30 13:38:04 +0000 | [diff] [blame] | 73 | } |
| 74 | |
| 75 | /** |
| 76 | * xmlCleanupPredefinedEntities: |
| 77 | * |
| 78 | * Cleanup up the predefined entities table. |
| 79 | * Deprecated call |
| 80 | */ |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 81 | void |
| 82 | xmlCleanupPredefinedEntities(void) |
| 83 | { |
Daniel Veillard | d3a2e4c | 2003-09-30 13:38:04 +0000 | [diff] [blame] | 84 | } |
| 85 | |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 86 | static const char *xmlFeaturesList[] = { |
| 87 | "validate", |
| 88 | "load subset", |
| 89 | "keep blanks", |
| 90 | "disable SAX", |
| 91 | "fetch external entities", |
| 92 | "substitute entities", |
| 93 | "gather line info", |
| 94 | "user data", |
| 95 | "is html", |
| 96 | "is standalone", |
| 97 | "stop parser", |
| 98 | "document", |
| 99 | "is well formed", |
| 100 | "is valid", |
| 101 | "SAX block", |
| 102 | "SAX function internalSubset", |
| 103 | "SAX function isStandalone", |
| 104 | "SAX function hasInternalSubset", |
| 105 | "SAX function hasExternalSubset", |
| 106 | "SAX function resolveEntity", |
| 107 | "SAX function getEntity", |
| 108 | "SAX function entityDecl", |
| 109 | "SAX function notationDecl", |
| 110 | "SAX function attributeDecl", |
| 111 | "SAX function elementDecl", |
| 112 | "SAX function unparsedEntityDecl", |
| 113 | "SAX function setDocumentLocator", |
| 114 | "SAX function startDocument", |
| 115 | "SAX function endDocument", |
| 116 | "SAX function startElement", |
| 117 | "SAX function endElement", |
| 118 | "SAX function reference", |
| 119 | "SAX function characters", |
| 120 | "SAX function ignorableWhitespace", |
| 121 | "SAX function processingInstruction", |
| 122 | "SAX function comment", |
| 123 | "SAX function warning", |
| 124 | "SAX function error", |
| 125 | "SAX function fatalError", |
| 126 | "SAX function getParameterEntity", |
| 127 | "SAX function cdataBlock", |
| 128 | "SAX function externalSubset", |
| 129 | }; |
| 130 | |
| 131 | /** |
| 132 | * xmlGetFeaturesList: |
| 133 | * @len: the length of the features name array (input/output) |
| 134 | * @result: an array of string to be filled with the features name. |
| 135 | * |
| 136 | * Copy at most *@len feature names into the @result array |
| 137 | * |
| 138 | * Returns -1 in case or error, or the total number of features, |
| 139 | * len is updated with the number of strings copied, |
| 140 | * strings must not be deallocated |
| 141 | */ |
| 142 | int |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 143 | xmlGetFeaturesList(int *len, const char **result) |
| 144 | { |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 145 | int ret, i; |
| 146 | |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 147 | ret = sizeof(xmlFeaturesList) / sizeof(xmlFeaturesList[0]); |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 148 | if ((len == NULL) || (result == NULL)) |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 149 | return (ret); |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 150 | if ((*len < 0) || (*len >= 1000)) |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 151 | return (-1); |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 152 | if (*len > ret) |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 153 | *len = ret; |
| 154 | for (i = 0; i < *len; i++) |
| 155 | result[i] = xmlFeaturesList[i]; |
| 156 | return (ret); |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 157 | } |
| 158 | |
| 159 | /** |
| 160 | * xmlGetFeature: |
| 161 | * @ctxt: an XML/HTML parser context |
| 162 | * @name: the feature name |
| 163 | * @result: location to store the result |
| 164 | * |
| 165 | * Read the current value of one feature of this parser instance |
| 166 | * |
| 167 | * Returns -1 in case or error, 0 otherwise |
| 168 | */ |
| 169 | int |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 170 | xmlGetFeature(xmlParserCtxtPtr ctxt, const char *name, void *result) |
| 171 | { |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 172 | if ((ctxt == NULL) || (name == NULL) || (result == NULL)) |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 173 | return (-1); |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 174 | |
| 175 | if (!strcmp(name, "validate")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 176 | *((int *) result) = ctxt->validate; |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 177 | } else if (!strcmp(name, "keep blanks")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 178 | *((int *) result) = ctxt->keepBlanks; |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 179 | } else if (!strcmp(name, "disable SAX")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 180 | *((int *) result) = ctxt->disableSAX; |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 181 | } else if (!strcmp(name, "fetch external entities")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 182 | *((int *) result) = ctxt->loadsubset; |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 183 | } else if (!strcmp(name, "substitute entities")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 184 | *((int *) result) = ctxt->replaceEntities; |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 185 | } else if (!strcmp(name, "gather line info")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 186 | *((int *) result) = ctxt->record_info; |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 187 | } else if (!strcmp(name, "user data")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 188 | *((void **) result) = ctxt->userData; |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 189 | } else if (!strcmp(name, "is html")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 190 | *((int *) result) = ctxt->html; |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 191 | } else if (!strcmp(name, "is standalone")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 192 | *((int *) result) = ctxt->standalone; |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 193 | } else if (!strcmp(name, "document")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 194 | *((xmlDocPtr *) result) = ctxt->myDoc; |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 195 | } else if (!strcmp(name, "is well formed")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 196 | *((int *) result) = ctxt->wellFormed; |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 197 | } else if (!strcmp(name, "is valid")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 198 | *((int *) result) = ctxt->valid; |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 199 | } else if (!strcmp(name, "SAX block")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 200 | *((xmlSAXHandlerPtr *) result) = ctxt->sax; |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 201 | } else if (!strcmp(name, "SAX function internalSubset")) { |
| 202 | *((internalSubsetSAXFunc *) result) = ctxt->sax->internalSubset; |
| 203 | } else if (!strcmp(name, "SAX function isStandalone")) { |
| 204 | *((isStandaloneSAXFunc *) result) = ctxt->sax->isStandalone; |
| 205 | } else if (!strcmp(name, "SAX function hasInternalSubset")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 206 | *((hasInternalSubsetSAXFunc *) result) = |
| 207 | ctxt->sax->hasInternalSubset; |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 208 | } else if (!strcmp(name, "SAX function hasExternalSubset")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 209 | *((hasExternalSubsetSAXFunc *) result) = |
| 210 | ctxt->sax->hasExternalSubset; |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 211 | } else if (!strcmp(name, "SAX function resolveEntity")) { |
| 212 | *((resolveEntitySAXFunc *) result) = ctxt->sax->resolveEntity; |
| 213 | } else if (!strcmp(name, "SAX function getEntity")) { |
| 214 | *((getEntitySAXFunc *) result) = ctxt->sax->getEntity; |
| 215 | } else if (!strcmp(name, "SAX function entityDecl")) { |
| 216 | *((entityDeclSAXFunc *) result) = ctxt->sax->entityDecl; |
| 217 | } else if (!strcmp(name, "SAX function notationDecl")) { |
| 218 | *((notationDeclSAXFunc *) result) = ctxt->sax->notationDecl; |
| 219 | } else if (!strcmp(name, "SAX function attributeDecl")) { |
| 220 | *((attributeDeclSAXFunc *) result) = ctxt->sax->attributeDecl; |
| 221 | } else if (!strcmp(name, "SAX function elementDecl")) { |
| 222 | *((elementDeclSAXFunc *) result) = ctxt->sax->elementDecl; |
| 223 | } else if (!strcmp(name, "SAX function unparsedEntityDecl")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 224 | *((unparsedEntityDeclSAXFunc *) result) = |
| 225 | ctxt->sax->unparsedEntityDecl; |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 226 | } else if (!strcmp(name, "SAX function setDocumentLocator")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 227 | *((setDocumentLocatorSAXFunc *) result) = |
| 228 | ctxt->sax->setDocumentLocator; |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 229 | } else if (!strcmp(name, "SAX function startDocument")) { |
| 230 | *((startDocumentSAXFunc *) result) = ctxt->sax->startDocument; |
| 231 | } else if (!strcmp(name, "SAX function endDocument")) { |
| 232 | *((endDocumentSAXFunc *) result) = ctxt->sax->endDocument; |
| 233 | } else if (!strcmp(name, "SAX function startElement")) { |
| 234 | *((startElementSAXFunc *) result) = ctxt->sax->startElement; |
| 235 | } else if (!strcmp(name, "SAX function endElement")) { |
| 236 | *((endElementSAXFunc *) result) = ctxt->sax->endElement; |
| 237 | } else if (!strcmp(name, "SAX function reference")) { |
| 238 | *((referenceSAXFunc *) result) = ctxt->sax->reference; |
| 239 | } else if (!strcmp(name, "SAX function characters")) { |
| 240 | *((charactersSAXFunc *) result) = ctxt->sax->characters; |
| 241 | } else if (!strcmp(name, "SAX function ignorableWhitespace")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 242 | *((ignorableWhitespaceSAXFunc *) result) = |
| 243 | ctxt->sax->ignorableWhitespace; |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 244 | } else if (!strcmp(name, "SAX function processingInstruction")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 245 | *((processingInstructionSAXFunc *) result) = |
| 246 | ctxt->sax->processingInstruction; |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 247 | } else if (!strcmp(name, "SAX function comment")) { |
| 248 | *((commentSAXFunc *) result) = ctxt->sax->comment; |
| 249 | } else if (!strcmp(name, "SAX function warning")) { |
| 250 | *((warningSAXFunc *) result) = ctxt->sax->warning; |
| 251 | } else if (!strcmp(name, "SAX function error")) { |
| 252 | *((errorSAXFunc *) result) = ctxt->sax->error; |
| 253 | } else if (!strcmp(name, "SAX function fatalError")) { |
| 254 | *((fatalErrorSAXFunc *) result) = ctxt->sax->fatalError; |
| 255 | } else if (!strcmp(name, "SAX function getParameterEntity")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 256 | *((getParameterEntitySAXFunc *) result) = |
| 257 | ctxt->sax->getParameterEntity; |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 258 | } else if (!strcmp(name, "SAX function cdataBlock")) { |
| 259 | *((cdataBlockSAXFunc *) result) = ctxt->sax->cdataBlock; |
| 260 | } else if (!strcmp(name, "SAX function externalSubset")) { |
| 261 | *((externalSubsetSAXFunc *) result) = ctxt->sax->externalSubset; |
| 262 | } else { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 263 | return (-1); |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 264 | } |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 265 | return (0); |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 266 | } |
| 267 | |
| 268 | /** |
| 269 | * xmlSetFeature: |
| 270 | * @ctxt: an XML/HTML parser context |
| 271 | * @name: the feature name |
| 272 | * @value: pointer to the location of the new value |
| 273 | * |
| 274 | * Change the current value of one feature of this parser instance |
| 275 | * |
| 276 | * Returns -1 in case or error, 0 otherwise |
| 277 | */ |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 278 | int |
| 279 | xmlSetFeature(xmlParserCtxtPtr ctxt, const char *name, void *value) |
| 280 | { |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 281 | if ((ctxt == NULL) || (name == NULL) || (value == NULL)) |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 282 | return (-1); |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 283 | |
| 284 | if (!strcmp(name, "validate")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 285 | int newvalidate = *((int *) value); |
| 286 | |
| 287 | if ((!ctxt->validate) && (newvalidate != 0)) { |
| 288 | if (ctxt->vctxt.warning == NULL) |
| 289 | ctxt->vctxt.warning = xmlParserValidityWarning; |
| 290 | if (ctxt->vctxt.error == NULL) |
| 291 | ctxt->vctxt.error = xmlParserValidityError; |
| 292 | ctxt->vctxt.nodeMax = 0; |
| 293 | } |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 294 | ctxt->validate = newvalidate; |
| 295 | } else if (!strcmp(name, "keep blanks")) { |
| 296 | ctxt->keepBlanks = *((int *) value); |
| 297 | } else if (!strcmp(name, "disable SAX")) { |
| 298 | ctxt->disableSAX = *((int *) value); |
| 299 | } else if (!strcmp(name, "fetch external entities")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 300 | ctxt->loadsubset = *((int *) value); |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 301 | } else if (!strcmp(name, "substitute entities")) { |
| 302 | ctxt->replaceEntities = *((int *) value); |
| 303 | } else if (!strcmp(name, "gather line info")) { |
| 304 | ctxt->record_info = *((int *) value); |
| 305 | } else if (!strcmp(name, "user data")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 306 | ctxt->userData = *((void **) value); |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 307 | } else if (!strcmp(name, "is html")) { |
| 308 | ctxt->html = *((int *) value); |
| 309 | } else if (!strcmp(name, "is standalone")) { |
| 310 | ctxt->standalone = *((int *) value); |
| 311 | } else if (!strcmp(name, "document")) { |
| 312 | ctxt->myDoc = *((xmlDocPtr *) value); |
| 313 | } else if (!strcmp(name, "is well formed")) { |
| 314 | ctxt->wellFormed = *((int *) value); |
| 315 | } else if (!strcmp(name, "is valid")) { |
| 316 | ctxt->valid = *((int *) value); |
| 317 | } else if (!strcmp(name, "SAX block")) { |
| 318 | ctxt->sax = *((xmlSAXHandlerPtr *) value); |
| 319 | } else if (!strcmp(name, "SAX function internalSubset")) { |
| 320 | ctxt->sax->internalSubset = *((internalSubsetSAXFunc *) value); |
| 321 | } else if (!strcmp(name, "SAX function isStandalone")) { |
| 322 | ctxt->sax->isStandalone = *((isStandaloneSAXFunc *) value); |
| 323 | } else if (!strcmp(name, "SAX function hasInternalSubset")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 324 | ctxt->sax->hasInternalSubset = |
| 325 | *((hasInternalSubsetSAXFunc *) value); |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 326 | } else if (!strcmp(name, "SAX function hasExternalSubset")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 327 | ctxt->sax->hasExternalSubset = |
| 328 | *((hasExternalSubsetSAXFunc *) value); |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 329 | } else if (!strcmp(name, "SAX function resolveEntity")) { |
| 330 | ctxt->sax->resolveEntity = *((resolveEntitySAXFunc *) value); |
| 331 | } else if (!strcmp(name, "SAX function getEntity")) { |
| 332 | ctxt->sax->getEntity = *((getEntitySAXFunc *) value); |
| 333 | } else if (!strcmp(name, "SAX function entityDecl")) { |
| 334 | ctxt->sax->entityDecl = *((entityDeclSAXFunc *) value); |
| 335 | } else if (!strcmp(name, "SAX function notationDecl")) { |
| 336 | ctxt->sax->notationDecl = *((notationDeclSAXFunc *) value); |
| 337 | } else if (!strcmp(name, "SAX function attributeDecl")) { |
| 338 | ctxt->sax->attributeDecl = *((attributeDeclSAXFunc *) value); |
| 339 | } else if (!strcmp(name, "SAX function elementDecl")) { |
| 340 | ctxt->sax->elementDecl = *((elementDeclSAXFunc *) value); |
| 341 | } else if (!strcmp(name, "SAX function unparsedEntityDecl")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 342 | ctxt->sax->unparsedEntityDecl = |
| 343 | *((unparsedEntityDeclSAXFunc *) value); |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 344 | } else if (!strcmp(name, "SAX function setDocumentLocator")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 345 | ctxt->sax->setDocumentLocator = |
| 346 | *((setDocumentLocatorSAXFunc *) value); |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 347 | } else if (!strcmp(name, "SAX function startDocument")) { |
| 348 | ctxt->sax->startDocument = *((startDocumentSAXFunc *) value); |
| 349 | } else if (!strcmp(name, "SAX function endDocument")) { |
| 350 | ctxt->sax->endDocument = *((endDocumentSAXFunc *) value); |
| 351 | } else if (!strcmp(name, "SAX function startElement")) { |
| 352 | ctxt->sax->startElement = *((startElementSAXFunc *) value); |
| 353 | } else if (!strcmp(name, "SAX function endElement")) { |
| 354 | ctxt->sax->endElement = *((endElementSAXFunc *) value); |
| 355 | } else if (!strcmp(name, "SAX function reference")) { |
| 356 | ctxt->sax->reference = *((referenceSAXFunc *) value); |
| 357 | } else if (!strcmp(name, "SAX function characters")) { |
| 358 | ctxt->sax->characters = *((charactersSAXFunc *) value); |
| 359 | } else if (!strcmp(name, "SAX function ignorableWhitespace")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 360 | ctxt->sax->ignorableWhitespace = |
| 361 | *((ignorableWhitespaceSAXFunc *) value); |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 362 | } else if (!strcmp(name, "SAX function processingInstruction")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 363 | ctxt->sax->processingInstruction = |
| 364 | *((processingInstructionSAXFunc *) value); |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 365 | } else if (!strcmp(name, "SAX function comment")) { |
| 366 | ctxt->sax->comment = *((commentSAXFunc *) value); |
| 367 | } else if (!strcmp(name, "SAX function warning")) { |
| 368 | ctxt->sax->warning = *((warningSAXFunc *) value); |
| 369 | } else if (!strcmp(name, "SAX function error")) { |
| 370 | ctxt->sax->error = *((errorSAXFunc *) value); |
| 371 | } else if (!strcmp(name, "SAX function fatalError")) { |
| 372 | ctxt->sax->fatalError = *((fatalErrorSAXFunc *) value); |
| 373 | } else if (!strcmp(name, "SAX function getParameterEntity")) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 374 | ctxt->sax->getParameterEntity = |
| 375 | *((getParameterEntitySAXFunc *) value); |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 376 | } else if (!strcmp(name, "SAX function cdataBlock")) { |
| 377 | ctxt->sax->cdataBlock = *((cdataBlockSAXFunc *) value); |
| 378 | } else if (!strcmp(name, "SAX function externalSubset")) { |
| 379 | ctxt->sax->externalSubset = *((externalSubsetSAXFunc *) value); |
| 380 | } else { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 381 | return (-1); |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 382 | } |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 383 | return (0); |
Daniel Veillard | 73b013f | 2003-09-30 12:36:01 +0000 | [diff] [blame] | 384 | } |
| 385 | |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 386 | /** |
| 387 | * xmlDecodeEntities: |
| 388 | * @ctxt: the parser context |
| 389 | * @len: the len to decode (in bytes !), -1 for no size limit |
| 390 | * @what: combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF |
| 391 | * @end: an end marker xmlChar, 0 if none |
| 392 | * @end2: an end marker xmlChar, 0 if none |
| 393 | * @end3: an end marker xmlChar, 0 if none |
| 394 | * |
| 395 | * This function is deprecated, we now always process entities content |
| 396 | * through xmlStringDecodeEntities |
| 397 | * |
| 398 | * TODO: remove it in next major release. |
| 399 | * |
| 400 | * [67] Reference ::= EntityRef | CharRef |
| 401 | * |
| 402 | * [69] PEReference ::= '%' Name ';' |
| 403 | * |
| 404 | * Returns A newly allocated string with the substitution done. The caller |
| 405 | * must deallocate it ! |
| 406 | */ |
| 407 | xmlChar * |
| 408 | xmlDecodeEntities(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED, |
| 409 | int len ATTRIBUTE_UNUSED, int what ATTRIBUTE_UNUSED, |
| 410 | xmlChar end ATTRIBUTE_UNUSED, |
| 411 | xmlChar end2 ATTRIBUTE_UNUSED, |
| 412 | xmlChar end3 ATTRIBUTE_UNUSED) |
| 413 | { |
| 414 | static int deprecated = 0; |
| 415 | |
| 416 | if (!deprecated) { |
| 417 | xmlGenericError(xmlGenericErrorContext, |
| 418 | "xmlDecodeEntities() deprecated function reached\n"); |
| 419 | deprecated = 1; |
| 420 | } |
| 421 | return (NULL); |
| 422 | } |
| 423 | |
| 424 | /** |
| 425 | * xmlNamespaceParseNCName: |
| 426 | * @ctxt: an XML parser context |
| 427 | * |
| 428 | * parse an XML namespace name. |
| 429 | * |
| 430 | * TODO: this seems not in use anymore, the namespace handling is done on |
| 431 | * top of the SAX interfaces, i.e. not on raw input. |
| 432 | * |
| 433 | * [NS 3] NCName ::= (Letter | '_') (NCNameChar)* |
| 434 | * |
| 435 | * [NS 4] NCNameChar ::= Letter | Digit | '.' | '-' | '_' | |
| 436 | * CombiningChar | Extender |
| 437 | * |
| 438 | * Returns the namespace name or NULL |
| 439 | */ |
| 440 | |
| 441 | xmlChar * |
| 442 | xmlNamespaceParseNCName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED) |
| 443 | { |
| 444 | static int deprecated = 0; |
| 445 | |
| 446 | if (!deprecated) { |
| 447 | xmlGenericError(xmlGenericErrorContext, |
| 448 | "xmlNamespaceParseNCName() deprecated function reached\n"); |
| 449 | deprecated = 1; |
| 450 | } |
| 451 | return (NULL); |
| 452 | } |
| 453 | |
| 454 | /** |
| 455 | * xmlNamespaceParseQName: |
| 456 | * @ctxt: an XML parser context |
| 457 | * @prefix: a xmlChar ** |
| 458 | * |
| 459 | * TODO: this seems not in use anymore, the namespace handling is done on |
| 460 | * top of the SAX interfaces, i.e. not on raw input. |
| 461 | * |
| 462 | * parse an XML qualified name |
| 463 | * |
| 464 | * [NS 5] QName ::= (Prefix ':')? LocalPart |
| 465 | * |
| 466 | * [NS 6] Prefix ::= NCName |
| 467 | * |
| 468 | * [NS 7] LocalPart ::= NCName |
| 469 | * |
| 470 | * Returns the local part, and prefix is updated |
| 471 | * to get the Prefix if any. |
| 472 | */ |
| 473 | |
| 474 | xmlChar * |
| 475 | xmlNamespaceParseQName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED, |
| 476 | xmlChar ** prefix ATTRIBUTE_UNUSED) |
| 477 | { |
| 478 | |
| 479 | static int deprecated = 0; |
| 480 | |
| 481 | if (!deprecated) { |
| 482 | xmlGenericError(xmlGenericErrorContext, |
| 483 | "xmlNamespaceParseQName() deprecated function reached\n"); |
| 484 | deprecated = 1; |
| 485 | } |
| 486 | return (NULL); |
| 487 | } |
| 488 | |
| 489 | /** |
| 490 | * xmlNamespaceParseNSDef: |
| 491 | * @ctxt: an XML parser context |
| 492 | * |
| 493 | * parse a namespace prefix declaration |
| 494 | * |
| 495 | * TODO: this seems not in use anymore, the namespace handling is done on |
| 496 | * top of the SAX interfaces, i.e. not on raw input. |
| 497 | * |
| 498 | * [NS 1] NSDef ::= PrefixDef Eq SystemLiteral |
| 499 | * |
| 500 | * [NS 2] PrefixDef ::= 'xmlns' (':' NCName)? |
| 501 | * |
| 502 | * Returns the namespace name |
| 503 | */ |
| 504 | |
| 505 | xmlChar * |
| 506 | xmlNamespaceParseNSDef(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED) |
| 507 | { |
| 508 | static int deprecated = 0; |
| 509 | |
| 510 | if (!deprecated) { |
| 511 | xmlGenericError(xmlGenericErrorContext, |
| 512 | "xmlNamespaceParseNSDef() deprecated function reached\n"); |
| 513 | deprecated = 1; |
| 514 | } |
| 515 | return (NULL); |
| 516 | } |
| 517 | |
| 518 | /** |
| 519 | * xmlParseQuotedString: |
| 520 | * @ctxt: an XML parser context |
| 521 | * |
| 522 | * Parse and return a string between quotes or doublequotes |
| 523 | * |
| 524 | * TODO: Deprecated, to be removed at next drop of binary compatibility |
| 525 | * |
| 526 | * Returns the string parser or NULL. |
| 527 | */ |
| 528 | xmlChar * |
| 529 | xmlParseQuotedString(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED) |
| 530 | { |
| 531 | static int deprecated = 0; |
| 532 | |
| 533 | if (!deprecated) { |
| 534 | xmlGenericError(xmlGenericErrorContext, |
| 535 | "xmlParseQuotedString() deprecated function reached\n"); |
| 536 | deprecated = 1; |
| 537 | } |
| 538 | return (NULL); |
| 539 | } |
| 540 | |
| 541 | /** |
| 542 | * xmlParseNamespace: |
| 543 | * @ctxt: an XML parser context |
| 544 | * |
| 545 | * xmlParseNamespace: parse specific PI '<?namespace ...' constructs. |
| 546 | * |
| 547 | * This is what the older xml-name Working Draft specified, a bunch of |
| 548 | * other stuff may still rely on it, so support is still here as |
| 549 | * if it was declared on the root of the Tree:-( |
| 550 | * |
| 551 | * TODO: remove from library |
| 552 | * |
| 553 | * To be removed at next drop of binary compatibility |
| 554 | */ |
| 555 | |
| 556 | void |
| 557 | xmlParseNamespace(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED) |
| 558 | { |
| 559 | static int deprecated = 0; |
| 560 | |
| 561 | if (!deprecated) { |
| 562 | xmlGenericError(xmlGenericErrorContext, |
| 563 | "xmlParseNamespace() deprecated function reached\n"); |
| 564 | deprecated = 1; |
| 565 | } |
| 566 | } |
| 567 | |
| 568 | /** |
| 569 | * xmlScanName: |
| 570 | * @ctxt: an XML parser context |
| 571 | * |
| 572 | * Trickery: parse an XML name but without consuming the input flow |
| 573 | * Needed for rollback cases. Used only when parsing entities references. |
| 574 | * |
| 575 | * TODO: seems deprecated now, only used in the default part of |
| 576 | * xmlParserHandleReference |
| 577 | * |
| 578 | * [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | |
| 579 | * CombiningChar | Extender |
| 580 | * |
| 581 | * [5] Name ::= (Letter | '_' | ':') (NameChar)* |
| 582 | * |
| 583 | * [6] Names ::= Name (S Name)* |
| 584 | * |
| 585 | * Returns the Name parsed or NULL |
| 586 | */ |
| 587 | |
| 588 | xmlChar * |
| 589 | xmlScanName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED) |
| 590 | { |
| 591 | static int deprecated = 0; |
| 592 | |
| 593 | if (!deprecated) { |
| 594 | xmlGenericError(xmlGenericErrorContext, |
| 595 | "xmlScanName() deprecated function reached\n"); |
| 596 | deprecated = 1; |
| 597 | } |
| 598 | return (NULL); |
| 599 | } |
| 600 | |
| 601 | /** |
| 602 | * xmlParserHandleReference: |
| 603 | * @ctxt: the parser context |
| 604 | * |
| 605 | * TODO: Remove, now deprecated ... the test is done directly in the |
| 606 | * content parsing |
| 607 | * routines. |
| 608 | * |
| 609 | * [67] Reference ::= EntityRef | CharRef |
| 610 | * |
| 611 | * [68] EntityRef ::= '&' Name ';' |
| 612 | * |
| 613 | * [ WFC: Entity Declared ] |
| 614 | * the Name given in the entity reference must match that in an entity |
| 615 | * declaration, except that well-formed documents need not declare any |
| 616 | * of the following entities: amp, lt, gt, apos, quot. |
| 617 | * |
| 618 | * [ WFC: Parsed Entity ] |
| 619 | * An entity reference must not contain the name of an unparsed entity |
| 620 | * |
| 621 | * [66] CharRef ::= '&#' [0-9]+ ';' | |
| 622 | * '&#x' [0-9a-fA-F]+ ';' |
| 623 | * |
| 624 | * A PEReference may have been detected in the current input stream |
| 625 | * the handling is done accordingly to |
| 626 | * http://www.w3.org/TR/REC-xml#entproc |
| 627 | */ |
| 628 | void |
| 629 | xmlParserHandleReference(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED) |
| 630 | { |
| 631 | static int deprecated = 0; |
| 632 | |
| 633 | if (!deprecated) { |
| 634 | xmlGenericError(xmlGenericErrorContext, |
| 635 | "xmlParserHandleReference() deprecated function reached\n"); |
| 636 | deprecated = 1; |
| 637 | } |
| 638 | |
| 639 | return; |
| 640 | } |
| 641 | |
| 642 | /** |
| 643 | * xmlHandleEntity: |
| 644 | * @ctxt: an XML parser context |
| 645 | * @entity: an XML entity pointer. |
| 646 | * |
| 647 | * Default handling of defined entities, when should we define a new input |
| 648 | * stream ? When do we just handle that as a set of chars ? |
| 649 | * |
| 650 | * OBSOLETE: to be removed at some point. |
| 651 | */ |
| 652 | |
| 653 | void |
| 654 | xmlHandleEntity(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED, |
| 655 | xmlEntityPtr entity ATTRIBUTE_UNUSED) |
| 656 | { |
| 657 | static int deprecated = 0; |
| 658 | |
| 659 | if (!deprecated) { |
| 660 | xmlGenericError(xmlGenericErrorContext, |
| 661 | "xmlHandleEntity() deprecated function reached\n"); |
| 662 | deprecated = 1; |
| 663 | } |
| 664 | } |
| 665 | |
| 666 | /** |
| 667 | * xmlNewGlobalNs: |
| 668 | * @doc: the document carrying the namespace |
| 669 | * @href: the URI associated |
| 670 | * @prefix: the prefix for the namespace |
| 671 | * |
| 672 | * Creation of a Namespace, the old way using PI and without scoping |
| 673 | * DEPRECATED !!! |
| 674 | * It now create a namespace on the root element of the document if found. |
| 675 | * Returns NULL this functionality had been removed |
| 676 | */ |
| 677 | xmlNsPtr |
| 678 | xmlNewGlobalNs(xmlDocPtr doc ATTRIBUTE_UNUSED, |
| 679 | const xmlChar * href ATTRIBUTE_UNUSED, |
| 680 | const xmlChar * prefix ATTRIBUTE_UNUSED) |
| 681 | { |
| 682 | static int deprecated = 0; |
| 683 | |
| 684 | if (!deprecated) { |
| 685 | xmlGenericError(xmlGenericErrorContext, |
| 686 | "xmlNewGlobalNs() deprecated function reached\n"); |
| 687 | deprecated = 1; |
| 688 | } |
| 689 | return (NULL); |
| 690 | } |
| 691 | |
| 692 | /** |
| 693 | * xmlUpgradeOldNs: |
| 694 | * @doc: a document pointer |
| 695 | * |
| 696 | * Upgrade old style Namespaces (PI) and move them to the root of the document. |
| 697 | * DEPRECATED |
| 698 | */ |
| 699 | void |
| 700 | xmlUpgradeOldNs(xmlDocPtr doc ATTRIBUTE_UNUSED) |
| 701 | { |
| 702 | static int deprecated = 0; |
| 703 | |
| 704 | if (!deprecated) { |
| 705 | xmlGenericError(xmlGenericErrorContext, |
| 706 | "xmlUpgradeOldNs() deprecated function reached\n"); |
| 707 | deprecated = 1; |
| 708 | } |
| 709 | } |
| 710 | |
| 711 | /** |
| 712 | * xmlEncodeEntities: |
| 713 | * @doc: the document containing the string |
| 714 | * @input: A string to convert to XML. |
| 715 | * |
| 716 | * TODO: remove xmlEncodeEntities, once we are not afraid of breaking binary |
| 717 | * compatibility |
| 718 | * |
| 719 | * People must migrate their code to xmlEncodeEntitiesReentrant ! |
| 720 | * This routine will issue a warning when encountered. |
| 721 | * |
| 722 | * Returns NULL |
| 723 | */ |
| 724 | const xmlChar * |
| 725 | xmlEncodeEntities(xmlDocPtr doc ATTRIBUTE_UNUSED, |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 726 | const xmlChar * input ATTRIBUTE_UNUSED) |
| 727 | { |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 728 | static int warning = 1; |
| 729 | |
| 730 | if (warning) { |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 731 | xmlGenericError(xmlGenericErrorContext, |
| 732 | "Deprecated API xmlEncodeEntities() used\n"); |
| 733 | xmlGenericError(xmlGenericErrorContext, |
| 734 | " change code to use xmlEncodeEntitiesReentrant()\n"); |
| 735 | warning = 0; |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 736 | } |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 737 | return (NULL); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 738 | } |
| 739 | |
| 740 | /************************************************************************ |
| 741 | * * |
| 742 | * Old set of SAXv1 functions * |
| 743 | * * |
| 744 | ************************************************************************/ |
| 745 | static int deprecated_v1_msg = 0; |
| 746 | |
| 747 | #define DEPRECATED(n) \ |
| 748 | if (deprecated_v1_msg == 0) \ |
| 749 | xmlGenericError(xmlGenericErrorContext, \ |
| 750 | "Use of deprecated SAXv1 function %s\n", n); \ |
| 751 | deprecated_v1_msg++; |
| 752 | |
| 753 | /** |
| 754 | * getPublicId: |
| 755 | * @ctx: the user data (XML parser context) |
| 756 | * |
| 757 | * Provides the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN" |
| 758 | * DEPRECATED: use xmlSAX2GetPublicId() |
| 759 | * |
| 760 | * Returns a xmlChar * |
| 761 | */ |
| 762 | const xmlChar * |
| 763 | getPublicId(void *ctx) |
| 764 | { |
| 765 | DEPRECATED("getPublicId") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 766 | return (xmlSAX2GetPublicId(ctx)); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 767 | } |
| 768 | |
| 769 | /** |
| 770 | * getSystemId: |
| 771 | * @ctx: the user data (XML parser context) |
| 772 | * |
| 773 | * Provides the system ID, basically URL or filename e.g. |
| 774 | * http://www.sgmlsource.com/dtds/memo.dtd |
| 775 | * DEPRECATED: use xmlSAX2GetSystemId() |
| 776 | * |
| 777 | * Returns a xmlChar * |
| 778 | */ |
| 779 | const xmlChar * |
| 780 | getSystemId(void *ctx) |
| 781 | { |
| 782 | DEPRECATED("getSystemId") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 783 | return (xmlSAX2GetSystemId(ctx)); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 784 | } |
| 785 | |
| 786 | /** |
| 787 | * getLineNumber: |
| 788 | * @ctx: the user data (XML parser context) |
| 789 | * |
| 790 | * Provide the line number of the current parsing point. |
| 791 | * DEPRECATED: use xmlSAX2GetLineNumber() |
| 792 | * |
| 793 | * Returns an int |
| 794 | */ |
| 795 | int |
| 796 | getLineNumber(void *ctx) |
| 797 | { |
| 798 | DEPRECATED("getLineNumber") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 799 | return (xmlSAX2GetLineNumber(ctx)); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 800 | } |
| 801 | |
| 802 | /** |
| 803 | * getColumnNumber: |
| 804 | * @ctx: the user data (XML parser context) |
| 805 | * |
| 806 | * Provide the column number of the current parsing point. |
| 807 | * DEPRECATED: use xmlSAX2GetColumnNumber() |
| 808 | * |
| 809 | * Returns an int |
| 810 | */ |
| 811 | int |
| 812 | getColumnNumber(void *ctx) |
| 813 | { |
| 814 | DEPRECATED("getColumnNumber") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 815 | return (xmlSAX2GetColumnNumber(ctx)); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 816 | } |
| 817 | |
| 818 | /** |
| 819 | * isStandalone: |
| 820 | * @ctx: the user data (XML parser context) |
| 821 | * |
| 822 | * Is this document tagged standalone ? |
| 823 | * DEPRECATED: use xmlSAX2IsStandalone() |
| 824 | * |
| 825 | * Returns 1 if true |
| 826 | */ |
| 827 | int |
| 828 | isStandalone(void *ctx) |
| 829 | { |
| 830 | DEPRECATED("isStandalone") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 831 | return (xmlSAX2IsStandalone(ctx)); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 832 | } |
| 833 | |
| 834 | /** |
| 835 | * hasInternalSubset: |
| 836 | * @ctx: the user data (XML parser context) |
| 837 | * |
| 838 | * Does this document has an internal subset |
| 839 | * DEPRECATED: use xmlSAX2HasInternalSubset() |
| 840 | * |
| 841 | * Returns 1 if true |
| 842 | */ |
| 843 | int |
| 844 | hasInternalSubset(void *ctx) |
| 845 | { |
| 846 | DEPRECATED("hasInternalSubset") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 847 | return (xmlSAX2HasInternalSubset(ctx)); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 848 | } |
| 849 | |
| 850 | /** |
| 851 | * hasExternalSubset: |
| 852 | * @ctx: the user data (XML parser context) |
| 853 | * |
| 854 | * Does this document has an external subset |
| 855 | * DEPRECATED: use xmlSAX2HasExternalSubset() |
| 856 | * |
| 857 | * Returns 1 if true |
| 858 | */ |
| 859 | int |
| 860 | hasExternalSubset(void *ctx) |
| 861 | { |
| 862 | DEPRECATED("hasExternalSubset") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 863 | return (xmlSAX2HasExternalSubset(ctx)); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 864 | } |
| 865 | |
| 866 | /** |
| 867 | * internalSubset: |
| 868 | * @ctx: the user data (XML parser context) |
| 869 | * @name: the root element name |
| 870 | * @ExternalID: the external ID |
| 871 | * @SystemID: the SYSTEM ID (e.g. filename or URL) |
| 872 | * |
| 873 | * Callback on internal subset declaration. |
| 874 | * DEPRECATED: use xmlSAX2InternalSubset() |
| 875 | */ |
| 876 | void |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 877 | internalSubset(void *ctx, const xmlChar * name, |
| 878 | const xmlChar * ExternalID, const xmlChar * SystemID) |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 879 | { |
| 880 | DEPRECATED("internalSubset") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 881 | xmlSAX2InternalSubset(ctx, name, ExternalID, SystemID); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 882 | } |
| 883 | |
| 884 | /** |
| 885 | * externalSubset: |
| 886 | * @ctx: the user data (XML parser context) |
| 887 | * @name: the root element name |
| 888 | * @ExternalID: the external ID |
| 889 | * @SystemID: the SYSTEM ID (e.g. filename or URL) |
| 890 | * |
| 891 | * Callback on external subset declaration. |
| 892 | * DEPRECATED: use xmlSAX2ExternalSubset() |
| 893 | */ |
| 894 | void |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 895 | externalSubset(void *ctx, const xmlChar * name, |
| 896 | const xmlChar * ExternalID, const xmlChar * SystemID) |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 897 | { |
| 898 | DEPRECATED("externalSubset") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 899 | xmlSAX2ExternalSubset(ctx, name, ExternalID, SystemID); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 900 | } |
| 901 | |
| 902 | /** |
| 903 | * resolveEntity: |
| 904 | * @ctx: the user data (XML parser context) |
| 905 | * @publicId: The public ID of the entity |
| 906 | * @systemId: The system ID of the entity |
| 907 | * |
| 908 | * The entity loader, to control the loading of external entities, |
| 909 | * the application can either: |
| 910 | * - override this resolveEntity() callback in the SAX block |
| 911 | * - or better use the xmlSetExternalEntityLoader() function to |
| 912 | * set up it's own entity resolution routine |
| 913 | * DEPRECATED: use xmlSAX2ResolveEntity() |
| 914 | * |
| 915 | * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour. |
| 916 | */ |
| 917 | xmlParserInputPtr |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 918 | resolveEntity(void *ctx, const xmlChar * publicId, |
| 919 | const xmlChar * systemId) |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 920 | { |
| 921 | DEPRECATED("resolveEntity") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 922 | return (xmlSAX2ResolveEntity(ctx, publicId, systemId)); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 923 | } |
| 924 | |
| 925 | /** |
| 926 | * getEntity: |
| 927 | * @ctx: the user data (XML parser context) |
| 928 | * @name: The entity name |
| 929 | * |
| 930 | * Get an entity by name |
| 931 | * DEPRECATED: use xmlSAX2GetEntity() |
| 932 | * |
| 933 | * Returns the xmlEntityPtr if found. |
| 934 | */ |
| 935 | xmlEntityPtr |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 936 | getEntity(void *ctx, const xmlChar * name) |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 937 | { |
| 938 | DEPRECATED("getEntity") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 939 | return (xmlSAX2GetEntity(ctx, name)); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 940 | } |
| 941 | |
| 942 | /** |
| 943 | * getParameterEntity: |
| 944 | * @ctx: the user data (XML parser context) |
| 945 | * @name: The entity name |
| 946 | * |
| 947 | * Get a parameter entity by name |
| 948 | * DEPRECATED: use xmlSAX2GetParameterEntity() |
| 949 | * |
| 950 | * Returns the xmlEntityPtr if found. |
| 951 | */ |
| 952 | xmlEntityPtr |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 953 | getParameterEntity(void *ctx, const xmlChar * name) |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 954 | { |
| 955 | DEPRECATED("getParameterEntity") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 956 | return (xmlSAX2GetParameterEntity(ctx, name)); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 957 | } |
| 958 | |
| 959 | |
| 960 | /** |
| 961 | * entityDecl: |
| 962 | * @ctx: the user data (XML parser context) |
| 963 | * @name: the entity name |
| 964 | * @type: the entity type |
| 965 | * @publicId: The public ID of the entity |
| 966 | * @systemId: The system ID of the entity |
| 967 | * @content: the entity value (without processing). |
| 968 | * |
| 969 | * An entity definition has been parsed |
| 970 | * DEPRECATED: use xmlSAX2EntityDecl() |
| 971 | */ |
| 972 | void |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 973 | entityDecl(void *ctx, const xmlChar * name, int type, |
| 974 | const xmlChar * publicId, const xmlChar * systemId, |
| 975 | xmlChar * content) |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 976 | { |
| 977 | DEPRECATED("entityDecl") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 978 | xmlSAX2EntityDecl(ctx, name, type, publicId, systemId, content); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 979 | } |
| 980 | |
| 981 | /** |
| 982 | * attributeDecl: |
| 983 | * @ctx: the user data (XML parser context) |
| 984 | * @elem: the name of the element |
| 985 | * @fullname: the attribute name |
| 986 | * @type: the attribute type |
| 987 | * @def: the type of default value |
| 988 | * @defaultValue: the attribute default value |
| 989 | * @tree: the tree of enumerated value set |
| 990 | * |
| 991 | * An attribute definition has been parsed |
| 992 | * DEPRECATED: use xmlSAX2AttributeDecl() |
| 993 | */ |
| 994 | void |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 995 | attributeDecl(void *ctx, const xmlChar * elem, const xmlChar * fullname, |
| 996 | int type, int def, const xmlChar * defaultValue, |
| 997 | xmlEnumerationPtr tree) |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 998 | { |
| 999 | DEPRECATED("attributeDecl") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1000 | xmlSAX2AttributeDecl(ctx, elem, fullname, type, def, defaultValue, |
| 1001 | tree); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1002 | } |
| 1003 | |
| 1004 | /** |
| 1005 | * elementDecl: |
| 1006 | * @ctx: the user data (XML parser context) |
| 1007 | * @name: the element name |
| 1008 | * @type: the element type |
| 1009 | * @content: the element value tree |
| 1010 | * |
| 1011 | * An element definition has been parsed |
| 1012 | * DEPRECATED: use xmlSAX2ElementDecl() |
| 1013 | */ |
| 1014 | void |
| 1015 | elementDecl(void *ctx, const xmlChar * name, int type, |
| 1016 | xmlElementContentPtr content) |
| 1017 | { |
| 1018 | DEPRECATED("elementDecl") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1019 | xmlSAX2ElementDecl(ctx, name, type, content); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1020 | } |
| 1021 | |
| 1022 | /** |
| 1023 | * notationDecl: |
| 1024 | * @ctx: the user data (XML parser context) |
| 1025 | * @name: The name of the notation |
| 1026 | * @publicId: The public ID of the entity |
| 1027 | * @systemId: The system ID of the entity |
| 1028 | * |
| 1029 | * What to do when a notation declaration has been parsed. |
| 1030 | * DEPRECATED: use xmlSAX2NotationDecl() |
| 1031 | */ |
| 1032 | void |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1033 | notationDecl(void *ctx, const xmlChar * name, |
| 1034 | const xmlChar * publicId, const xmlChar * systemId) |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1035 | { |
| 1036 | DEPRECATED("notationDecl") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1037 | xmlSAX2NotationDecl(ctx, name, publicId, systemId); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1038 | } |
| 1039 | |
| 1040 | /** |
| 1041 | * unparsedEntityDecl: |
| 1042 | * @ctx: the user data (XML parser context) |
| 1043 | * @name: The name of the entity |
| 1044 | * @publicId: The public ID of the entity |
| 1045 | * @systemId: The system ID of the entity |
| 1046 | * @notationName: the name of the notation |
| 1047 | * |
| 1048 | * What to do when an unparsed entity declaration is parsed |
| 1049 | * DEPRECATED: use xmlSAX2UnparsedEntityDecl() |
| 1050 | */ |
| 1051 | void |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1052 | unparsedEntityDecl(void *ctx, const xmlChar * name, |
| 1053 | const xmlChar * publicId, const xmlChar * systemId, |
| 1054 | const xmlChar * notationName) |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1055 | { |
| 1056 | DEPRECATED("unparsedEntityDecl") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1057 | xmlSAX2UnparsedEntityDecl(ctx, name, publicId, systemId, |
| 1058 | notationName); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1059 | } |
| 1060 | |
| 1061 | /** |
| 1062 | * setDocumentLocator: |
| 1063 | * @ctx: the user data (XML parser context) |
| 1064 | * @loc: A SAX Locator |
| 1065 | * |
| 1066 | * Receive the document locator at startup, actually xmlDefaultSAXLocator |
| 1067 | * Everything is available on the context, so this is useless in our case. |
| 1068 | * DEPRECATED |
| 1069 | */ |
| 1070 | void |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1071 | setDocumentLocator(void *ctx ATTRIBUTE_UNUSED, |
| 1072 | xmlSAXLocatorPtr loc ATTRIBUTE_UNUSED) |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1073 | { |
| 1074 | DEPRECATED("setDocumentLocator") |
| 1075 | } |
| 1076 | |
| 1077 | /** |
| 1078 | * startDocument: |
| 1079 | * @ctx: the user data (XML parser context) |
| 1080 | * |
| 1081 | * called when the document start being processed. |
| 1082 | * DEPRECATED: use xmlSAX2StartDocument() |
| 1083 | */ |
| 1084 | void |
| 1085 | startDocument(void *ctx) |
| 1086 | { |
Daniel Veillard | 4aede2e | 2003-10-17 12:43:59 +0000 | [diff] [blame] | 1087 | /* don't be too painful for glade users */ |
| 1088 | /* DEPRECATED("startDocument") */ |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1089 | xmlSAX2StartDocument(ctx); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1090 | } |
| 1091 | |
| 1092 | /** |
| 1093 | * endDocument: |
| 1094 | * @ctx: the user data (XML parser context) |
| 1095 | * |
| 1096 | * called when the document end has been detected. |
| 1097 | * DEPRECATED: use xmlSAX2EndDocument() |
| 1098 | */ |
| 1099 | void |
| 1100 | endDocument(void *ctx) |
| 1101 | { |
| 1102 | DEPRECATED("endDocument") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1103 | xmlSAX2EndDocument(ctx); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1104 | } |
| 1105 | |
| 1106 | /** |
| 1107 | * attribute: |
| 1108 | * @ctx: the user data (XML parser context) |
| 1109 | * @fullname: The attribute name, including namespace prefix |
| 1110 | * @value: The attribute value |
| 1111 | * |
| 1112 | * Handle an attribute that has been read by the parser. |
| 1113 | * The default handling is to convert the attribute into an |
| 1114 | * DOM subtree and past it in a new xmlAttr element added to |
| 1115 | * the element. |
| 1116 | * DEPRECATED: use xmlSAX2Attribute() |
| 1117 | */ |
| 1118 | void |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1119 | attribute(void *ctx ATTRIBUTE_UNUSED, |
| 1120 | const xmlChar * fullname ATTRIBUTE_UNUSED, |
| 1121 | const xmlChar * value ATTRIBUTE_UNUSED) |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1122 | { |
| 1123 | DEPRECATED("attribute") |
| 1124 | } |
| 1125 | |
| 1126 | /** |
| 1127 | * startElement: |
| 1128 | * @ctx: the user data (XML parser context) |
| 1129 | * @fullname: The element name, including namespace prefix |
| 1130 | * @atts: An array of name/value attributes pairs, NULL terminated |
| 1131 | * |
| 1132 | * called when an opening tag has been processed. |
| 1133 | * DEPRECATED: use xmlSAX2StartElement() |
| 1134 | */ |
| 1135 | void |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1136 | startElement(void *ctx, const xmlChar * fullname, const xmlChar ** atts) |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1137 | { |
Daniel Veillard | 509028f | 2003-12-24 11:10:17 +0000 | [diff] [blame] | 1138 | xmlSAX2StartElement(ctx, fullname, atts); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1139 | } |
| 1140 | |
| 1141 | /** |
| 1142 | * endElement: |
| 1143 | * @ctx: the user data (XML parser context) |
| 1144 | * @name: The element name |
| 1145 | * |
| 1146 | * called when the end of an element has been detected. |
| 1147 | * DEPRECATED: use xmlSAX2EndElement() |
| 1148 | */ |
| 1149 | void |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1150 | endElement(void *ctx, const xmlChar * name ATTRIBUTE_UNUSED) |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1151 | { |
| 1152 | DEPRECATED("endElement") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1153 | xmlSAX2EndElement(ctx, name); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1154 | } |
| 1155 | |
| 1156 | /** |
| 1157 | * reference: |
| 1158 | * @ctx: the user data (XML parser context) |
| 1159 | * @name: The entity name |
| 1160 | * |
| 1161 | * called when an entity reference is detected. |
| 1162 | * DEPRECATED: use xmlSAX2Reference() |
| 1163 | */ |
| 1164 | void |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1165 | reference(void *ctx, const xmlChar * name) |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1166 | { |
| 1167 | DEPRECATED("reference") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1168 | xmlSAX2Reference(ctx, name); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1169 | } |
| 1170 | |
| 1171 | /** |
| 1172 | * characters: |
| 1173 | * @ctx: the user data (XML parser context) |
| 1174 | * @ch: a xmlChar string |
| 1175 | * @len: the number of xmlChar |
| 1176 | * |
| 1177 | * receiving some chars from the parser. |
| 1178 | * DEPRECATED: use xmlSAX2Characters() |
| 1179 | */ |
| 1180 | void |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1181 | characters(void *ctx, const xmlChar * ch, int len) |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1182 | { |
| 1183 | DEPRECATED("characters") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1184 | xmlSAX2Characters(ctx, ch, len); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1185 | } |
| 1186 | |
| 1187 | /** |
| 1188 | * ignorableWhitespace: |
| 1189 | * @ctx: the user data (XML parser context) |
| 1190 | * @ch: a xmlChar string |
| 1191 | * @len: the number of xmlChar |
| 1192 | * |
| 1193 | * receiving some ignorable whitespaces from the parser. |
| 1194 | * UNUSED: by default the DOM building will use characters |
| 1195 | * DEPRECATED: use xmlSAX2IgnorableWhitespace() |
| 1196 | */ |
| 1197 | void |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1198 | ignorableWhitespace(void *ctx ATTRIBUTE_UNUSED, |
| 1199 | const xmlChar * ch ATTRIBUTE_UNUSED, |
| 1200 | int len ATTRIBUTE_UNUSED) |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1201 | { |
| 1202 | DEPRECATED("ignorableWhitespace") |
| 1203 | } |
| 1204 | |
| 1205 | /** |
| 1206 | * processingInstruction: |
| 1207 | * @ctx: the user data (XML parser context) |
| 1208 | * @target: the target name |
| 1209 | * @data: the PI data's |
| 1210 | * |
| 1211 | * A processing instruction has been parsed. |
| 1212 | * DEPRECATED: use xmlSAX2ProcessingInstruction() |
| 1213 | */ |
| 1214 | void |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1215 | processingInstruction(void *ctx, const xmlChar * target, |
| 1216 | const xmlChar * data) |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1217 | { |
| 1218 | DEPRECATED("processingInstruction") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1219 | xmlSAX2ProcessingInstruction(ctx, target, data); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1220 | } |
| 1221 | |
| 1222 | /** |
| 1223 | * globalNamespace: |
| 1224 | * @ctx: the user data (XML parser context) |
| 1225 | * @href: the namespace associated URN |
| 1226 | * @prefix: the namespace prefix |
| 1227 | * |
| 1228 | * An old global namespace has been parsed. |
| 1229 | * DEPRECATED |
| 1230 | */ |
| 1231 | void |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1232 | globalNamespace(void *ctx ATTRIBUTE_UNUSED, |
| 1233 | const xmlChar * href ATTRIBUTE_UNUSED, |
| 1234 | const xmlChar * prefix ATTRIBUTE_UNUSED) |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1235 | { |
| 1236 | DEPRECATED("globalNamespace") |
| 1237 | } |
| 1238 | |
| 1239 | /** |
| 1240 | * setNamespace: |
| 1241 | * @ctx: the user data (XML parser context) |
| 1242 | * @name: the namespace prefix |
| 1243 | * |
| 1244 | * Set the current element namespace. |
| 1245 | * DEPRECATED |
| 1246 | */ |
| 1247 | |
| 1248 | void |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1249 | setNamespace(void *ctx ATTRIBUTE_UNUSED, |
| 1250 | const xmlChar * name ATTRIBUTE_UNUSED) |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1251 | { |
| 1252 | DEPRECATED("setNamespace") |
| 1253 | } |
| 1254 | |
| 1255 | /** |
| 1256 | * getNamespace: |
| 1257 | * @ctx: the user data (XML parser context) |
| 1258 | * |
| 1259 | * Get the current element namespace. |
| 1260 | * DEPRECATED |
| 1261 | * |
| 1262 | * Returns the xmlNsPtr or NULL if none |
| 1263 | */ |
| 1264 | |
| 1265 | xmlNsPtr |
| 1266 | getNamespace(void *ctx ATTRIBUTE_UNUSED) |
| 1267 | { |
| 1268 | DEPRECATED("getNamespace") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1269 | return (NULL); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1270 | } |
| 1271 | |
| 1272 | /** |
| 1273 | * checkNamespace: |
| 1274 | * @ctx: the user data (XML parser context) |
| 1275 | * @namespace: the namespace to check against |
| 1276 | * |
| 1277 | * Check that the current element namespace is the same as the |
| 1278 | * one read upon parsing. |
| 1279 | * DEPRECATED |
| 1280 | * |
| 1281 | * Returns 1 if true 0 otherwise |
| 1282 | */ |
| 1283 | |
| 1284 | int |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1285 | checkNamespace(void *ctx ATTRIBUTE_UNUSED, |
| 1286 | xmlChar * namespace ATTRIBUTE_UNUSED) |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1287 | { |
| 1288 | DEPRECATED("checkNamespace") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1289 | return (0); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1290 | } |
| 1291 | |
| 1292 | /** |
| 1293 | * namespaceDecl: |
| 1294 | * @ctx: the user data (XML parser context) |
| 1295 | * @href: the namespace associated URN |
| 1296 | * @prefix: the namespace prefix |
| 1297 | * |
| 1298 | * A namespace has been parsed. |
| 1299 | * DEPRECATED |
| 1300 | */ |
| 1301 | void |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1302 | namespaceDecl(void *ctx ATTRIBUTE_UNUSED, |
| 1303 | const xmlChar * href ATTRIBUTE_UNUSED, |
| 1304 | const xmlChar * prefix ATTRIBUTE_UNUSED) |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1305 | { |
| 1306 | DEPRECATED("namespaceDecl") |
| 1307 | } |
| 1308 | |
| 1309 | /** |
| 1310 | * comment: |
| 1311 | * @ctx: the user data (XML parser context) |
| 1312 | * @value: the comment content |
| 1313 | * |
| 1314 | * A comment has been parsed. |
| 1315 | * DEPRECATED: use xmlSAX2Comment() |
| 1316 | */ |
| 1317 | void |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1318 | comment(void *ctx, const xmlChar * value) |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1319 | { |
| 1320 | DEPRECATED("comment") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1321 | xmlSAX2Comment(ctx, value); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1322 | } |
| 1323 | |
| 1324 | /** |
| 1325 | * cdataBlock: |
| 1326 | * @ctx: the user data (XML parser context) |
| 1327 | * @value: The pcdata content |
| 1328 | * @len: the block length |
| 1329 | * |
| 1330 | * called when a pcdata block has been parsed |
| 1331 | * DEPRECATED: use xmlSAX2CDataBlock() |
| 1332 | */ |
| 1333 | void |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1334 | cdataBlock(void *ctx, const xmlChar * value, int len) |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1335 | { |
| 1336 | DEPRECATED("cdataBlock") |
Daniel Veillard | f403d29 | 2003-10-05 13:51:35 +0000 | [diff] [blame] | 1337 | xmlSAX2CDataBlock(ctx, value, len); |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1338 | } |
Daniel Veillard | 8940fd5 | 2003-09-29 09:07:08 +0000 | [diff] [blame] | 1339 | #endif /* LIBXML_LEGACY_ENABLED */ |
| 1340 | |