| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764 |
- /*
- * legacy.c: set of deprecated routines, not to be used anymore but
- * kept purely for ABI compatibility
- *
- * See Copyright for the status of this software.
- *
- * daniel@veillard.com
- */
- #define IN_LIBXML
- #include "libxml.h"
- #ifdef LIBXML_LEGACY_ENABLED
- #include <string.h>
- #include <libxml/tree.h>
- #include <libxml/entities.h>
- #include <libxml/SAX.h>
- #include <libxml/parserInternals.h>
- #include <libxml/HTMLparser.h>
- void xmlUpgradeOldNs(xmlDocPtr doc);
- /************************************************************************
- * *
- * Deprecated functions kept for compatibility *
- * *
- ************************************************************************/
- #ifdef LIBXML_HTML_ENABLED
- xmlChar *htmlDecodeEntities(htmlParserCtxtPtr ctxt, int len, xmlChar end,
- xmlChar end2, xmlChar end3);
- /**
- * htmlDecodeEntities:
- * @ctxt: the parser context
- * @len: the len to decode (in bytes !), -1 for no size limit
- * @end: an end marker xmlChar, 0 if none
- * @end2: an end marker xmlChar, 0 if none
- * @end3: an end marker xmlChar, 0 if none
- *
- * Substitute the HTML entities by their value
- *
- * DEPRECATED !!!!
- *
- * Returns A newly allocated string with the substitution done. The caller
- * must deallocate it !
- */
- xmlChar *
- htmlDecodeEntities(htmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
- int len ATTRIBUTE_UNUSED, xmlChar end ATTRIBUTE_UNUSED,
- xmlChar end2 ATTRIBUTE_UNUSED,
- xmlChar end3 ATTRIBUTE_UNUSED)
- {
- static int deprecated = 0;
- if (!deprecated) {
- xmlGenericError(xmlGenericErrorContext,
- "htmlDecodeEntities() deprecated function reached\n");
- deprecated = 1;
- }
- return (NULL);
- }
- #endif
- /**
- * xmlInitializePredefinedEntities:
- *
- * Set up the predefined entities.
- * Deprecated call
- */
- void
- xmlInitializePredefinedEntities(void)
- {
- }
- /**
- * xmlCleanupPredefinedEntities:
- *
- * Cleanup up the predefined entities table.
- * Deprecated call
- */
- void
- xmlCleanupPredefinedEntities(void)
- {
- }
- static const char* const xmlFeaturesList[] = {
- "validate",
- "load subset",
- "keep blanks",
- "disable SAX",
- "fetch external entities",
- "substitute entities",
- "gather line info",
- "user data",
- "is html",
- "is standalone",
- "stop parser",
- "document",
- "is well formed",
- "is valid",
- "SAX block",
- "SAX function internalSubset",
- "SAX function isStandalone",
- "SAX function hasInternalSubset",
- "SAX function hasExternalSubset",
- "SAX function resolveEntity",
- "SAX function getEntity",
- "SAX function entityDecl",
- "SAX function notationDecl",
- "SAX function attributeDecl",
- "SAX function elementDecl",
- "SAX function unparsedEntityDecl",
- "SAX function setDocumentLocator",
- "SAX function startDocument",
- "SAX function endDocument",
- "SAX function startElement",
- "SAX function endElement",
- "SAX function reference",
- "SAX function characters",
- "SAX function ignorableWhitespace",
- "SAX function processingInstruction",
- "SAX function comment",
- "SAX function warning",
- "SAX function error",
- "SAX function fatalError",
- "SAX function getParameterEntity",
- "SAX function cdataBlock",
- "SAX function externalSubset",
- };
- /**
- * xmlGetFeaturesList:
- * @len: the length of the features name array (input/output)
- * @result: an array of string to be filled with the features name.
- *
- * Copy at most *@len feature names into the @result array
- *
- * Returns -1 in case or error, or the total number of features,
- * len is updated with the number of strings copied,
- * strings must not be deallocated
- */
- int
- xmlGetFeaturesList(int *len, const char **result)
- {
- int ret, i;
- ret = sizeof(xmlFeaturesList) / sizeof(xmlFeaturesList[0]);
- if ((len == NULL) || (result == NULL))
- return (ret);
- if ((*len < 0) || (*len >= 1000))
- return (-1);
- if (*len > ret)
- *len = ret;
- for (i = 0; i < *len; i++)
- result[i] = xmlFeaturesList[i];
- return (ret);
- }
- /**
- * xmlGetFeature:
- * @ctxt: an XML/HTML parser context
- * @name: the feature name
- * @result: location to store the result
- *
- * Read the current value of one feature of this parser instance
- *
- * Returns -1 in case or error, 0 otherwise
- */
- int
- xmlGetFeature(xmlParserCtxtPtr ctxt, const char *name, void *result)
- {
- if ((ctxt == NULL) || (name == NULL) || (result == NULL))
- return (-1);
- if (!strcmp(name, "validate")) {
- *((int *) result) = ctxt->validate;
- } else if (!strcmp(name, "keep blanks")) {
- *((int *) result) = ctxt->keepBlanks;
- } else if (!strcmp(name, "disable SAX")) {
- *((int *) result) = ctxt->disableSAX;
- } else if (!strcmp(name, "fetch external entities")) {
- *((int *) result) = ctxt->loadsubset;
- } else if (!strcmp(name, "substitute entities")) {
- *((int *) result) = ctxt->replaceEntities;
- } else if (!strcmp(name, "gather line info")) {
- *((int *) result) = ctxt->record_info;
- } else if (!strcmp(name, "user data")) {
- *((void **) result) = ctxt->userData;
- } else if (!strcmp(name, "is html")) {
- *((int *) result) = ctxt->html;
- } else if (!strcmp(name, "is standalone")) {
- *((int *) result) = ctxt->standalone;
- } else if (!strcmp(name, "document")) {
- *((xmlDocPtr *) result) = ctxt->myDoc;
- } else if (!strcmp(name, "is well formed")) {
- *((int *) result) = ctxt->wellFormed;
- } else if (!strcmp(name, "is valid")) {
- *((int *) result) = ctxt->valid;
- } else if (!strcmp(name, "SAX block")) {
- *((xmlSAXHandlerPtr *) result) = ctxt->sax;
- } else if (!strcmp(name, "SAX function internalSubset")) {
- *((internalSubsetSAXFunc *) result) = ctxt->sax->internalSubset;
- } else if (!strcmp(name, "SAX function isStandalone")) {
- *((isStandaloneSAXFunc *) result) = ctxt->sax->isStandalone;
- } else if (!strcmp(name, "SAX function hasInternalSubset")) {
- *((hasInternalSubsetSAXFunc *) result) =
- ctxt->sax->hasInternalSubset;
- } else if (!strcmp(name, "SAX function hasExternalSubset")) {
- *((hasExternalSubsetSAXFunc *) result) =
- ctxt->sax->hasExternalSubset;
- } else if (!strcmp(name, "SAX function resolveEntity")) {
- *((resolveEntitySAXFunc *) result) = ctxt->sax->resolveEntity;
- } else if (!strcmp(name, "SAX function getEntity")) {
- *((getEntitySAXFunc *) result) = ctxt->sax->getEntity;
- } else if (!strcmp(name, "SAX function entityDecl")) {
- *((entityDeclSAXFunc *) result) = ctxt->sax->entityDecl;
- } else if (!strcmp(name, "SAX function notationDecl")) {
- *((notationDeclSAXFunc *) result) = ctxt->sax->notationDecl;
- } else if (!strcmp(name, "SAX function attributeDecl")) {
- *((attributeDeclSAXFunc *) result) = ctxt->sax->attributeDecl;
- } else if (!strcmp(name, "SAX function elementDecl")) {
- *((elementDeclSAXFunc *) result) = ctxt->sax->elementDecl;
- } else if (!strcmp(name, "SAX function unparsedEntityDecl")) {
- *((unparsedEntityDeclSAXFunc *) result) =
- ctxt->sax->unparsedEntityDecl;
- } else if (!strcmp(name, "SAX function setDocumentLocator")) {
- *((setDocumentLocatorSAXFunc *) result) =
- ctxt->sax->setDocumentLocator;
- } else if (!strcmp(name, "SAX function startDocument")) {
- *((startDocumentSAXFunc *) result) = ctxt->sax->startDocument;
- } else if (!strcmp(name, "SAX function endDocument")) {
- *((endDocumentSAXFunc *) result) = ctxt->sax->endDocument;
- } else if (!strcmp(name, "SAX function startElement")) {
- *((startElementSAXFunc *) result) = ctxt->sax->startElement;
- } else if (!strcmp(name, "SAX function endElement")) {
- *((endElementSAXFunc *) result) = ctxt->sax->endElement;
- } else if (!strcmp(name, "SAX function reference")) {
- *((referenceSAXFunc *) result) = ctxt->sax->reference;
- } else if (!strcmp(name, "SAX function characters")) {
- *((charactersSAXFunc *) result) = ctxt->sax->characters;
- } else if (!strcmp(name, "SAX function ignorableWhitespace")) {
- *((ignorableWhitespaceSAXFunc *) result) =
- ctxt->sax->ignorableWhitespace;
- } else if (!strcmp(name, "SAX function processingInstruction")) {
- *((processingInstructionSAXFunc *) result) =
- ctxt->sax->processingInstruction;
- } else if (!strcmp(name, "SAX function comment")) {
- *((commentSAXFunc *) result) = ctxt->sax->comment;
- } else if (!strcmp(name, "SAX function warning")) {
- *((warningSAXFunc *) result) = ctxt->sax->warning;
- } else if (!strcmp(name, "SAX function error")) {
- *((errorSAXFunc *) result) = ctxt->sax->error;
- } else if (!strcmp(name, "SAX function fatalError")) {
- *((fatalErrorSAXFunc *) result) = ctxt->sax->fatalError;
- } else if (!strcmp(name, "SAX function getParameterEntity")) {
- *((getParameterEntitySAXFunc *) result) =
- ctxt->sax->getParameterEntity;
- } else if (!strcmp(name, "SAX function cdataBlock")) {
- *((cdataBlockSAXFunc *) result) = ctxt->sax->cdataBlock;
- } else if (!strcmp(name, "SAX function externalSubset")) {
- *((externalSubsetSAXFunc *) result) = ctxt->sax->externalSubset;
- } else {
- return (-1);
- }
- return (0);
- }
- /**
- * xmlSetFeature:
- * @ctxt: an XML/HTML parser context
- * @name: the feature name
- * @value: pointer to the location of the new value
- *
- * Change the current value of one feature of this parser instance
- *
- * Returns -1 in case or error, 0 otherwise
- */
- int
- xmlSetFeature(xmlParserCtxtPtr ctxt, const char *name, void *value)
- {
- if ((ctxt == NULL) || (name == NULL) || (value == NULL))
- return (-1);
- if (!strcmp(name, "validate")) {
- int newvalidate = *((int *) value);
- if ((!ctxt->validate) && (newvalidate != 0)) {
- if (ctxt->vctxt.warning == NULL)
- ctxt->vctxt.warning = xmlParserValidityWarning;
- if (ctxt->vctxt.error == NULL)
- ctxt->vctxt.error = xmlParserValidityError;
- ctxt->vctxt.nodeMax = 0;
- }
- ctxt->validate = newvalidate;
- } else if (!strcmp(name, "keep blanks")) {
- ctxt->keepBlanks = *((int *) value);
- } else if (!strcmp(name, "disable SAX")) {
- ctxt->disableSAX = *((int *) value);
- } else if (!strcmp(name, "fetch external entities")) {
- ctxt->loadsubset = *((int *) value);
- } else if (!strcmp(name, "substitute entities")) {
- ctxt->replaceEntities = *((int *) value);
- } else if (!strcmp(name, "gather line info")) {
- ctxt->record_info = *((int *) value);
- } else if (!strcmp(name, "user data")) {
- ctxt->userData = *((void **) value);
- } else if (!strcmp(name, "is html")) {
- ctxt->html = *((int *) value);
- } else if (!strcmp(name, "is standalone")) {
- ctxt->standalone = *((int *) value);
- } else if (!strcmp(name, "document")) {
- ctxt->myDoc = *((xmlDocPtr *) value);
- } else if (!strcmp(name, "is well formed")) {
- ctxt->wellFormed = *((int *) value);
- } else if (!strcmp(name, "is valid")) {
- ctxt->valid = *((int *) value);
- } else if (!strcmp(name, "SAX block")) {
- ctxt->sax = *((xmlSAXHandlerPtr *) value);
- } else if (!strcmp(name, "SAX function internalSubset")) {
- ctxt->sax->internalSubset = *((internalSubsetSAXFunc *) value);
- } else if (!strcmp(name, "SAX function isStandalone")) {
- ctxt->sax->isStandalone = *((isStandaloneSAXFunc *) value);
- } else if (!strcmp(name, "SAX function hasInternalSubset")) {
- ctxt->sax->hasInternalSubset =
- *((hasInternalSubsetSAXFunc *) value);
- } else if (!strcmp(name, "SAX function hasExternalSubset")) {
- ctxt->sax->hasExternalSubset =
- *((hasExternalSubsetSAXFunc *) value);
- } else if (!strcmp(name, "SAX function resolveEntity")) {
- ctxt->sax->resolveEntity = *((resolveEntitySAXFunc *) value);
- } else if (!strcmp(name, "SAX function getEntity")) {
- ctxt->sax->getEntity = *((getEntitySAXFunc *) value);
- } else if (!strcmp(name, "SAX function entityDecl")) {
- ctxt->sax->entityDecl = *((entityDeclSAXFunc *) value);
- } else if (!strcmp(name, "SAX function notationDecl")) {
- ctxt->sax->notationDecl = *((notationDeclSAXFunc *) value);
- } else if (!strcmp(name, "SAX function attributeDecl")) {
- ctxt->sax->attributeDecl = *((attributeDeclSAXFunc *) value);
- } else if (!strcmp(name, "SAX function elementDecl")) {
- ctxt->sax->elementDecl = *((elementDeclSAXFunc *) value);
- } else if (!strcmp(name, "SAX function unparsedEntityDecl")) {
- ctxt->sax->unparsedEntityDecl =
- *((unparsedEntityDeclSAXFunc *) value);
- } else if (!strcmp(name, "SAX function setDocumentLocator")) {
- ctxt->sax->setDocumentLocator =
- *((setDocumentLocatorSAXFunc *) value);
- } else if (!strcmp(name, "SAX function startDocument")) {
- ctxt->sax->startDocument = *((startDocumentSAXFunc *) value);
- } else if (!strcmp(name, "SAX function endDocument")) {
- ctxt->sax->endDocument = *((endDocumentSAXFunc *) value);
- } else if (!strcmp(name, "SAX function startElement")) {
- ctxt->sax->startElement = *((startElementSAXFunc *) value);
- } else if (!strcmp(name, "SAX function endElement")) {
- ctxt->sax->endElement = *((endElementSAXFunc *) value);
- } else if (!strcmp(name, "SAX function reference")) {
- ctxt->sax->reference = *((referenceSAXFunc *) value);
- } else if (!strcmp(name, "SAX function characters")) {
- ctxt->sax->characters = *((charactersSAXFunc *) value);
- } else if (!strcmp(name, "SAX function ignorableWhitespace")) {
- ctxt->sax->ignorableWhitespace =
- *((ignorableWhitespaceSAXFunc *) value);
- } else if (!strcmp(name, "SAX function processingInstruction")) {
- ctxt->sax->processingInstruction =
- *((processingInstructionSAXFunc *) value);
- } else if (!strcmp(name, "SAX function comment")) {
- ctxt->sax->comment = *((commentSAXFunc *) value);
- } else if (!strcmp(name, "SAX function warning")) {
- ctxt->sax->warning = *((warningSAXFunc *) value);
- } else if (!strcmp(name, "SAX function error")) {
- ctxt->sax->error = *((errorSAXFunc *) value);
- } else if (!strcmp(name, "SAX function fatalError")) {
- ctxt->sax->fatalError = *((fatalErrorSAXFunc *) value);
- } else if (!strcmp(name, "SAX function getParameterEntity")) {
- ctxt->sax->getParameterEntity =
- *((getParameterEntitySAXFunc *) value);
- } else if (!strcmp(name, "SAX function cdataBlock")) {
- ctxt->sax->cdataBlock = *((cdataBlockSAXFunc *) value);
- } else if (!strcmp(name, "SAX function externalSubset")) {
- ctxt->sax->externalSubset = *((externalSubsetSAXFunc *) value);
- } else {
- return (-1);
- }
- return (0);
- }
- /**
- * xmlDecodeEntities:
- * @ctxt: the parser context
- * @len: the len to decode (in bytes !), -1 for no size limit
- * @what: combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF
- * @end: an end marker xmlChar, 0 if none
- * @end2: an end marker xmlChar, 0 if none
- * @end3: an end marker xmlChar, 0 if none
- *
- * This function is deprecated, we now always process entities content
- * through xmlStringDecodeEntities
- *
- * TODO: remove it in next major release.
- *
- * [67] Reference ::= EntityRef | CharRef
- *
- * [69] PEReference ::= '%' Name ';'
- *
- * Returns A newly allocated string with the substitution done. The caller
- * must deallocate it !
- */
- xmlChar *
- xmlDecodeEntities(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
- int len ATTRIBUTE_UNUSED, int what ATTRIBUTE_UNUSED,
- xmlChar end ATTRIBUTE_UNUSED,
- xmlChar end2 ATTRIBUTE_UNUSED,
- xmlChar end3 ATTRIBUTE_UNUSED)
- {
- static int deprecated = 0;
- if (!deprecated) {
- xmlGenericError(xmlGenericErrorContext,
- "xmlDecodeEntities() deprecated function reached\n");
- deprecated = 1;
- }
- return (NULL);
- }
- /**
- * xmlNamespaceParseNCName:
- * @ctxt: an XML parser context
- *
- * parse an XML namespace name.
- *
- * TODO: this seems not in use anymore, the namespace handling is done on
- * top of the SAX interfaces, i.e. not on raw input.
- *
- * [NS 3] NCName ::= (Letter | '_') (NCNameChar)*
- *
- * [NS 4] NCNameChar ::= Letter | Digit | '.' | '-' | '_' |
- * CombiningChar | Extender
- *
- * Returns the namespace name or NULL
- */
- xmlChar *
- xmlNamespaceParseNCName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
- {
- static int deprecated = 0;
- if (!deprecated) {
- xmlGenericError(xmlGenericErrorContext,
- "xmlNamespaceParseNCName() deprecated function reached\n");
- deprecated = 1;
- }
- return (NULL);
- }
- /**
- * xmlNamespaceParseQName:
- * @ctxt: an XML parser context
- * @prefix: a xmlChar **
- *
- * TODO: this seems not in use anymore, the namespace handling is done on
- * top of the SAX interfaces, i.e. not on raw input.
- *
- * parse an XML qualified name
- *
- * [NS 5] QName ::= (Prefix ':')? LocalPart
- *
- * [NS 6] Prefix ::= NCName
- *
- * [NS 7] LocalPart ::= NCName
- *
- * Returns the local part, and prefix is updated
- * to get the Prefix if any.
- */
- xmlChar *
- xmlNamespaceParseQName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
- xmlChar ** prefix ATTRIBUTE_UNUSED)
- {
- static int deprecated = 0;
- if (!deprecated) {
- xmlGenericError(xmlGenericErrorContext,
- "xmlNamespaceParseQName() deprecated function reached\n");
- deprecated = 1;
- }
- return (NULL);
- }
- /**
- * xmlNamespaceParseNSDef:
- * @ctxt: an XML parser context
- *
- * parse a namespace prefix declaration
- *
- * TODO: this seems not in use anymore, the namespace handling is done on
- * top of the SAX interfaces, i.e. not on raw input.
- *
- * [NS 1] NSDef ::= PrefixDef Eq SystemLiteral
- *
- * [NS 2] PrefixDef ::= 'xmlns' (':' NCName)?
- *
- * Returns the namespace name
- */
- xmlChar *
- xmlNamespaceParseNSDef(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
- {
- static int deprecated = 0;
- if (!deprecated) {
- xmlGenericError(xmlGenericErrorContext,
- "xmlNamespaceParseNSDef() deprecated function reached\n");
- deprecated = 1;
- }
- return (NULL);
- }
- /**
- * xmlParseQuotedString:
- * @ctxt: an XML parser context
- *
- * Parse and return a string between quotes or doublequotes
- *
- * TODO: Deprecated, to be removed at next drop of binary compatibility
- *
- * Returns the string parser or NULL.
- */
- xmlChar *
- xmlParseQuotedString(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
- {
- static int deprecated = 0;
- if (!deprecated) {
- xmlGenericError(xmlGenericErrorContext,
- "xmlParseQuotedString() deprecated function reached\n");
- deprecated = 1;
- }
- return (NULL);
- }
- /**
- * xmlParseNamespace:
- * @ctxt: an XML parser context
- *
- * xmlParseNamespace: parse specific PI '<?namespace ...' constructs.
- *
- * This is what the older xml-name Working Draft specified, a bunch of
- * other stuff may still rely on it, so support is still here as
- * if it was declared on the root of the Tree:-(
- *
- * TODO: remove from library
- *
- * To be removed at next drop of binary compatibility
- */
- void
- xmlParseNamespace(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
- {
- static int deprecated = 0;
- if (!deprecated) {
- xmlGenericError(xmlGenericErrorContext,
- "xmlParseNamespace() deprecated function reached\n");
- deprecated = 1;
- }
- }
- /**
- * xmlScanName:
- * @ctxt: an XML parser context
- *
- * Trickery: parse an XML name but without consuming the input flow
- * Needed for rollback cases. Used only when parsing entities references.
- *
- * TODO: seems deprecated now, only used in the default part of
- * xmlParserHandleReference
- *
- * [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' |
- * CombiningChar | Extender
- *
- * [5] Name ::= (Letter | '_' | ':') (NameChar)*
- *
- * [6] Names ::= Name (S Name)*
- *
- * Returns the Name parsed or NULL
- */
- xmlChar *
- xmlScanName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
- {
- static int deprecated = 0;
- if (!deprecated) {
- xmlGenericError(xmlGenericErrorContext,
- "xmlScanName() deprecated function reached\n");
- deprecated = 1;
- }
- return (NULL);
- }
- /**
- * xmlParserHandleReference:
- * @ctxt: the parser context
- *
- * TODO: Remove, now deprecated ... the test is done directly in the
- * content parsing
- * routines.
- *
- * [67] Reference ::= EntityRef | CharRef
- *
- * [68] EntityRef ::= '&' Name ';'
- *
- * [ WFC: Entity Declared ]
- * the Name given in the entity reference must match that in an entity
- * declaration, except that well-formed documents need not declare any
- * of the following entities: amp, lt, gt, apos, quot.
- *
- * [ WFC: Parsed Entity ]
- * An entity reference must not contain the name of an unparsed entity
- *
- * [66] CharRef ::= '&#' [0-9]+ ';' |
- * '&#x' [0-9a-fA-F]+ ';'
- *
- * A PEReference may have been detected in the current input stream
- * the handling is done accordingly to
- * http://www.w3.org/TR/REC-xml#entproc
- */
- void
- xmlParserHandleReference(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED)
- {
- static int deprecated = 0;
- if (!deprecated) {
- xmlGenericError(xmlGenericErrorContext,
- "xmlParserHandleReference() deprecated function reached\n");
- deprecated = 1;
- }
- return;
- }
- /**
- * xmlHandleEntity:
- * @ctxt: an XML parser context
- * @entity: an XML entity pointer.
- *
- * Default handling of defined entities, when should we define a new input
- * stream ? When do we just handle that as a set of chars ?
- *
- * OBSOLETE: to be removed at some point.
- */
- void
- xmlHandleEntity(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED,
- xmlEntityPtr entity ATTRIBUTE_UNUSED)
- {
- static int deprecated = 0;
- if (!deprecated) {
- xmlGenericError(xmlGenericErrorContext,
- "xmlHandleEntity() deprecated function reached\n");
- deprecated = 1;
- }
- }
- /**
- * xmlNewGlobalNs:
- * @doc: the document carrying the namespace
- * @href: the URI associated
- * @prefix: the prefix for the namespace
- *
- * Creation of a Namespace, the old way using PI and without scoping
- * DEPRECATED !!!
- * Returns NULL this functionality had been removed
- */
- xmlNsPtr
- xmlNewGlobalNs(xmlDocPtr doc ATTRIBUTE_UNUSED,
- const xmlChar * href ATTRIBUTE_UNUSED,
- const xmlChar * prefix ATTRIBUTE_UNUSED)
- {
- static int deprecated = 0;
- if (!deprecated) {
- xmlGenericError(xmlGenericErrorContext,
- "xmlNewGlobalNs() deprecated function reached\n");
- deprecated = 1;
- }
- return (NULL);
- }
- /**
- * xmlUpgradeOldNs:
- * @doc: a document pointer
- *
- * Upgrade old style Namespaces (PI) and move them to the root of the document.
- * DEPRECATED
- */
- void
- xmlUpgradeOldNs(xmlDocPtr doc ATTRIBUTE_UNUSED)
- {
- static int deprecated = 0;
- if (!deprecated) {
- xmlGenericError(xmlGenericErrorContext,
- "xmlUpgradeOldNs() deprecated function reached\n");
- deprecated = 1;
- }
- }
- /**
- * xmlEncodeEntities:
- * @doc: the document containing the string
- * @input: A string to convert to XML.
- *
- * TODO: remove xmlEncodeEntities, once we are not afraid of breaking binary
- * compatibility
- *
- * People must migrate their code to xmlEncodeEntitiesReentrant !
- * This routine will issue a warning when encountered.
- *
- * Returns NULL
- */
- const xmlChar *
- xmlEncodeEntities(xmlDocPtr doc ATTRIBUTE_UNUSED,
- const xmlChar * input ATTRIBUTE_UNUSED)
- {
- static int warning = 1;
- if (warning) {
- xmlGenericError(xmlGenericErrorContext,
- "Deprecated API xmlEncodeEntities() used\n");
- xmlGenericError(xmlGenericErrorContext,
- " change code to use xmlEncodeEntitiesReentrant()\n");
- warning = 0;
- }
- return (NULL);
- }
- /************************************************************************
- * *
- * Old set of SAXv1 functions *
- * *
- ************************************************************************/
- static int deprecated_v1_msg = 0;
- #define DEPRECATED(n) \
- if (deprecated_v1_msg == 0) \
- xmlGenericError(xmlGenericErrorContext, \
- "Use of deprecated SAXv1 function %s\n", n); \
- deprecated_v1_msg++;
- /**
- * getPublicId:
- * @ctx: the user data (XML parser context)
- *
- * Provides the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN"
- * DEPRECATED: use xmlSAX2GetPublicId()
- *
- * Returns a xmlChar *
- */
- const xmlChar *
- getPublicId(void *ctx)
- {
- DEPRECATED("getPublicId")
- return (xmlSAX2GetPublicId(ctx));
- }
- /**
- * getSystemId:
- * @ctx: the user data (XML parser context)
- *
- * Provides the system ID, basically URL or filename e.g.
- * http://www.sgmlsource.com/dtds/memo.dtd
- * DEPRECATED: use xmlSAX2GetSystemId()
- *
- * Returns a xmlChar *
- */
- const xmlChar *
- getSystemId(void *ctx)
- {
- DEPRECATED("getSystemId")
- return (xmlSAX2GetSystemId(ctx));
- }
- /**
- * getLineNumber:
- * @ctx: the user data (XML parser context)
- *
- * Provide the line number of the current parsing point.
- * DEPRECATED: use xmlSAX2GetLineNumber()
- *
- * Returns an int
- */
- int
- getLineNumber(void *ctx)
- {
- DEPRECATED("getLineNumber")
- return (xmlSAX2GetLineNumber(ctx));
- }
- /**
- * getColumnNumber:
- * @ctx: the user data (XML parser context)
- *
- * Provide the column number of the current parsing point.
- * DEPRECATED: use xmlSAX2GetColumnNumber()
- *
- * Returns an int
- */
- int
- getColumnNumber(void *ctx)
- {
- DEPRECATED("getColumnNumber")
- return (xmlSAX2GetColumnNumber(ctx));
- }
- /**
- * isStandalone:
- * @ctx: the user data (XML parser context)
- *
- * Is this document tagged standalone ?
- * DEPRECATED: use xmlSAX2IsStandalone()
- *
- * Returns 1 if true
- */
- int
- isStandalone(void *ctx)
- {
- DEPRECATED("isStandalone")
- return (xmlSAX2IsStandalone(ctx));
- }
- /**
- * hasInternalSubset:
- * @ctx: the user data (XML parser context)
- *
- * Does this document has an internal subset
- * DEPRECATED: use xmlSAX2HasInternalSubset()
- *
- * Returns 1 if true
- */
- int
- hasInternalSubset(void *ctx)
- {
- DEPRECATED("hasInternalSubset")
- return (xmlSAX2HasInternalSubset(ctx));
- }
- /**
- * hasExternalSubset:
- * @ctx: the user data (XML parser context)
- *
- * Does this document has an external subset
- * DEPRECATED: use xmlSAX2HasExternalSubset()
- *
- * Returns 1 if true
- */
- int
- hasExternalSubset(void *ctx)
- {
- DEPRECATED("hasExternalSubset")
- return (xmlSAX2HasExternalSubset(ctx));
- }
- /**
- * internalSubset:
- * @ctx: the user data (XML parser context)
- * @name: the root element name
- * @ExternalID: the external ID
- * @SystemID: the SYSTEM ID (e.g. filename or URL)
- *
- * Callback on internal subset declaration.
- * DEPRECATED: use xmlSAX2InternalSubset()
- */
- void
- internalSubset(void *ctx, const xmlChar * name,
- const xmlChar * ExternalID, const xmlChar * SystemID)
- {
- DEPRECATED("internalSubset")
- xmlSAX2InternalSubset(ctx, name, ExternalID, SystemID);
- }
- /**
- * externalSubset:
- * @ctx: the user data (XML parser context)
- * @name: the root element name
- * @ExternalID: the external ID
- * @SystemID: the SYSTEM ID (e.g. filename or URL)
- *
- * Callback on external subset declaration.
- * DEPRECATED: use xmlSAX2ExternalSubset()
- */
- void
- externalSubset(void *ctx, const xmlChar * name,
- const xmlChar * ExternalID, const xmlChar * SystemID)
- {
- DEPRECATED("externalSubset")
- xmlSAX2ExternalSubset(ctx, name, ExternalID, SystemID);
- }
- /**
- * resolveEntity:
- * @ctx: the user data (XML parser context)
- * @publicId: The public ID of the entity
- * @systemId: The system ID of the entity
- *
- * The entity loader, to control the loading of external entities,
- * the application can either:
- * - override this resolveEntity() callback in the SAX block
- * - or better use the xmlSetExternalEntityLoader() function to
- * set up it's own entity resolution routine
- * DEPRECATED: use xmlSAX2ResolveEntity()
- *
- * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
- */
- xmlParserInputPtr
- resolveEntity(void *ctx, const xmlChar * publicId,
- const xmlChar * systemId)
- {
- DEPRECATED("resolveEntity")
- return (xmlSAX2ResolveEntity(ctx, publicId, systemId));
- }
- /**
- * getEntity:
- * @ctx: the user data (XML parser context)
- * @name: The entity name
- *
- * Get an entity by name
- * DEPRECATED: use xmlSAX2GetEntity()
- *
- * Returns the xmlEntityPtr if found.
- */
- xmlEntityPtr
- getEntity(void *ctx, const xmlChar * name)
- {
- DEPRECATED("getEntity")
- return (xmlSAX2GetEntity(ctx, name));
- }
- /**
- * getParameterEntity:
- * @ctx: the user data (XML parser context)
- * @name: The entity name
- *
- * Get a parameter entity by name
- * DEPRECATED: use xmlSAX2GetParameterEntity()
- *
- * Returns the xmlEntityPtr if found.
- */
- xmlEntityPtr
- getParameterEntity(void *ctx, const xmlChar * name)
- {
- DEPRECATED("getParameterEntity")
- return (xmlSAX2GetParameterEntity(ctx, name));
- }
- /**
- * entityDecl:
- * @ctx: the user data (XML parser context)
- * @name: the entity name
- * @type: the entity type
- * @publicId: The public ID of the entity
- * @systemId: The system ID of the entity
- * @content: the entity value (without processing).
- *
- * An entity definition has been parsed
- * DEPRECATED: use xmlSAX2EntityDecl()
- */
- void
- entityDecl(void *ctx, const xmlChar * name, int type,
- const xmlChar * publicId, const xmlChar * systemId,
- xmlChar * content)
- {
- DEPRECATED("entityDecl")
- xmlSAX2EntityDecl(ctx, name, type, publicId, systemId, content);
- }
- /**
- * attributeDecl:
- * @ctx: the user data (XML parser context)
- * @elem: the name of the element
- * @fullname: the attribute name
- * @type: the attribute type
- * @def: the type of default value
- * @defaultValue: the attribute default value
- * @tree: the tree of enumerated value set
- *
- * An attribute definition has been parsed
- * DEPRECATED: use xmlSAX2AttributeDecl()
- */
- void
- attributeDecl(void *ctx, const xmlChar * elem, const xmlChar * fullname,
- int type, int def, const xmlChar * defaultValue,
- xmlEnumerationPtr tree)
- {
- DEPRECATED("attributeDecl")
- xmlSAX2AttributeDecl(ctx, elem, fullname, type, def, defaultValue,
- tree);
- }
- /**
- * elementDecl:
- * @ctx: the user data (XML parser context)
- * @name: the element name
- * @type: the element type
- * @content: the element value tree
- *
- * An element definition has been parsed
- * DEPRECATED: use xmlSAX2ElementDecl()
- */
- void
- elementDecl(void *ctx, const xmlChar * name, int type,
- xmlElementContentPtr content)
- {
- DEPRECATED("elementDecl")
- xmlSAX2ElementDecl(ctx, name, type, content);
- }
- /**
- * notationDecl:
- * @ctx: the user data (XML parser context)
- * @name: The name of the notation
- * @publicId: The public ID of the entity
- * @systemId: The system ID of the entity
- *
- * What to do when a notation declaration has been parsed.
- * DEPRECATED: use xmlSAX2NotationDecl()
- */
- void
- notationDecl(void *ctx, const xmlChar * name,
- const xmlChar * publicId, const xmlChar * systemId)
- {
- DEPRECATED("notationDecl")
- xmlSAX2NotationDecl(ctx, name, publicId, systemId);
- }
- /**
- * unparsedEntityDecl:
- * @ctx: the user data (XML parser context)
- * @name: The name of the entity
- * @publicId: The public ID of the entity
- * @systemId: The system ID of the entity
- * @notationName: the name of the notation
- *
- * What to do when an unparsed entity declaration is parsed
- * DEPRECATED: use xmlSAX2UnparsedEntityDecl()
- */
- void
- unparsedEntityDecl(void *ctx, const xmlChar * name,
- const xmlChar * publicId, const xmlChar * systemId,
- const xmlChar * notationName)
- {
- DEPRECATED("unparsedEntityDecl")
- xmlSAX2UnparsedEntityDecl(ctx, name, publicId, systemId,
- notationName);
- }
- /**
- * setDocumentLocator:
- * @ctx: the user data (XML parser context)
- * @loc: A SAX Locator
- *
- * Receive the document locator at startup, actually xmlDefaultSAXLocator
- * Everything is available on the context, so this is useless in our case.
- * DEPRECATED
- */
- void
- setDocumentLocator(void *ctx ATTRIBUTE_UNUSED,
- xmlSAXLocatorPtr loc ATTRIBUTE_UNUSED)
- {
- DEPRECATED("setDocumentLocator")
- }
- /**
- * startDocument:
- * @ctx: the user data (XML parser context)
- *
- * called when the document start being processed.
- * DEPRECATED: use xmlSAX2StartDocument()
- */
- void
- startDocument(void *ctx)
- {
- /* don't be too painful for glade users */
- /* DEPRECATED("startDocument") */
- xmlSAX2StartDocument(ctx);
- }
- /**
- * endDocument:
- * @ctx: the user data (XML parser context)
- *
- * called when the document end has been detected.
- * DEPRECATED: use xmlSAX2EndDocument()
- */
- void
- endDocument(void *ctx)
- {
- DEPRECATED("endDocument")
- xmlSAX2EndDocument(ctx);
- }
- /**
- * attribute:
- * @ctx: the user data (XML parser context)
- * @fullname: The attribute name, including namespace prefix
- * @value: The attribute value
- *
- * Handle an attribute that has been read by the parser.
- * The default handling is to convert the attribute into an
- * DOM subtree and past it in a new xmlAttr element added to
- * the element.
- * DEPRECATED: use xmlSAX2Attribute()
- */
- void
- attribute(void *ctx ATTRIBUTE_UNUSED,
- const xmlChar * fullname ATTRIBUTE_UNUSED,
- const xmlChar * value ATTRIBUTE_UNUSED)
- {
- DEPRECATED("attribute")
- }
- /**
- * startElement:
- * @ctx: the user data (XML parser context)
- * @fullname: The element name, including namespace prefix
- * @atts: An array of name/value attributes pairs, NULL terminated
- *
- * called when an opening tag has been processed.
- * DEPRECATED: use xmlSAX2StartElement()
- */
- void
- startElement(void *ctx, const xmlChar * fullname, const xmlChar ** atts)
- {
- xmlSAX2StartElement(ctx, fullname, atts);
- }
- /**
- * endElement:
- * @ctx: the user data (XML parser context)
- * @name: The element name
- *
- * called when the end of an element has been detected.
- * DEPRECATED: use xmlSAX2EndElement()
- */
- void
- endElement(void *ctx, const xmlChar * name ATTRIBUTE_UNUSED)
- {
- DEPRECATED("endElement")
- xmlSAX2EndElement(ctx, name);
- }
- /**
- * reference:
- * @ctx: the user data (XML parser context)
- * @name: The entity name
- *
- * called when an entity reference is detected.
- * DEPRECATED: use xmlSAX2Reference()
- */
- void
- reference(void *ctx, const xmlChar * name)
- {
- DEPRECATED("reference")
- xmlSAX2Reference(ctx, name);
- }
- /**
- * characters:
- * @ctx: the user data (XML parser context)
- * @ch: a xmlChar string
- * @len: the number of xmlChar
- *
- * receiving some chars from the parser.
- * DEPRECATED: use xmlSAX2Characters()
- */
- void
- characters(void *ctx, const xmlChar * ch, int len)
- {
- DEPRECATED("characters")
- xmlSAX2Characters(ctx, ch, len);
- }
- /**
- * ignorableWhitespace:
- * @ctx: the user data (XML parser context)
- * @ch: a xmlChar string
- * @len: the number of xmlChar
- *
- * receiving some ignorable whitespaces from the parser.
- * UNUSED: by default the DOM building will use characters
- * DEPRECATED: use xmlSAX2IgnorableWhitespace()
- */
- void
- ignorableWhitespace(void *ctx ATTRIBUTE_UNUSED,
- const xmlChar * ch ATTRIBUTE_UNUSED,
- int len ATTRIBUTE_UNUSED)
- {
- DEPRECATED("ignorableWhitespace")
- }
- /**
- * processingInstruction:
- * @ctx: the user data (XML parser context)
- * @target: the target name
- * @data: the PI data's
- *
- * A processing instruction has been parsed.
- * DEPRECATED: use xmlSAX2ProcessingInstruction()
- */
- void
- processingInstruction(void *ctx, const xmlChar * target,
- const xmlChar * data)
- {
- DEPRECATED("processingInstruction")
- xmlSAX2ProcessingInstruction(ctx, target, data);
- }
- /**
- * globalNamespace:
- * @ctx: the user data (XML parser context)
- * @href: the namespace associated URN
- * @prefix: the namespace prefix
- *
- * An old global namespace has been parsed.
- * DEPRECATED
- */
- void
- globalNamespace(void *ctx ATTRIBUTE_UNUSED,
- const xmlChar * href ATTRIBUTE_UNUSED,
- const xmlChar * prefix ATTRIBUTE_UNUSED)
- {
- DEPRECATED("globalNamespace")
- }
- /**
- * setNamespace:
- * @ctx: the user data (XML parser context)
- * @name: the namespace prefix
- *
- * Set the current element namespace.
- * DEPRECATED
- */
- void
- setNamespace(void *ctx ATTRIBUTE_UNUSED,
- const xmlChar * name ATTRIBUTE_UNUSED)
- {
- DEPRECATED("setNamespace")
- }
- /**
- * getNamespace:
- * @ctx: the user data (XML parser context)
- *
- * Get the current element namespace.
- * DEPRECATED
- *
- * Returns the xmlNsPtr or NULL if none
- */
- xmlNsPtr
- getNamespace(void *ctx ATTRIBUTE_UNUSED)
- {
- DEPRECATED("getNamespace")
- return (NULL);
- }
- /**
- * checkNamespace:
- * @ctx: the user data (XML parser context)
- * @namespace: the namespace to check against
- *
- * Check that the current element namespace is the same as the
- * one read upon parsing.
- * DEPRECATED
- *
- * Returns 1 if true 0 otherwise
- */
- int
- checkNamespace(void *ctx ATTRIBUTE_UNUSED,
- xmlChar * namespace ATTRIBUTE_UNUSED)
- {
- DEPRECATED("checkNamespace")
- return (0);
- }
- /**
- * namespaceDecl:
- * @ctx: the user data (XML parser context)
- * @href: the namespace associated URN
- * @prefix: the namespace prefix
- *
- * A namespace has been parsed.
- * DEPRECATED
- */
- void
- namespaceDecl(void *ctx ATTRIBUTE_UNUSED,
- const xmlChar * href ATTRIBUTE_UNUSED,
- const xmlChar * prefix ATTRIBUTE_UNUSED)
- {
- DEPRECATED("namespaceDecl")
- }
- /**
- * comment:
- * @ctx: the user data (XML parser context)
- * @value: the comment content
- *
- * A comment has been parsed.
- * DEPRECATED: use xmlSAX2Comment()
- */
- void
- comment(void *ctx, const xmlChar * value)
- {
- DEPRECATED("comment")
- xmlSAX2Comment(ctx, value);
- }
- /**
- * cdataBlock:
- * @ctx: the user data (XML parser context)
- * @value: The pcdata content
- * @len: the block length
- *
- * called when a pcdata block has been parsed
- * DEPRECATED: use xmlSAX2CDataBlock()
- */
- void
- cdataBlock(void *ctx, const xmlChar * value, int len)
- {
- DEPRECATED("cdataBlock")
- xmlSAX2CDataBlock(ctx, value, len);
- }
- /*
- * nanoftp.h
- */
- #ifndef LIBXML_FTP_ENABLED
- #include <libxml/nanoftp.h>
- /** DOC_DISABLE */
- #ifdef _WIN32
- #include <winsock2.h>
- #else
- #define SOCKET int
- #endif
- typedef void
- (*ftpListCallback)(void *userData, const char *filename, const char *attrib,
- const char *owner, const char *group, unsigned long size,
- int links, int year, const char *month, int day, int hour,
- int minute);
- typedef void
- (*ftpDataCallback) (void *userData, const char *data, int len);
- XMLPUBFUN void
- xmlNanoFTPInit(void);
- void
- xmlNanoFTPInit(void) {
- }
- XMLPUBFUN void
- xmlNanoFTPCleanup(void);
- void
- xmlNanoFTPCleanup(void) {
- }
- XMLPUBFUN void
- xmlNanoFTPProxy(const char *host, int port, const char *user,
- const char *passwd, int type);
- void
- xmlNanoFTPProxy(const char *host ATTRIBUTE_UNUSED, int port ATTRIBUTE_UNUSED,
- const char *user ATTRIBUTE_UNUSED,
- const char *passwd ATTRIBUTE_UNUSED, int type ATTRIBUTE_UNUSED) {
- }
- XMLPUBFUN int
- xmlNanoFTPUpdateURL(void *ctx, const char *URL);
- int
- xmlNanoFTPUpdateURL(void *ctx ATTRIBUTE_UNUSED,
- const char *URL ATTRIBUTE_UNUSED) {
- return(-1);
- }
- XMLPUBFUN void
- xmlNanoFTPScanProxy(const char *URL);
- void
- xmlNanoFTPScanProxy(const char *URL ATTRIBUTE_UNUSED) {
- }
- XMLPUBFUN void *
- xmlNanoFTPNewCtxt(const char *URL);
- void*
- xmlNanoFTPNewCtxt(const char *URL ATTRIBUTE_UNUSED) {
- return(NULL);
- }
- XMLPUBFUN void
- xmlNanoFTPFreeCtxt(void *ctx);
- void
- xmlNanoFTPFreeCtxt(void * ctx ATTRIBUTE_UNUSED) {
- }
- XMLPUBFUN int
- xmlNanoFTPGetResponse(void *ctx);
- int
- xmlNanoFTPGetResponse(void *ctx ATTRIBUTE_UNUSED) {
- return(-1);
- }
- XMLPUBFUN int
- xmlNanoFTPCheckResponse(void *ctx);
- int
- xmlNanoFTPCheckResponse(void *ctx ATTRIBUTE_UNUSED) {
- return(-1);
- }
- XMLPUBFUN int
- xmlNanoFTPQuit(void *ctx);
- int
- xmlNanoFTPQuit(void *ctx ATTRIBUTE_UNUSED) {
- return(-1);
- }
- XMLPUBFUN int
- xmlNanoFTPConnect(void *ctx);
- int
- xmlNanoFTPConnect(void *ctx ATTRIBUTE_UNUSED) {
- return(-1);
- }
- XMLPUBFUN void *
- xmlNanoFTPConnectTo(const char *server, int port);
- void*
- xmlNanoFTPConnectTo(const char *server ATTRIBUTE_UNUSED,
- int port ATTRIBUTE_UNUSED) {
- return(NULL);
- }
- XMLPUBFUN int
- xmlNanoFTPCwd(void *ctx, const char *directory);
- int
- xmlNanoFTPCwd(void *ctx ATTRIBUTE_UNUSED,
- const char *directory ATTRIBUTE_UNUSED) {
- return(-1);
- }
- XMLPUBFUN int
- xmlNanoFTPDele(void *ctx, const char *file);
- int
- xmlNanoFTPDele(void *ctx ATTRIBUTE_UNUSED, const char *file ATTRIBUTE_UNUSED) {
- return(-1);
- }
- XMLPUBFUN SOCKET
- xmlNanoFTPGetConnection(void *ctx);
- SOCKET
- xmlNanoFTPGetConnection(void *ctx ATTRIBUTE_UNUSED) {
- return(-1);
- }
- XMLPUBFUN int
- xmlNanoFTPCloseConnection(void *ctx);
- int
- xmlNanoFTPCloseConnection(void *ctx ATTRIBUTE_UNUSED) {
- return(-1);
- }
- XMLPUBFUN int
- xmlNanoFTPList(void *ctx, ftpListCallback callback, void *userData,
- const char *filename);
- int
- xmlNanoFTPList(void *ctx ATTRIBUTE_UNUSED,
- ftpListCallback callback ATTRIBUTE_UNUSED,
- void *userData ATTRIBUTE_UNUSED,
- const char *filename ATTRIBUTE_UNUSED) {
- return(-1);
- }
- XMLPUBFUN SOCKET
- xmlNanoFTPGetSocket(void *ctx, const char *filename);
- SOCKET
- xmlNanoFTPGetSocket(void *ctx ATTRIBUTE_UNUSED,
- const char *filename ATTRIBUTE_UNUSED) {
- return(-1);
- }
- XMLPUBFUN int
- xmlNanoFTPGet(void *ctx, ftpDataCallback callback, void *userData,
- const char *filename);
- int
- xmlNanoFTPGet(void *ctx ATTRIBUTE_UNUSED,
- ftpDataCallback callback ATTRIBUTE_UNUSED,
- void *userData ATTRIBUTE_UNUSED,
- const char *filename ATTRIBUTE_UNUSED) {
- return(-1);
- }
- XMLPUBFUN int
- xmlNanoFTPRead(void *ctx, void *dest, int len);
- int
- xmlNanoFTPRead(void *ctx ATTRIBUTE_UNUSED, void *dest ATTRIBUTE_UNUSED,
- int len ATTRIBUTE_UNUSED) {
- return(-1);
- }
- XMLPUBFUN void *
- xmlNanoFTPOpen(const char *URL);
- void*
- xmlNanoFTPOpen(const char *URL ATTRIBUTE_UNUSED) {
- return(NULL);
- }
- XMLPUBFUN int
- xmlNanoFTPClose(void *ctx);
- int
- xmlNanoFTPClose(void *ctx ATTRIBUTE_UNUSED) {
- return(-1);
- }
- XMLPUBFUN int
- xmlIOFTPMatch(const char *filename);
- int
- xmlIOFTPMatch(const char *filename ATTRIBUTE_UNUSED) {
- return(0);
- }
- XMLPUBFUN void *
- xmlIOFTPOpen(const char *filename);
- void *
- xmlIOFTPOpen(const char *filename ATTRIBUTE_UNUSED) {
- return(NULL);
- }
- XMLPUBFUN int
- xmlIOFTPRead(void *context, char *buffer, int len);
- int
- xmlIOFTPRead(void *context ATTRIBUTE_UNUSED, char *buffer ATTRIBUTE_UNUSED,
- int len ATTRIBUTE_UNUSED) {
- return(-1);
- }
- XMLPUBFUN int
- xmlIOFTPClose(void *context);
- int
- xmlIOFTPClose(void *context ATTRIBUTE_UNUSED) {
- return(-1);
- }
- /** DOC_ENABLE */
- #endif /* #ifndef LIBXML_FTP_ENABLED */
- /*
- * xpointer.h
- */
- #ifndef LIBXML_XPTR_LOCS_ENABLED
- #include <libxml/xpath.h>
- #include <libxml/xpathInternals.h>
- #include <libxml/xpointer.h>
- /** DOC_DISABLE */
- typedef struct _xmlLocationSet *xmlLocationSetPtr;
- XMLPUBFUN xmlXPathObjectPtr
- xmlXPtrNewRange(xmlNodePtr start, int startindex,
- xmlNodePtr end, int endindex);
- xmlXPathObjectPtr
- xmlXPtrNewRange(xmlNodePtr start ATTRIBUTE_UNUSED,
- int startindex ATTRIBUTE_UNUSED,
- xmlNodePtr end ATTRIBUTE_UNUSED,
- int endindex ATTRIBUTE_UNUSED) {
- return(NULL);
- }
- XMLPUBFUN xmlXPathObjectPtr
- xmlXPtrNewRangePoints(xmlXPathObjectPtr start, xmlXPathObjectPtr end);
- xmlXPathObjectPtr
- xmlXPtrNewRangePoints(xmlXPathObjectPtr start ATTRIBUTE_UNUSED,
- xmlXPathObjectPtr end ATTRIBUTE_UNUSED) {
- return(NULL);
- }
- XMLPUBFUN xmlXPathObjectPtr
- xmlXPtrNewRangePointNode(xmlXPathObjectPtr start, xmlNodePtr end);
- xmlXPathObjectPtr
- xmlXPtrNewRangePointNode(xmlXPathObjectPtr start ATTRIBUTE_UNUSED,
- xmlNodePtr end ATTRIBUTE_UNUSED) {
- return(NULL);
- }
- XMLPUBFUN xmlXPathObjectPtr
- xmlXPtrNewRangeNodePoint(xmlNodePtr start, xmlXPathObjectPtr end);
- xmlXPathObjectPtr
- xmlXPtrNewRangeNodePoint(xmlNodePtr start ATTRIBUTE_UNUSED,
- xmlXPathObjectPtr end ATTRIBUTE_UNUSED) {
- return(NULL);
- }
- XMLPUBFUN xmlXPathObjectPtr
- xmlXPtrNewRangeNodes(xmlNodePtr start, xmlNodePtr end);
- xmlXPathObjectPtr
- xmlXPtrNewRangeNodes(xmlNodePtr start ATTRIBUTE_UNUSED,
- xmlNodePtr end ATTRIBUTE_UNUSED) {
- return(NULL);
- }
- XMLPUBFUN xmlXPathObjectPtr
- xmlXPtrNewCollapsedRange(xmlNodePtr start);
- xmlXPathObjectPtr
- xmlXPtrNewCollapsedRange(xmlNodePtr start ATTRIBUTE_UNUSED) {
- return(NULL);
- }
- XMLPUBFUN xmlXPathObjectPtr
- xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end);
- xmlXPathObjectPtr
- xmlXPtrNewRangeNodeObject(xmlNodePtr start ATTRIBUTE_UNUSED,
- xmlXPathObjectPtr end ATTRIBUTE_UNUSED) {
- return(NULL);
- }
- XMLPUBFUN xmlLocationSetPtr
- xmlXPtrLocationSetCreate(xmlXPathObjectPtr val);
- xmlLocationSetPtr
- xmlXPtrLocationSetCreate(xmlXPathObjectPtr val ATTRIBUTE_UNUSED) {
- return(NULL);
- }
- XMLPUBFUN void
- xmlXPtrLocationSetAdd(xmlLocationSetPtr cur, xmlXPathObjectPtr val);
- void
- xmlXPtrLocationSetAdd(xmlLocationSetPtr cur ATTRIBUTE_UNUSED,
- xmlXPathObjectPtr val ATTRIBUTE_UNUSED) {
- }
- XMLPUBFUN xmlLocationSetPtr
- xmlXPtrLocationSetMerge(xmlLocationSetPtr val1, xmlLocationSetPtr val2);
- xmlLocationSetPtr
- xmlXPtrLocationSetMerge(xmlLocationSetPtr val1 ATTRIBUTE_UNUSED,
- xmlLocationSetPtr val2 ATTRIBUTE_UNUSED) {
- return(NULL);
- }
- XMLPUBFUN void
- xmlXPtrLocationSetDel(xmlLocationSetPtr cur, xmlXPathObjectPtr val);
- void
- xmlXPtrLocationSetDel(xmlLocationSetPtr cur ATTRIBUTE_UNUSED,
- xmlXPathObjectPtr val ATTRIBUTE_UNUSED) {
- }
- XMLPUBFUN void
- xmlXPtrLocationSetRemove(xmlLocationSetPtr cur, int val);
- void
- xmlXPtrLocationSetRemove(xmlLocationSetPtr cur ATTRIBUTE_UNUSED,
- int val ATTRIBUTE_UNUSED) {
- }
- XMLPUBFUN void
- xmlXPtrFreeLocationSet(xmlLocationSetPtr obj);
- void
- xmlXPtrFreeLocationSet(xmlLocationSetPtr obj ATTRIBUTE_UNUSED) {
- }
- XMLPUBFUN xmlXPathObjectPtr
- xmlXPtrNewLocationSetNodes(xmlNodePtr start, xmlNodePtr end);
- xmlXPathObjectPtr
- xmlXPtrNewLocationSetNodes(xmlNodePtr start ATTRIBUTE_UNUSED,
- xmlNodePtr end ATTRIBUTE_UNUSED) {
- return(NULL);
- }
- XMLPUBFUN xmlXPathObjectPtr
- xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set);
- xmlXPathObjectPtr
- xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set ATTRIBUTE_UNUSED) {
- return(NULL);
- }
- XMLPUBFUN xmlXPathObjectPtr
- xmlXPtrWrapLocationSet(xmlLocationSetPtr val);
- xmlXPathObjectPtr
- xmlXPtrWrapLocationSet(xmlLocationSetPtr val ATTRIBUTE_UNUSED) {
- return(NULL);
- }
- XMLPUBFUN xmlNodePtr
- xmlXPtrBuildNodeList(xmlXPathObjectPtr obj);
- xmlNodePtr
- xmlXPtrBuildNodeList(xmlXPathObjectPtr obj ATTRIBUTE_UNUSED) {
- return(NULL);
- }
- XMLPUBFUN void
- xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt, int nargs);
- void
- xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt,
- int nargs ATTRIBUTE_UNUSED) {
- XP_ERROR(XPATH_EXPR_ERROR);
- }
- /** DOC_ENABLE */
- #endif /* #ifndef LIBXML_XPTR_LOCS_ENABLED */
- #endif /* LIBXML_LEGACY_ENABLED */
|