diff --git a/ChangeLog b/ChangeLog index 633429f6..71c53a13 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Dec 31 17:13:34 CET 2001 Daniel Veillard + + * *.c include/libxml/*.h doc/html/*: applied 42 documentation + patches from Charlie Bozeman. Regenerated the HTML docs. + Thu Dec 20 14:59:52 CET 2001 Daniel Veillard * include/libxml/debugXML.h win32/dsp/libxml2.def.src: fixes diff --git a/DOCBparser.c b/DOCBparser.c index 80014385..bcfeb3d5 100644 --- a/DOCBparser.c +++ b/DOCBparser.c @@ -232,7 +232,7 @@ PUSH_AND_POP(static, xmlChar*, name) * @ctxt: the DocBook SGML parser context * @len: pointer to the length of the char read * - * The current char value, if using UTF-8 this may actaully span multiple + * The current char value, if using UTF-8 this may actually span multiple * bytes in the input buffer. Implement the end of line normalization: * 2.11 End-of-Line Handling * If the encoding is unspecified, in the case we find an ISO-Latin-1 @@ -321,7 +321,7 @@ docbCurrentChar(xmlParserCtxtPtr ctxt, int *len) { } /* * Assume it's a fixed length encoding (1) with - * a compatibke encoding for the ASCII set, since + * a compatible encoding for the ASCII set, since * XML constructs only use < 128 chars */ *len = 1; @@ -835,7 +835,7 @@ NULL #endif /* - * acording the SGML DTD, HR should be added to the 2nd line above, as it + * according the SGML DTD, HR should be added to the 2nd line above, as it * is not allowed within a H1, H2, H3, etc. But we should tolerate that case * because many documents contain rules in headings... */ @@ -851,7 +851,7 @@ NULL * The list of SGML elements which are supposed not to have * CDATA content and where a p element will be implied * - * TODO: extend that list by reading the SGML SGML DtD on + * TODO: extend that list by reading the SGML SGML DTD on * implied paragraph */ static char *docbNoContentElements[] = { @@ -914,7 +914,8 @@ docbTagLookup(const xmlChar *tag) { * @newtag: The new tag name * @oldtag: The old tag name * - * Checks wether the new tag is one of the registered valid tags for closing old. + * Checks whether the new tag is one of the registered valid tags for + * closing old. * Initialize the docbStartCloseIndex for fast lookup of closing tags names. * * Returns 0 if no, 1 if yes. @@ -949,7 +950,7 @@ docbCheckAutoClose(const xmlChar *newtag, const xmlChar *oldtag) { * @ctxt: an SGML parser context * @newtag: The new tag name * - * The HTmL DtD allows an ending tag to implicitely close other tags. + * The DocBook DTD allows an ending tag to implicitly close other tags. */ static void docbAutoCloseOnClose(docbParserCtxtPtr ctxt, const xmlChar *newtag) { @@ -1001,7 +1002,7 @@ docbAutoCloseOnClose(docbParserCtxtPtr ctxt, const xmlChar *newtag) { * @ctxt: an SGML parser context * @newtag: The new tag name or NULL * - * The HTmL DtD allows a tag to implicitely close other tags. + * The DocBook DTD allows a tag to implicitly close other tags. * The list is kept in docbStartClose array. This function is * called when a new tag has been detected and generates the * appropriates closes if possible/needed. @@ -1034,7 +1035,7 @@ docbAutoClose(docbParserCtxtPtr ctxt, const xmlChar *newtag) { * @name: The tag name * @elem: the SGML element * - * The HTmL DtD allows a tag to implicitely close other tags. + * The DocBook DTD allows a tag to implicitly close other tags. * The list is kept in docbStartClose array. This function checks * if the element or one of it's children would autoclose the * given tag. @@ -2211,7 +2212,7 @@ docbEntityValueLookup(int value) { * * Returns 0 if success, -2 if the transcoding fails, or -1 otherwise * The value of @inlen after return is the number of octets consumed - * as the return value is positive, else unpredictiable. + * as the return value is positive, else unpredictable. * The value of @outlen after return is the number of octets consumed. */ int @@ -2313,7 +2314,7 @@ UTF8ToSgml(unsigned char* out, int *outlen, * * Returns 0 if success, -2 if the transcoding fails, or -1 otherwise * The value of @inlen after return is the number of octets consumed - * as the return value is positive, else unpredictiable. + * as the return value is positive, else unpredictable. * The value of @outlen after return is the number of octets consumed. */ int @@ -2689,7 +2690,7 @@ docbParseSGMLName(docbParserCtxtPtr ctxt) { * docbParseName: * @ctxt: an SGML parser context * - * parse an SGML name, this routine is case sensistive. + * parse an SGML name, this routine is case sensitive. * * Returns the Name parsed or NULL */ @@ -4328,7 +4329,7 @@ docbParseElement(docbParserCtxtPtr ctxt) { } /* - * Check for an Empty Element labelled the XML/SGML way + * Check for an Empty Element labeled the XML/SGML way */ if ((CUR == '/') && (NXT(1) == '>')) { SKIP(2); @@ -4765,7 +4766,7 @@ docbParseMarkupDecl(xmlParserCtxtPtr ctxt) { } /** - * docbParseInternalsubset: + * docbParseInternalSubset: * @ctxt: an SGML parser context * * parse the internal subset declaration @@ -4833,7 +4834,7 @@ docbParseInternalSubset(xmlParserCtxtPtr ctxt) { * docbParseMisc: * @ctxt: an XML parser context * - * parse an XML Misc* optionnal field. + * parse an XML Misc* optional field. * * [27] Misc ::= Comment | PI | S */ @@ -5525,7 +5526,7 @@ docbParseTryOrFinish(docbParserCtxtPtr ctxt, int terminate) { } /* - * Check for an Empty Element labelled the XML/SGML way + * Check for an Empty Element labeled the XML/SGML way */ if ((CUR == '/') && (NXT(1) == '>')) { SKIP(2); diff --git a/HTMLparser.c b/HTMLparser.c index 8ff74e47..014acc97 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -180,7 +180,7 @@ PUSH_AND_POP(static, xmlChar*, name) * @ctxt: the HTML parser context * @len: pointer to the length of the char read * - * The current char value, if using UTF-8 this may actaully span multiple + * The current char value, if using UTF-8 this may actually span multiple * bytes in the input buffer. Implement the end of line normalization: * 2.11 End-of-Line Handling * If the encoding is unspecified, in the case we find an ISO-Latin-1 @@ -269,7 +269,7 @@ htmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) { } /* * Assume it's a fixed length encoding (1) with - * a compatibke encoding for the ASCII set, since + * a compatible encoding for the ASCII set, since * XML constructs only use < 128 chars */ *len = 1; @@ -348,7 +348,7 @@ htmlSkipBlankChars(xmlParserCtxtPtr ctxt) { * Start Tag: 1 means the start tag can be ommited * End Tag: 1 means the end tag can be ommited * 2 means it's forbidden (empty elements) - * 3 means the tag is stylistic and should be closed easilly + * 3 means the tag is stylistic and should be closed easily * Depr: this element is deprecated * DTD: 1 means that this element is valid only in the Loose DTD * 2 means that this element is valid only in the Frameset DTD @@ -514,7 +514,7 @@ NULL * The list of HTML elements which are supposed not to have * CDATA content and where a p element will be implied * - * TODO: extend that list by reading the HTML SGML DtD on + * TODO: extend that list by reading the HTML SGML DTD on * implied paragraph */ static const char *htmlNoContentElements[] = { @@ -652,7 +652,8 @@ htmlGetEndPriority (const xmlChar *name) { * @newtag: The new tag name * @oldtag: The old tag name * - * Checks wether the new tag is one of the registered valid tags for closing old. + * Checks whether the new tag is one of the registered valid tags for + * closing old. * Initialize the htmlStartCloseIndex for fast lookup of closing tags names. * * Returns 0 if no, 1 if yes. @@ -688,7 +689,7 @@ htmlCheckAutoClose(const xmlChar *newtag, const xmlChar *oldtag) { * @newtag: The new tag name * @force: force the tag closure * - * The HTmL DtD allows an ending tag to implicitely close other tags. + * The HTML DTD allows an ending tag to implicitly close other tags. */ static void htmlAutoCloseOnClose(htmlParserCtxtPtr ctxt, const xmlChar *newtag) { @@ -708,7 +709,7 @@ htmlAutoCloseOnClose(htmlParserCtxtPtr ctxt, const xmlChar *newtag) { if (xmlStrEqual(newtag, ctxt->nameTab[i])) break; /* - * A missplaced endtagad can only close elements with lower + * A missplaced endtag can only close elements with lower * or equal priority, so if we find an element with higher * priority before we find an element with * matching name, we just ignore this endtag @@ -784,7 +785,7 @@ htmlAutoCloseOnEnd(htmlParserCtxtPtr ctxt) { * @ctxt: an HTML parser context * @newtag: The new tag name or NULL * - * The HTmL DtD allows a tag to implicitely close other tags. + * The HTML DTD allows a tag to implicitly close other tags. * The list is kept in htmlStartClose array. This function is * called when a new tag has been detected and generates the * appropriates closes if possible/needed. @@ -839,7 +840,7 @@ htmlAutoClose(htmlParserCtxtPtr ctxt, const xmlChar *newtag) { * @name: The tag name * @elem: the HTML element * - * The HTmL DtD allows a tag to implicitely close other tags. + * The HTML DTD allows a tag to implicitly close other tags. * The list is kept in htmlStartClose array. This function checks * if the element or one of it's children would autoclose the * given tag. @@ -866,7 +867,7 @@ htmlAutoCloseTag(htmlDocPtr doc, const xmlChar *name, htmlNodePtr elem) { * @doc: the HTML document * @elem: the HTML element * - * The HTmL DtD allows a tag to implicitely close other tags. + * The HTML DTD allows a tag to implicitly close other tags. * The list is kept in htmlStartClose array. This function checks * if a tag is autoclosed by one of it's child * @@ -890,7 +891,7 @@ htmlIsAutoClosed(htmlDocPtr doc, htmlNodePtr elem) { * @ctxt: an HTML parser context * @newtag: The new tag name * - * The HTML DtD allows a tag to exists only implicitely + * The HTML DTD allows a tag to exists only implicitly * called when a new tag has been detected and generates the * appropriates implicit tags if missing */ @@ -1268,7 +1269,7 @@ static const htmlEntityDesc html40EntitiesTable[] = { { 8713, "notin","not an element of, U+2209 ISOtech" }, { 8715, "ni", "contains as member, U+220B ISOtech" }, { 8719, "prod", "n-ary product = product sign, U+220F ISOamsb" }, -{ 8721, "sum", "n-ary sumation, U+2211 ISOamsb" }, +{ 8721, "sum", "n-ary summation, U+2211 ISOamsb" }, { 8722, "minus","minus sign, U+2212 ISOtech" }, { 8727, "lowast","asterisk operator, U+2217 ISOtech" }, { 8730, "radic","square root = radical sign, U+221A ISOtech" }, @@ -1407,7 +1408,7 @@ htmlEntityValueLookup(unsigned int value) { * * Returns 0 if success, -2 if the transcoding fails, or -1 otherwise * The value of @inlen after return is the number of octets consumed - * as the return value is positive, else unpredictiable. + * as the return value is positive, else unpredictable. * The value of @outlen after return is the number of octets consumed. */ int @@ -1508,7 +1509,7 @@ UTF8ToHtml(unsigned char* out, int *outlen, * * Returns 0 if success, -2 if the transcoding fails, or -1 otherwise * The value of @inlen after return is the number of octets consumed - * as the return value is positive, else unpredictiable. + * as the return value is positive, else unpredictable. * The value of @outlen after return is the number of octets consumed. */ int @@ -1598,7 +1599,7 @@ htmlEncodeEntities(unsigned char* out, int *outlen, * @end2: an end marker xmlChar, 0 if none * @end3: an end marker xmlChar, 0 if none * - * Subtitute the HTML entities by their value + * Substitute the HTML entities by their value * * DEPRECATED !!!! * @@ -1791,7 +1792,7 @@ static int areBlanks(htmlParserCtxtPtr ctxt, const xmlChar *str, int len) { * Creates a new HTML document without a DTD node if @URI and @ExternalID * are NULL * - * Returns a new document, do not intialize the DTD if not provided + * Returns a new document, do not initialize the DTD if not provided */ htmlDocPtr htmlNewDocNoDtD(const xmlChar *URI, const xmlChar *ExternalID) { @@ -1803,7 +1804,7 @@ htmlNewDocNoDtD(const xmlChar *URI, const xmlChar *ExternalID) { cur = (xmlDocPtr) xmlMalloc(sizeof(xmlDoc)); if (cur == NULL) { xmlGenericError(xmlGenericErrorContext, - "xmlNewDoc : malloc failed\n"); + "htmlNewDocNoDtD : malloc failed\n"); return(NULL); } memset(cur, 0, sizeof(xmlDoc)); @@ -1899,7 +1900,7 @@ htmlParseHTMLName(htmlParserCtxtPtr ctxt) { * htmlParseName: * @ctxt: an HTML parser context * - * parse an HTML name, this routine is case sensistive. + * parse an HTML name, this routine is case sensitive. * * Returns the Name parsed or NULL */ @@ -3470,7 +3471,7 @@ htmlParseElement(htmlParserCtxtPtr ctxt) { } /* - * Check for an Empty Element labelled the XML/SGML way + * Check for an Empty Element labeled the XML/SGML way */ if ((CUR == '/') && (NXT(1) == '>')) { SKIP(2); @@ -4275,7 +4276,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { } /* - * Check for an Empty Element labelled the XML/SGML way + * Check for an Empty Element labeled the XML/SGML way */ if ((CUR == '/') && (NXT(1) == '>')) { SKIP(2); diff --git a/HTMLtree.c b/HTMLtree.c index c122ff24..9c2e3939 100644 --- a/HTMLtree.c +++ b/HTMLtree.c @@ -1,5 +1,5 @@ /* - * HTMLtree.c : implemetation of access function for an HTML tree. + * HTMLtree.c : implementation of access function for an HTML tree. * * See Copyright for the status of this software. * @@ -223,7 +223,7 @@ found_head: found_meta: if (encoding != NULL) { /* - * Create a new Meta element with the right aatributes + * Create a new Meta element with the right attributes */ meta = xmlNewDocNode(doc, NULL, BAD_CAST"meta", NULL); @@ -435,7 +435,7 @@ htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, if (cur == NULL) { xmlGenericError(xmlGenericErrorContext, - "htmlNodeDump : node == NULL\n"); + "htmlNodeDumpFormat : node == NULL\n"); return; } /* @@ -517,7 +517,7 @@ htmlNodeDumpFormat(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, } /* - * Get specific HTML info for taht node. + * Get specific HTML info for that node. */ info = htmlTagLookup(cur->name); @@ -693,7 +693,7 @@ htmlDocContentDump(xmlBufferPtr buf, xmlDocPtr cur, int format) { if (cur->intSubset != NULL) htmlDtdDump(buf, cur); else { - /* Default to HTML-4.0 transitionnal @@@@ */ + /* Default to HTML-4.0 transitional @@@@ */ xmlBufferWriteChar(buf, ""); } @@ -808,7 +808,7 @@ htmlDtdDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, if (cur == NULL) { xmlGenericError(xmlGenericErrorContext, - "htmlDtdDump : no internal subset\n"); + "htmlDtdDumpOutput : no internal subset\n"); return; } xmlOutputBufferWriteString(buf, "name); diff --git a/SAX.c b/SAX.c index e854748e..ab02454a 100644 --- a/SAX.c +++ b/SAX.c @@ -1052,7 +1052,7 @@ startElement(void *ctx, const xmlChar *fullname, const xmlChar **atts) while (attr != NULL) { if (attr->defaultValue != NULL) { /* - * the element should be instanciated in the tree if: + * the element should be instantiated in the tree if: * - this is a namespace prefix * - the user required for completion in the tree * like XSLT @@ -1163,7 +1163,7 @@ startElement(void *ctx, const xmlChar *fullname, const xmlChar **atts) } /* - * If it's the Document root, finish the Dtd validation and + * If it's the Document root, finish the DTD validation and * check the document root element for validity */ if ((ctxt->validate) && (ctxt->vctxt.finishDtd == 0)) { @@ -1662,8 +1662,10 @@ cdataBlock(void *ctx, const xmlChar *value, int len) /** * xmlDefaultSAXHandlerInit: + * @hdlr: the SAX handler + * @warning: flag if non-zero sets the handler warning procedure * - * Initialize the default SAX handler + * Initialize the default XML SAX handler */ void initxmlDefaultSAXHandler(xmlSAXHandler *hdlr, int warning) @@ -1720,9 +1722,11 @@ xmlDefaultSAXHandlerInit(void) #ifdef LIBXML_HTML_ENABLED /** - * htmlDefaultSAXHandlerInit: + * inithtmlDefaultSAXHandlerInit: + * @hdlr: the SAX handler + * @warning: flag if non-zero sets the handler warning procedure * - * Initialize the default SAX handler + * Initialize the default HTML SAX handler */ void inithtmlDefaultSAXHandler(xmlSAXHandler *hdlr) @@ -1776,6 +1780,13 @@ htmlDefaultSAXHandlerInit(void) #ifdef LIBXML_DOCB_ENABLED +/** + * initdocbDefaultSAXHandlerInit: + * @hdlr: the SAX handler + * @warning: flag if non-zero sets the handler warning procedure + * + * Initialize the default DocBook SAX handler + */ void initdocbDefaultSAXHandler(xmlSAXHandler *hdlr) { diff --git a/catalog.c b/catalog.c index 293b1b3b..29c473e5 100644 --- a/catalog.c +++ b/catalog.c @@ -241,7 +241,7 @@ xmlFreeCatalogEntry(xmlCatalogEntryPtr ret) { if (ret == NULL) return; /* - * Entries stored in the file hash must be dealloacted + * Entries stored in the file hash must be deallocated * only by the file hash cleaner ! */ if (ret->dealloc == 1) @@ -681,7 +681,7 @@ xmlConvertSGMLCatalog(xmlCatalogPtr catal) { /** * xmlCatalogUnWrapURN: - * @urn: an "urn:publicid:" to unwrapp + * @urn: an "urn:publicid:" to unwrap * * Expand the URN into the equivalent Public Identifier * @@ -1252,7 +1252,7 @@ xmlFetchXMLCatalogFile(xmlCatalogEntryPtr catal) { /* * Fetch and parse. Note that xmlParseXMLCatalogFile does not - * use the existing catalog, there is no recusivity allowed at + * use the existing catalog, there is no recursion allowed at * that level. */ doc = xmlParseXMLCatalogFile(catal->prefer, catal->URL); @@ -2613,7 +2613,7 @@ xmlACatalogResolve(xmlCatalogPtr catal, const xmlChar * pubID, /** * xmlACatalogResolveURI: * @catal: a Catalog - * @pubId: the URI + * @URI: the URI * * Do a complete resolution lookup of an URI * @@ -3019,7 +3019,7 @@ xmlCatalogResolve(const xmlChar *pubID, const xmlChar *sysID) { /** * xmlCatalogResolveURI: - * @pubId: the URI + * @URI: the URI * * Do a complete resolution lookup of an URI * @@ -3062,7 +3062,7 @@ xmlCatalogDump(FILE *out) { * * Add an entry in the catalog, it may overwrite existing but * different entries. - * If called before any other catalo routine, allows to override the + * If called before any other catalog routine, allows to override the * default shared catalog put in place by xmlInitializeCatalog(); * * Returns 0 if successful, -1 otherwise @@ -3157,6 +3157,7 @@ xmlCatalogGetDefaults(void) { /** * xmlCatalogSetDefaults: + * @allow: what catalogs should be accepted * * Used to set the user preference w.r.t. to what catalogs should * be accepted @@ -3350,7 +3351,7 @@ xmlCatalogLocalResolve(void *catalogs, const xmlChar *pubID, /** * xmlCatalogLocalResolveURI: * @catalogs: a document's list of catalogs - * @pubId: the URI + * @URI: the URI * * Do a complete resolution lookup of an URI using a * document's private catalog list @@ -3389,7 +3390,7 @@ xmlCatalogLocalResolveURI(void *catalogs, const xmlChar *URI) { ************************************************************************/ /** * xmlCatalogGetSystem: - * @pubId: the public ID string + * @sysId: the system ID string * * Try to lookup the system ID associated to a public ID * DEPRECATED, use xmlCatalogResolveSystem() diff --git a/configure.in b/configure.in index 819f83e5..438783c7 100644 --- a/configure.in +++ b/configure.in @@ -256,7 +256,7 @@ if test "$with_threads" = "yes" ; then echo Enabling multithreaded support AC_CHECK_HEADER(pthread.h, - AC_CHECK_LIB(pthread, pthread_mutex_lock,[ + AC_CHECK_LIB(pthread, pthread_join,[ THREAD_LIBS="-lpthread" AC_DEFINE(HAVE_LIBPTHREAD) AC_DEFINE(HAVE_PTHREAD_H) diff --git a/debugXML.c b/debugXML.c index 182954f8..e3b5c3da 100644 --- a/debugXML.c +++ b/debugXML.c @@ -84,24 +84,24 @@ xmlDebugDumpDtdNode(FILE *output, xmlDtdPtr dtd, int depth) { * Do a bit of checking */ if (dtd->parent == NULL) - fprintf(output, "PBM: Dtd has no parent\n"); + fprintf(output, "PBM: DTD has no parent\n"); if (dtd->doc == NULL) - fprintf(output, "PBM: Dtd has no doc\n"); + fprintf(output, "PBM: DTD has no doc\n"); if ((dtd->parent != NULL) && (dtd->doc != dtd->parent->doc)) - fprintf(output, "PBM: Dtd doc differs from parent's one\n"); + fprintf(output, "PBM: DTD doc differs from parent's one\n"); if (dtd->prev == NULL) { if ((dtd->parent != NULL) && (dtd->parent->children != (xmlNodePtr)dtd)) - fprintf(output, "PBM: Dtd has no prev and not first of list\n"); + fprintf(output, "PBM: DTD has no prev and not first of list\n"); } else { if (dtd->prev->next != (xmlNodePtr) dtd) - fprintf(output, "PBM: Dtd prev->next : back link wrong\n"); + fprintf(output, "PBM: DTD prev->next : back link wrong\n"); } if (dtd->next == NULL) { if ((dtd->parent != NULL) && (dtd->parent->last != (xmlNodePtr) dtd)) - fprintf(output, "PBM: Dtd has no next and not last of list\n"); + fprintf(output, "PBM: DTD has no next and not last of list\n"); } else { if (dtd->next->prev != (xmlNodePtr) dtd) - fprintf(output, "PBM: Dtd next->prev : forward link wrong\n"); + fprintf(output, "PBM: DTD next->prev : forward link wrong\n"); } } @@ -864,23 +864,23 @@ xmlDebugDumpDTD(FILE * output, xmlDtdPtr dtd) * Do a bit of checking */ if ((dtd->parent != NULL) && (dtd->doc != dtd->parent->doc)) - fprintf(output, "PBM: Dtd doc differs from parent's one\n"); + fprintf(output, "PBM: DTD doc differs from parent's one\n"); if (dtd->prev == NULL) { if ((dtd->parent != NULL) && (dtd->parent->children != (xmlNodePtr) dtd)) fprintf(output, - "PBM: Dtd has no prev and not first of list\n"); + "PBM: DTD has no prev and not first of list\n"); } else { if (dtd->prev->next != (xmlNodePtr) dtd) - fprintf(output, "PBM: Dtd prev->next : back link wrong\n"); + fprintf(output, "PBM: DTD prev->next : back link wrong\n"); } if (dtd->next == NULL) { if ((dtd->parent != NULL) && (dtd->parent->last != (xmlNodePtr) dtd)) - fprintf(output, "PBM: Dtd has no next and not last of list\n"); + fprintf(output, "PBM: DTD has no next and not last of list\n"); } else { if (dtd->next->prev != (xmlNodePtr) dtd) - fprintf(output, "PBM: Dtd next->prev : forward link wrong\n"); + fprintf(output, "PBM: DTD next->prev : forward link wrong\n"); } if (dtd->children == NULL) fprintf(output, " DTD is empty\n"); @@ -1003,7 +1003,16 @@ xmlDebugDumpEntities(FILE * output, xmlDocPtr doc) fprintf(output, "No entities in external subset\n"); } -int xmlLsCountNode(xmlNodePtr node) { +/** + * xmlLsCountNode: + * @node: the node to count + * + * Count the children of @node. + * + * Returns the number of children of @node. + */ +int +xmlLsCountNode(xmlNodePtr node) { int ret = 0; xmlNodePtr list = NULL; @@ -1053,6 +1062,13 @@ int xmlLsCountNode(xmlNodePtr node) { return(ret); } +/** + * xmlLsOneNode: + * @output: the FILE * for the output + * @node: the node to dump + * + * Dump to @output the type and name of @node. + */ void xmlLsOneNode(FILE *output, xmlNodePtr node) { switch (node->type) { @@ -1162,10 +1178,12 @@ xmlLsOneNode(FILE *output, xmlNodePtr node) { /** * xmlBoolToText: - * @boolval : a bool to turn into text + * @boolval: a bool to turn into text * * Convenient way to turn bool into text -*/ + * + * Returns a pointer to either "True" or "False" + */ const char * xmlBoolToText(int boolval) { @@ -1191,9 +1209,9 @@ xmlBoolToText(int boolval) */ /** - * xmlShellPrintXpathError: + * xmlShellPrintXPathError: * @errorType: valid xpath error id - * @arg : the argument that cause xpath to fail + * @arg: the argument that cause xpath to fail * * Print the xpath error to libxml default error channel */ @@ -1275,7 +1293,7 @@ xmlShellPrintNode(xmlNodePtr node) /** * xmlShellPrintXPathResult: - * list : a valid result generated by an xpath evaluation + * list: a valid result generated by an xpath evaluation * * Prints result to stdout */ @@ -1515,7 +1533,7 @@ xmlShellLoad(xmlShellCtxtPtr ctxt, char *filename, * @node2: unused * * Implements the XML shell function "write" - * Write the current node to the filename, it saves the serailization + * Write the current node to the filename, it saves the serialization * of the subtree under the @node specified * * Returns 0 or -1 in case of error @@ -1580,7 +1598,7 @@ xmlShellWrite(xmlShellCtxtPtr ctxt, char *filename, xmlNodePtr node, /** * xmlShellSave: * @ctxt: the shell context - * @filename: the file name (optionnal) + * @filename: the file name (optional) * @node: unused * @node2: unused * @@ -1637,7 +1655,7 @@ xmlShellSave(xmlShellCtxtPtr ctxt, char *filename, /** * xmlShellValidate: * @ctxt: the shell context - * @dtd: the DTD URI (optionnal) + * @dtd: the DTD URI (optional) * @node: unused * @node2: unused * diff --git a/doc/html/index.sgml b/doc/html/index.sgml index 2721267c..fb76186c 100644 --- a/doc/html/index.sgml +++ b/doc/html/index.sgml @@ -1120,7 +1120,6 @@ - diff --git a/doc/html/libxml-catalog.html b/doc/html/libxml-catalog.html index 3415639f..6baa6bbd 100644 --- a/doc/html/libxml-catalog.html +++ b/doc/html/libxml-catalog.html @@ -123,7 +123,7 @@ NAME="LIBXML-CATALOG" >

Name

Synopsis

Description

Details
















  the URI












  the URI

Add an entry in the catalog, it may overwrite existing but different entries. -If called before any other catalo routine, allows to override the +If called before any other catalog routine, allows to override the default shared catalog put in place by xmlInitializeCatalog








  the URI



  what catalogs should be accepted


  the system ID string

Name

Synopsis

xmlNodePtr node); -const char* xmlBoolToText (int boolval); char* (*xmlShellReadlineFunc

Description

Details











Dump to output the type and name of node.

  the FILE * for the output  the node to dump

Count the children of node.

  the node to count 


xmlBoolToText ()

const char* xmlBoolToText                   (int boolval);

Convenient way to turn bool into text

.
the number of children of boolvalnode : a bool to turn into text
Returns : 





Print the xpath error to libxml default error channel

  valid xpath error id  the argument that cause xpath to fail








Implements the XML shell function "write" -Write the current node to the filename, it saves the serailization +Write the current node to the filename, it saves the serialization of the subtree under the


the file name (optionnal) the file name (optional)

the DTD URI (optionnal) the DTD URI (optional)



Name

Synopsis

Description

Details










inlen after return is the number of octets consumed -as the return value is positive, else unpredictiable. +as the return value is positive, else unpredictable. The value of









Name

Synopsis

Description

Details


a pointer ot an array of bytes to store the UTF-8 result a pointer to an array of bytes to store the UTF-8 result a pointer ot an array of chars in the original encoding a pointer to an array of chars in the original encodingoutlen after return is the number of ocetes consumed. after return is the number of octets consumed.

a pointer ot an array of bytes to store the result a pointer to an array of bytes to store the result a pointer ot an array of UTF-8 chars a pointer to an array of UTF-8 chars





Register the char encoding handler, surprizing, isn't it ?

Register the char encoding handler, surprising, isn't it ?


Search in the registrered set the handler able to read/write that encoding.

Search in the registered set the handler able to read/write that encoding.


Search in the registrered set the handler able to read/write that encoding.

Search in the registered set the handler able to read/write that encoding.






Conpare the string to the known encoding schemes already known. Note +>Compare the string to the known encoding schemes already known. Note that the comparison is case insensitive accordingly to the section [XML] 4.3.3 Character Encoding in Entities.





char enconding transformation data structure char encoding transformation data structure


Generic front-end for hencoding handler close function

Generic front-end for encoding handler close function


inlen after return is the number of octets consumed -as the return value is positive, else unpredictiable. +as the return value is positive, else unpredictable. The value of

inlen
after return is the number of octets consumed -as the return value is positive, else unpredictiable. +as the return value is positive, else unpredictable. The value of







Name

Synopsis

Description

Details


struct xmlEntity {
-    void           *_private;	        /* for Corba, must be first ! */
+    void           *_private;	        /* application data */
     xmlElementType          type;       /* XML_ENTITY_DECL, must be second ! */
     const xmlChar          *name;	/* Attribute name */
     struct _xmlNode    *children;	/* NULL */
@@ -467,7 +467,7 @@ CLASS="PROGRAMLISTING"
 >






NULL if not, othervise the entityNULL if not, otherwise the entity

Do an entity lookup in the document entity hash table and -returns the corrsponding entity, otherwise a lookup is done +returns the corresponding entity, otherwise a lookup is done in the predefined entities too.


Do an entity lookup in the Dtd entity hash table and +>Do an entity lookup in the DTD entity hash table and returns the corresponding entity, if found.











Name

Synopsis

Description

Details



























Name

Synopsis

Description

Details








Free the hash table and its contents. The userdata is -deallocated with f if provided.

Free the hash table and its contents. The userdata is +deallocated with f if provided.


Add the userdata to the hash table. This can later be retrieved -by using the name. Duplicate names generate errors.

Add the userdata to the hash table. This can later be retrieved +by using the name. Duplicate names generate errors.


Add the userdata to the hash table. This can later be retrieved -by using the name. Existing entry for this name will be removed +>Add the userdata to the hash table. This can later be retrieved +by using the name. Existing entry for this name will be removed and freed with


Add the userdata to the hash table. This can later be retrieved -by using the (name, name2) tuple. Duplicate tuples generate errors.

Add the userdata to the hash table. This can later be retrieved +by using the (name, name2) tuple. Duplicate tuples generate errors.


Add the userdata to the hash table. This can later be retrieved -by using the (name, name2) tuple. Existing entry for this tuple will +>Add the userdata to the hash table. This can later be retrieved +by using the (name, name2) tuple. Existing entry for this tuple will be removed and freed with


Add the userdata to the hash table. This can later be retrieved -by using the tuple (name, name2, name3). Duplicate entries generate +>Add the userdata to the hash table. This can later be retrieved +by using the tuple (name, name2, name3). Duplicate entries generate errors.


Add the userdata to the hash table. This can later be retrieved -by using the tuple (name, name2, name3). Existing entry for this tuple +>Add the userdata to the hash table. This can later be retrieved +by using the tuple (name, name2, name3). Existing entry for this tuple will be removed and freed with


Find the userdata specified by the (name, name2, name3) tuple and remove -it from the hash table. Existing userdata for this tuple will be removed +>Find the userdata specified by the name and remove +it from the hash table. Existing userdata for this tuple will be removed and freed with


Find the userdata specified by the (name, name2, name3) tuple and remove -it from the hash table. Existing userdata for this tuple will be removed +>Find the userdata specified by the (name, name2) tuple and remove +it from the hash table. Existing userdata for this tuple will be removed and freed with


Find the userdata specified by the (name, name2, name3) tuple and remove -it from the hash table. Existing userdata for this tuple will be removed +>Find the userdata specified by the (name, name2, name3) tuple and remove +it from the hash table. Existing userdata for this tuple will be removed and freed with


Find the userdata specified by the name.

Find the userdata specified by the name.


Find the userdata specified by the (name, name2) tuple.

Find the userdata specified by the (name, name2) tuple.


Find the userdata specified by the (name, name2, name3) tuple.

Find the userdata specified by the (name, name2, name3) tuple.


Scan the hash table and applied f to each value.

Scan the hash table and applied f to each value.


Query the number of element installed in the hash table.

Query the number of elements installed in the hash table.


Scan the hash table and applied f to each value.

Scan the hash table and applied f to each value.


Scan the hash table and applied f to each value matching -(name, name2, name3) tuple. If one of the names is null, +>Scan the hash table and applied f to each value matching +(name, name2, name3) tuple. If one of the names is null, the comparison is considered to match.


Scan the hash table and applied f to each value.

Scan the hash table and applied f to each value.


Scan the hash table and applied f to each value matching -(name, name2, name3) tuple. If one of the names is null, +>Scan the hash table and applied f to each value matching +(name, name2, name3) tuple. If one of the names is null, the comparison is considered to match.

Name

Synopsis

Description

Details

















The HTmL DtD allows a tag to implicitely close other tags. +>The HTML DTD allows a tag to implicitly close other tags. The list is kept in htmlStartClose array. This function checks if a tag is autoclosed by one of it's child


The HTmL DtD allows a tag to implicitely close other tags. +>The HTML DTD allows a tag to implicitly close other tags. The list is kept in htmlStartClose array. This function checks if the element or one of it's children would autoclose the given tag.









inlen after return is the number of octets consumed -as the return value is positive, else unpredictiable. +as the return value is positive, else unpredictable. The value of

inlen
after return is the number of octets consumed -as the return value is positive, else unpredictiable. +as the return value is positive, else unpredictable. The value of





Name

Synopsis

Description

Details







a new document, do not intialize the DTD if not provideda new document, do not initialize the DTD if not provided













Name

Synopsis

Description

Details























Name

Synopsis

Description

Details





  input length

  input length


if availble the redirected URL will be returned if available the redirected URL will be returned





The parser is now working also as a state based parser -The recursive one use the stagte info for entities processing

  the XML parser context  the entity input parser

global variable controlling the entity substitution default behaviour

global variable controlling the entity substitution default behavior

the xmlChar * for the first occurence or NULL.the xmlChar * for the first occurrence or NULL.the xmlChar * for the first occurence or NULL.the xmlChar * for the first occurrence or NULL.the xmlChar * for the first occurence or NULL.the xmlChar * for the first occurrence or NULL.the xmlChar * for the first occurence or NULL.the xmlChar * for the first occurrence or NULL.

a strncat for array of xmlChar's, it will extend cur with the len +>a strncat for array of xmlChar's, it will extend cur with the len first bytes of





Set and return the previous value for default entity support. Initially the parser always keep entity references instead of substituting entity values in the output. This function has to be used to change the -default parser behaviour +default parser behavior SAX::subtituteEntitiessubstituteEntities() has to be used for changing that on a file by file basis.


() are only generated when running the parser in validating mode and when the current element doesn't allow CDATA or mixed content. -This function is provided as a way to force the standard behaviour +This function is provided as a way to force the standard behavior on 1.X libs and to switch back to the old mode for compatibility when running 1.X client code on 2.X . Upgrade of 1.X code should be done by using









parse a genreral parsed entity +>parse a general parsed entity An external general parsed entity is well-formed if it matches the production labeled extParsedEnt.





































Load an external entity, note that the use of this function for unparsed entities may generate problems -TODO: a more generic External entitiy API must be designed

Name

Synopsis

Description

Details















c : an unicode character (int)
Returns :0 if not, non-zero otherwise


xmlIsBlank ()

int         xmlIsBlank                      (int c);

Check whether the character is allowed by the production -[3] S ::= (x20 | x9 | xD | xA)+ -Also available as a macro IS_BLANK()

xmlIsBlank ()

int         xmlIsBlank                      (int c);

Check whether the character is allowed by the production +[3] S ::= (x20 | x9 | xD | xA)+ +Also available as a macro IS_BLANK()

c : an unicode character (int)
Returns :0 if not, non-zero otherwise


xmlIsPubidChar ()



c : an unicode character (int)
Returns :0 if not, non-zero otherwise


xmlIsIdeographic ()

int         xmlIsIdeographic                (int c);

Check whether the character is allowed by the production -[86] Ideographic ::= [x4E00-x9FA5] | x3007 | [x3021-x3029]

xmlIsCombining ()

xmlIsIdeographic ()

int         xmlIsCombining                  (int c);
int xmlIsIdeographic (int c);

Check whether the character is allowed by the production -[87] CombiningChar ::= ... long list see REC ...

x4E00-x9FA5] | x3007 | [x3021-x3029]


xmlIsCombining ()

int         xmlIsCombining                  (int c);

Check whether the character is allowed by the production +[87] CombiningChar ::= ... long list see REC ...

c : an unicode character (int)
Returns :0 if not, non-zero otherwise








a posible base for the target URI a possible base for the target URI


















ctxt : an XML parser context
Returns :the Name parsed or NULL


xmlParseName ()

xmlChar*    xmlParseName                    (xmlParserCtxtPtr ctxt);

parse an XML name.

[4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | -CombiningChar | Extender

[5] Name ::= (Letter | '_' | ':') (NameChar)*

[6] Names ::= Name (S Name)*

xmlParseName ()

xmlChar*    xmlParseName                    (xmlParserCtxtPtr ctxt);

parse an XML name.

[4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | +CombiningChar | Extender

[5] Name ::= (Letter | '_' | ':') (NameChar)*

[6] Names ::= Name (S Name)*

ctxt : an XML parser context
Returns :the Name parsed or NULL


xmlParseNmtoken ()


the EntityValue parsed with reference substitued or NULLthe EntityValue parsed with reference substituted or NULL





Parse an External ID or a Public ID

NOTE: Productions [75] and [83] interract badly since [75] can generate +>NOTE: Productions [75] and [83] interact badly since [75] can generate 'PUBLIC' S PubidLiteral S SystemLiteral

[75] ExternalID ::= 'SYSTEM' S SystemLiteral @@ -5914,7 +5914,7 @@ HREF="libxml-tree.html#XMLCHAR" >















[ VC: Proper Group/PE Nesting ] applies to [49] and [50] TODO Parameter-entity replacement text must be properly nested -with parenthetized groups. That is to say, if either of the +with parenthesized groups. That is to say, if either of the opening or closing parentheses in a choice, seq, or Mixed construct is contained in the replacement text for a parameter entity, both must be contained in the same replacement text. For @@ -7306,7 +7306,7 @@ the replacement text should be a connector (| or ,).























parse an XML Misc* optionnal field.

parse an XML Misc* optional field.

[27] Misc ::= Comment | PI | S








Takes a entity string content and process to do the adequate subtitutions.

Takes a entity string content and process to do the adequate substitutions.

[67] Reference ::= EntityRef | CharRef









The current char value, if using UTF-8 this may actaully span multiple +>The current char value, if using UTF-8 this may actually span multiple bytes in the input buffer.



xmlParserHandleReference ()

void        xmlParserHandleReference        (xmlParserCtxtPtr ctxt);

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 detectect in the current input stream -the handling is done accordingly to -http://www.w3.org/TR/REC-xmlentproc

xmlParserHandleReference ()

void        xmlParserHandleReference        (xmlParserCtxtPtr ctxt);

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-xmlentproc

ctxt : the parser context


xmlCheckLanguageID ()


The current char value, if using UTF-8 this may actaully span multiple +>The current char value, if using UTF-8 this may actually span multiple bytes in the input buffer. Implement the end of line normalization: 2.11 End-of-Line Handling Wherever an external parsed entity or the literal entity value @@ -11042,7 +11042,7 @@ HREF="XA" >


pointer to an arry of xmlChar pointer to an array of xmlChar

pointer to an arry of xmlChar pointer to an array of xmlChar




Name

Synopsis

Description

Details








































Name

Synopsis

Description

Details

















xmlIsMainThread() check wether the current thread is the main thread.

() check whether the current thread is the main thread.



Name

Synopsis

xmlNodePtr cur, - intval); + int val); xmlChar (xmlAttrPtr attr); +> cur); int xmlUnsetProp

Possible definitions of element content occurences

Possible definitions of element content occurrences

the differnt possibility for an element content type

the different possibilities for an element content type

An XML namespace. Note that prefix == NULL is valid, it defines the default namespace -within the subtree (until overriden).

xmlNsType is unified with xmlElementType

An XML DtD, as defined by <!DOCTYPE ... There is actually one for +>An XML DTD, as defined by <!DOCTYPE ... There is actually one for the internal subset and for the external subset

struct xmlID { struct _xmlID *next; /* next ID */ const xmlChar *value; /* The ID name */ - xmlAttrPtr attr; /* The attribut holding it */ + xmlAttrPtr attr; /* The attribute holding it */ };

struct xmlRef { struct _xmlRef *next; /* next Ref */ const xmlChar *value; /* The Ref name */ - xmlAttrPtr attr; /* The attribut holding it */ + xmlAttrPtr attr; /* The attribute holding it */ };

Resize a buffer to accomodate minimum size of Resize a buffer to accommodate minimum size of sizethe number of xmlChar writtenthe number of xmlChar written


the xmlChar string the xmlChar string the number of xmlChar to add the number of xmlChar to add

the xmlChar string the xmlChar string the number of xmlChar to add the number of xmlChar to add

the xmlChar string the xmlChar string


the number of xmlChar removed, or -1 in case of failure.the number of xmlChar removed, or -1 in case of failure.










NULL this functionnality had been removedNULL this functionality had been removed

returns a new namespace pointer or NULLa new namespace pointer or NULL




pointer to the document -@: pointer to the document






a new xmlAttrPtr, or NULL in case of error. a new xmlAttrPtr, or NULL in case of error.

a new xmlAttrPtr, or NULL in case of error. a new xmlAttrPtr, or NULL in case of error.

a new xmlDtdPtr, or NULL in case of error. a new xmlDtdPtr, or NULL in case of error.

Do a copy of the document info. If recursive, the content tree will -be copied too as well as Dtd, namespaces and entities.

a new xmlDocPtr, or NULL in case of error. a new xmlDocPtr, or NULL in case of error.

content -are optionnal (NULL). +are optional (NULL). NOTE:


content -are optionnal (NULL).


ns is optionnal (NULL).

is optional (NULL).


content parameters are optionnal (NULL). If content is non NULL, +> parameters are optional (NULL). If content is non NULL, a child list containing the TEXTs and ENTITY_REFs node will be created. NOTE:


content parameters are optionnal (NULL). If content is non NULL, +> parameters are optional (NULL). If content is non NULL, a child TEXT node will be created containing the string content.







Creation of a new node containing a commentwithin a document.

Creation of a new node containing a comment within a document.



Creation of a new node containing a CData block.

Creation of a new node containing a CDATA block.

the CData block content content the CDATA block content content



a new xmlNodePtr, or NULL in case of error. a new xmlNodePtr, or NULL in case of error.

  the document a new xmlNodePtr, or NULL in case of error. a new xmlNodePtr, or NULL in case of error.

a new xmlNodePtr, or NULL in case of error. a new xmlNodePtr, or NULL in case of error.


Get line number of node. this requires activation of this option -before inoking the parser by calling xmlLineNumbersDefault(1)

the line number if sucessfull, -1 otherwisethe line number if successful, -1 otherwise


the xmlNodePtr for the root or NULLthe xmlNodePtr for the root or NULL








Unlink the old node from it's current context, prune the new one -at the same place. If cur was already inserted in a document it is +at the same place. If cur was already inserted in a document it is first unlinked from its existing context.

the old nodethe old node










  the first element



an NULL terminated array of all the xmlNsPtr found +>an NULL terminated array of all the xmlNsPtr found that need to be freed by the caller or NULL if no namespace if defined


a new xmlNsPtr, or NULL in case of error. a new xmlNsPtr, or NULL in case of error.

a new xmlNsPtr, or NULL in case of error. a new xmlNsPtr, or NULL in case of error.









a pointer to the string copy, the calller must free it.a pointer to the string copy, the caller must free it.

a pointer to the string copy, the calller must free it.a pointer to the string copy, the caller must free it.





Read the value of a node, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). -Entity references are substitued.

a new xmlChar * or NULL if no content is available. +>a new xmlChar * or NULL if no content is available. It's up to the caller to free the memory.


the langage description the language description

-1 if xml:space is not inheried, 0 if "default", 1 if "preserve"-1 if xml:space is not inherited, 0 if "default", 1 if "preserve"

xmlNodePtr cur, - intval);

Param2val :  the xml:space value ("0": default, 1: "preserve")



int xmlRemoveProp (xmlAttrPtr attr); cur);

attrcur :  an attribute






routine which manage and grows an output buffer. This one writes -a quoted or double quoted xmlChar string, checking first if it holds +a quoted or double quoted xmlChar string, checking first if it holds quote or double-quotes internally



Dump an XML document in memory and return the xmlChar * and it's size. +>Dump an XML document in memory and return the xmlChar * and it's size. It's up to the caller to free the memory.


Dump an XML document in memory and return the xmlChar * and it's size. +>Dump an XML document in memory and return the xmlChar * and it's size. It's up to the caller to free the memory.




the number of byte written or -1 in case of failure. the number of bytes written or -1 in case of failure.

Dump an XML/HTML node, recursive behaviour,children are printed too.

Dump an XML/HTML node, recursive behaviour, children are printed too.


the number of byte written or -1 in case of failure. the number of bytes written or -1 in case of failure.

filename is "-" the stdout file is -used. If format is set then the document will be indented on output.

format is set then the document will be indented on output.

the number of byte written or -1 in case of failure. the number of bytes written or -1 in case of failure.


the encoding if any assuming the i/O layer handles the trancoding the encoding if any assuming the I/O layer handles the trancoding the number of byte written or -1 in case of failure. the number of bytes written or -1 in case of failure.

the encoding if any assuming the i/O layer handles the trancoding the encoding if any assuming the I/O layer handles the trancoding the number of byte written or -1 in case of failure. the number of bytes written or -1 in case of failure.

Dump an XML node, recursive behaviour,children are printed too.

Dump an XML node, recursive behaviour, children are printed too.


 the number of bytes written or -1 in case of error.

the number of byte written or -1 in case of failure. the number of bytes written or -1 in case of failure.




Name

Synopsis

Description

Details










optionnal destination buffer optional destination buffer



Name

Synopsis

Description

Details













NULL if not, othervise the entityNULL if not, otherwise the entity





NULL if not, othervise the new element content structureNULL if not, otherwise the new element content structure





NULL if not, othervise the entityNULL if not, otherwise the entity








NULL if not new, othervise the attribute declNULL if not new, otherwise the attribute decl





NULL if not, othervise the new xmlIDPtrNULL if not, otherwise the new xmlIDPtr



Determine whether an attribute is of type ID. In case we have Dtd(s) +>Determine whether an attribute is of type ID. In case we have DTD(s) then this is simple, otherwise we use an heuristic: name ID (upper or lowercase).



NULL if not, othervise the new xmlRefPtrNULL if not, otherwise the new xmlRefPtr


Determine whether an attribute is of type Ref. In case we have Dtd(s) +>Determine whether an attribute is of type Ref. In case we have DTD(s) then this is simple, otherwise we use an heuristic: name Ref (upper or lowercase).









Try to validate a single notation definition basically it does the following checks as described by the XML-1.0 recommendation: -- it seems that no validity constraing exist on notation declarations +- it seems that no validity constraint exists on notation declarations But this function get called anyway ...









Validate that the given mame match a notation declaration. +>Validate that the given name match a notation declaration. - [ VC: Notation Declared ]



Search the Dtd for the description of this attribute on +>Search the DTD for the description of this attribute on this element.


Search the Dtd for the description of this qualified attribute on +>Search the DTD for the description of this qualified attribute on this element.


Search the Dtd for the description of this notation

Search the DTD for the description of this notation


Search the Dtd for the description of this element

Search the DTD for the description of this element


Search the Dtd for the description of this element

Search the DTD for the description of this element



Name

Synopsis

Description

Details

0 if no substition were done, -1 if some processing failed +>0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

Name

Synopsis

Description

Details










Name

Synopsis

Description

Details






















TODO: one should be able to remove one extra copy by copying directy +>TODO: one should be able to remove one extra copy by copying directly onto in->buffer or in->raw



















Name

Synopsis

Description

Details



















Name

Synopsis

xmlXPathContextPtr ctxt); +> ctx); xmlXPathObjectPtr

Description

Details



























Implement a functionnality similar to the DOM NodeList.length

Implement a functionality similar to the DOM NodeList.length


Implements a functionnality similar to the DOM NodeList.Implements a functionality similar to the DOM NodeList.item()






















the string value of the object, NULL in case of error. -A new string is allocated only if needed (val isn't a +A new string is allocated only if needed (val isn't a string object).







xmlXPathContextPtr ctxt); ctx);

ctxtctx :  the XPath contextthe xmlXPathObjectPtr resulting from the eveluation or NULL. +>the xmlXPathObjectPtr resulting from the evaluation or NULL. the caller has to free the object.


Return 1 if predicate is true, 0 otherwise

 1 if predicate is true, 0 otherwise

the xmlXPathObjectPtr resulting from the eveluation or NULL. +>the xmlXPathObjectPtr resulting from the evaluation or NULL. the caller has to free the object.

the xmlXPathObjectPtr resulting from the eveluation or NULL. +>the xmlXPathObjectPtr resulting from the evaluation or NULL. the caller has to free the object.

Name

Synopsis

xmlXPathVariableLookupFunc f, - void *varCtxt); + void *data); typedefxmlChar *ns_uri); +> *prefix); void xmlXPathRegisteredNsCleanup

Description

Details












Pops an external oject from the stack, handling conversion if needed. +>Pops an external object from the stack, handling conversion if needed. Check error with xmlXPathCheckError

























xmlXPathVariableLookupFunc f, - void *varCtxt);

varCtxtdata :  the lookup data


Registers an external mecanism to do function lookup.

Registers an external mechanism to do function lookup.

  the lookup data



















xmlChar *ns_uri); *prefix);

ctxt : the XPath context
ns_uri : 
Returns :the value or NULL if not found


xmlXPathRegisteredNsCleanup ()

void        xmlXPathRegisteredNsCleanup     (xmlXPathContextPtr ctxt);

Cleanup the XPath context data associated to registered variables

the XPath contextprefix : the namespace prefix valueReturns :the value or NULL if not found


xmlXPathRegisteredNsCleanup ()

void        xmlXPathRegisteredNsCleanup     (xmlXPathContextPtr ctxt);

Cleanup the XPath context data associated to registered variables

ctxt : the XPath context















 the number of items on the value stack









add a new xmlNodePtr ot an existing NodeSet

add a new xmlNodePtr to an existing NodeSet


add a new xmlNodePtr ot an existing NodeSet, optimized version +>add a new xmlNodePtr to an existing NodeSet, optimized version when we are sure the node is not already in the set.









Return 1 if predicate is true, 0 otherwise

 1 if predicate is true, 0 otherwise





val1 once extended or NULL in case of error.val1 once extended or NULL in case of error.












1 if the comparaison succeeded, 0 if it failed1 if the comparison succeeded, 0 if it failed



Implement the substraction operation on XPath objects: +>Implement the subtraction operation on XPath objects: The numeric operators convert their operands to numbers as if by calling the number function.




















position() The position function returns the position of the context node in the -context node list. The first position is 1, and so the last positionr +context node list. The first position is 1, and so the last position will be equal to last























Name

Synopsis

Description

Details















add a new xmlXPathObjectPtr ot an existing LocationSet +>add a new xmlXPathObjectPtr to an existing LocationSet If the location already exist in the set






the xmlXPathObjectPtr resulting from the eveluation or NULL. +>the xmlXPathObjectPtr resulting from the evaluation or NULL. the caller has to free the object.



' | wc -c => 38 * 45 chars should be sufficient to reach the end of the encoding - * decalration without going too far inside the document content. + * declaration without going too far inside the document content. */ written = 45; @@ -2027,7 +2027,7 @@ xmlCharEncFirstLine(xmlCharEncodingHandler *handler, xmlBufferPtr out, /** * xmlCharEncInFunc: - * @handler: char enconding transformation data structure + * @handler: char encoding transformation data structure * @out: an xmlBuffer for the output. * @in: an xmlBuffer for the input * @@ -2178,7 +2178,7 @@ retry: } /* - * Convertion itself. + * Conversion itself. */ toconv = in->use; if (toconv == 0) @@ -2289,7 +2289,7 @@ retry: * xmlCharEncCloseFunc: * @handler: char enconding transformation data structure * - * Generic front-end for hencoding handler close function + * Generic front-end for encoding handler close function * * Returns 0 if success, or -1 in case of error */ @@ -2300,7 +2300,7 @@ xmlCharEncCloseFunc(xmlCharEncodingHandler *handler) { if (handler->name == NULL) return(-1); #ifdef LIBXML_ICONV_ENABLED /* - * Iconv handlers can be oused only once, free the whole block. + * Iconv handlers can be used only once, free the whole block. * and the associated icon resources. */ if ((handler->iconv_out != NULL) || (handler->iconv_in != NULL)) { diff --git a/entities.c b/entities.c index 05c525c1..4cef5d24 100644 --- a/entities.c +++ b/entities.c @@ -1,5 +1,5 @@ /* - * entities.c : implementation for the XML entities handking + * entities.c : implementation for the XML entities handling * * See Copyright for the status of this software. * @@ -185,7 +185,7 @@ void xmlCleanupPredefinedEntities(void) { * * Check whether this name is an predefined entity. * - * Returns NULL if not, othervise the entity + * Returns NULL if not, otherwise the entity */ xmlEntityPtr xmlGetPredefinedEntity(const xmlChar *name) { @@ -229,7 +229,7 @@ xmlAddDtdEntity(xmlDocPtr doc, const xmlChar *name, int type, if (ret == NULL) return(NULL); /* - * Link it to the Dtd + * Link it to the DTD */ ret->parent = dtd; ret->doc = dtd->doc; @@ -270,7 +270,7 @@ xmlAddDocEntity(xmlDocPtr doc, const xmlChar *name, int type, } if (doc->intSubset == NULL) { xmlGenericError(xmlGenericErrorContext, - "xmlAddDtdEntity: document without internal subset !\n"); + "xmlAddDocEntity: document without internal subset !\n"); return(NULL); } dtd = doc->intSubset; @@ -278,7 +278,7 @@ xmlAddDocEntity(xmlDocPtr doc, const xmlChar *name, int type, if (ret == NULL) return(NULL); /* - * Link it to the Dtd + * Link it to the DTD */ ret->parent = dtd; ret->doc = dtd->doc; @@ -341,7 +341,7 @@ xmlGetParameterEntity(xmlDocPtr doc, const xmlChar *name) { * @doc: the document referencing the entity * @name: the entity name * - * Do an entity lookup in the Dtd entity hash table and + * Do an entity lookup in the DTD entity hash table and * returns the corresponding entity, if found. * * Returns A pointer to the entity structure or NULL if not found. @@ -363,7 +363,7 @@ xmlGetDtdEntity(xmlDocPtr doc, const xmlChar *name) { * @name: the entity name * * Do an entity lookup in the document entity hash table and - * returns the corrsponding entity, otherwise a lookup is done + * returns the corresponding entity, otherwise a lookup is done * in the predefined entities too. * * Returns A pointer to the entity structure or NULL if not found. @@ -975,7 +975,7 @@ xmlDumpEntityDecl(xmlBufferPtr buf, xmlEntityPtr ent) { break; default: xmlGenericError(xmlGenericErrorContext, - "xmlDumpEntitiesTable: internal: unknown type %d\n", + "xmlDumpEntitiesDecl: internal: unknown type %d\n", ent->etype); } } diff --git a/globals.c b/globals.c index 7d2ca4eb..a66f0e8f 100644 --- a/globals.c +++ b/globals.c @@ -258,7 +258,7 @@ xmlInitializeGlobalState(xmlGlobalStatePtr gs) #endif /* - * Perform initialisation as required by libxml + * Perform initialization as required by libxml */ initxmlDefaultSAXHandler(&gs->xmlDefaultSAXHandler, 1); #ifdef LIBXML_DOCB_ENABLED diff --git a/hash.c b/hash.c index 4ea4b2bf..e40bebb0 100644 --- a/hash.c +++ b/hash.c @@ -189,8 +189,8 @@ xmlHashGrow(xmlHashTablePtr table, int size) { * @table: the hash table * @f: the deallocator function for items in the hash * - * Free the hash table and its contents. The userdata is - * deallocated with f if provided. + * Free the hash @table and its contents. The userdata is + * deallocated with @f if provided. */ void xmlHashFree(xmlHashTablePtr table, xmlHashDeallocator f) { @@ -230,8 +230,8 @@ xmlHashFree(xmlHashTablePtr table, xmlHashDeallocator f) { * @name: the name of the userdata * @userdata: a pointer to the userdata * - * Add the userdata to the hash table. This can later be retrieved - * by using the name. Duplicate names generate errors. + * Add the @userdata to the hash @table. This can later be retrieved + * by using the @name. Duplicate names generate errors. * * Returns 0 the addition succeeded and -1 in case of error. */ @@ -247,8 +247,8 @@ xmlHashAddEntry(xmlHashTablePtr table, const xmlChar *name, void *userdata) { * @name2: a second name of the userdata * @userdata: a pointer to the userdata * - * Add the userdata to the hash table. This can later be retrieved - * by using the (name, name2) tuple. Duplicate tuples generate errors. + * Add the @userdata to the hash @table. This can later be retrieved + * by using the (@name, @name2) tuple. Duplicate tuples generate errors. * * Returns 0 the addition succeeded and -1 in case of error. */ @@ -265,8 +265,8 @@ xmlHashAddEntry2(xmlHashTablePtr table, const xmlChar *name, * @userdata: a pointer to the userdata * @f: the deallocator function for replaced item (if any) * - * Add the userdata to the hash table. This can later be retrieved - * by using the name. Existing entry for this name will be removed + * Add the @userdata to the hash @table. This can later be retrieved + * by using the @name. Existing entry for this @name will be removed * and freed with @f if found. * * Returns 0 the addition succeeded and -1 in case of error. @@ -285,8 +285,8 @@ xmlHashUpdateEntry(xmlHashTablePtr table, const xmlChar *name, * @userdata: a pointer to the userdata * @f: the deallocator function for replaced item (if any) * - * Add the userdata to the hash table. This can later be retrieved - * by using the (name, name2) tuple. Existing entry for this tuple will + * Add the @userdata to the hash @table. This can later be retrieved + * by using the (@name, @name2) tuple. Existing entry for this tuple will * be removed and freed with @f if found. * * Returns 0 the addition succeeded and -1 in case of error. @@ -303,7 +303,7 @@ xmlHashUpdateEntry2(xmlHashTablePtr table, const xmlChar *name, * @table: the hash table * @name: the name of the userdata * - * Find the userdata specified by the name. + * Find the userdata specified by the @name. * * Returns the pointer to the userdata */ @@ -318,7 +318,7 @@ xmlHashLookup(xmlHashTablePtr table, const xmlChar *name) { * @name: the name of the userdata * @name2: a second name of the userdata * - * Find the userdata specified by the (name, name2) tuple. + * Find the userdata specified by the (@name, @name2) tuple. * * Returns the pointer to the userdata */ @@ -336,8 +336,8 @@ xmlHashLookup2(xmlHashTablePtr table, const xmlChar *name, * @name3: a third name of the userdata * @userdata: a pointer to the userdata * - * Add the userdata to the hash table. This can later be retrieved - * by using the tuple (name, name2, name3). Duplicate entries generate + * Add the @userdata to the hash @table. This can later be retrieved + * by using the tuple (@name, @name2, @name3). Duplicate entries generate * errors. * * Returns 0 the addition succeeded and -1 in case of error. @@ -406,8 +406,8 @@ xmlHashAddEntry3(xmlHashTablePtr table, const xmlChar *name, * @userdata: a pointer to the userdata * @f: the deallocator function for replaced item (if any) * - * Add the userdata to the hash table. This can later be retrieved - * by using the tuple (name, name2, name3). Existing entry for this tuple + * Add the @userdata to the hash @table. This can later be retrieved + * by using the tuple (@name, @name2, @name3). Existing entry for this tuple * will be removed and freed with @f if found. * * Returns 0 the addition succeeded and -1 in case of error. @@ -477,7 +477,7 @@ xmlHashUpdateEntry3(xmlHashTablePtr table, const xmlChar *name, * @name2: a second name of the userdata * @name3: a third name of the userdata * - * Find the userdata specified by the (name, name2, name3) tuple. + * Find the userdata specified by the (@name, @name2, @name3) tuple. * * Returns the a pointer to the userdata */ @@ -507,7 +507,7 @@ xmlHashLookup3(xmlHashTablePtr table, const xmlChar *name, * @f: the scanner function for items in the hash * @data: extra data passed to f * - * Scan the hash table and applied f to each value. + * Scan the hash @table and applied @f to each value. */ void xmlHashScan(xmlHashTablePtr table, xmlHashScanner f, void *data) { @@ -520,7 +520,7 @@ xmlHashScan(xmlHashTablePtr table, xmlHashScanner f, void *data) { * @f: the scanner function for items in the hash * @data: extra data passed to f * - * Scan the hash table and applied f to each value. + * Scan the hash @table and applied @f to each value. */ void xmlHashScanFull(xmlHashTablePtr table, xmlHashScannerFull f, void *data) { @@ -556,8 +556,8 @@ xmlHashScanFull(xmlHashTablePtr table, xmlHashScannerFull f, void *data) { * @f: the scanner function for items in the hash * @data: extra data passed to f * - * Scan the hash table and applied f to each value matching - * (name, name2, name3) tuple. If one of the names is null, + * Scan the hash @table and applied @f to each value matching + * (@name, @name2, @name3) tuple. If one of the names is null, * the comparison is considered to match. */ void @@ -577,8 +577,8 @@ xmlHashScan3(xmlHashTablePtr table, const xmlChar *name, * @f: the scanner function for items in the hash * @data: extra data passed to f * - * Scan the hash table and applied f to each value matching - * (name, name2, name3) tuple. If one of the names is null, + * Scan the hash @table and applied @f to each value matching + * (@name, @name2, @name3) tuple. If one of the names is null, * the comparison is considered to match. */ void @@ -616,7 +616,7 @@ xmlHashScanFull3(xmlHashTablePtr table, const xmlChar *name, * @table: the hash table * @f: the copier function for items in the hash * - * Scan the hash table and applied f to each value. + * Scan the hash @table and applied @f to each value. * * Returns the new table or NULL in case of error. */ @@ -652,7 +652,7 @@ xmlHashCopy(xmlHashTablePtr table, xmlHashCopier f) { * xmlHashSize: * @table: the hash table * - * Query the number of element installed in the hash table. + * Query the number of elements installed in the hash @table. * * Returns the number of elements in the hash table or * -1 in case of error @@ -670,8 +670,8 @@ xmlHashSize(xmlHashTablePtr table) { * @name: the name of the userdata * @f: the deallocator function for removed item (if any) * - * Find the userdata specified by the (name, name2, name3) tuple and remove - * it from the hash table. Existing userdata for this tuple will be removed + * Find the userdata specified by the @name and remove + * it from the hash @table. Existing userdata for this tuple will be removed * and freed with @f. * * Returns 0 if the removal succeeded and -1 in case of error or not found. @@ -688,8 +688,8 @@ int xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name, * @name2: a second name of the userdata * @f: the deallocator function for removed item (if any) * - * Find the userdata specified by the (name, name2, name3) tuple and remove - * it from the hash table. Existing userdata for this tuple will be removed + * Find the userdata specified by the (@name, @name2) tuple and remove + * it from the hash @table. Existing userdata for this tuple will be removed * and freed with @f. * * Returns 0 if the removal succeeded and -1 in case of error or not found. @@ -707,8 +707,8 @@ int xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name, * @name3: a third name of the userdata * @f: the deallocator function for removed item (if any) * - * Find the userdata specified by the (name, name2, name3) tuple and remove - * it from the hash table. Existing userdata for this tuple will be removed + * Find the userdata specified by the (@name, @name2, @name3) tuple and remove + * it from the hash @table. Existing userdata for this tuple will be removed * and freed with @f. * * Returns 0 if the removal succeeded and -1 in case of error or not found. diff --git a/include/libxml/DOCBparser.h b/include/libxml/DOCBparser.h index 24b99b7d..15195b62 100644 --- a/include/libxml/DOCBparser.h +++ b/include/libxml/DOCBparser.h @@ -1,5 +1,5 @@ /* - * SGMLparser.h : interface for a DocBook SGML non-verifying parser + * DOCBparser.h : interface for a DocBook SGML non-verifying parser * * See Copyright for the status of this software. * diff --git a/include/libxml/HTMLparser.h b/include/libxml/HTMLparser.h index 86b6f8b4..5ba0eebb 100644 --- a/include/libxml/HTMLparser.h +++ b/include/libxml/HTMLparser.h @@ -1,5 +1,5 @@ /* - * HTMLparser.h : inf=terface for an HTML 4.0 non-verifying parser + * HTMLparser.h : interface for an HTML 4.0 non-verifying parser * * See Copyright for the status of this software. * diff --git a/include/libxml/HTMLtree.h b/include/libxml/HTMLtree.h index 06221d08..1f567758 100644 --- a/include/libxml/HTMLtree.h +++ b/include/libxml/HTMLtree.h @@ -1,6 +1,6 @@ /* - * tree.h : describes the structures found in an tree resulting - * from an XML parsing. + * HTMLtree.h : describes the structures found in an tree resulting + * from an XML parsing. * * See Copyright for the status of this software. * diff --git a/include/libxml/SAX.h b/include/libxml/SAX.h index 01cc204d..d96d9e95 100644 --- a/include/libxml/SAX.h +++ b/include/libxml/SAX.h @@ -20,7 +20,7 @@ extern "C" { #endif const xmlChar * getPublicId (void *ctx); const xmlChar * getSystemId (void *ctx); -void setDocumentLocator (void *ctx, +void setDocumentLocator (void *ctx, xmlSAXLocatorPtr loc); int getLineNumber (void *ctx); diff --git a/include/libxml/catalog.h b/include/libxml/catalog.h index 719e5d65..0c292fd5 100644 --- a/include/libxml/catalog.h +++ b/include/libxml/catalog.h @@ -1,5 +1,5 @@ /** - * uri.c: interfaces of the Catalog handling system + * catalog.h: interfaces of the Catalog handling system * * Reference: SGML Open Technical Resolution TR9401:1997. * http://www.jclark.com/sp/catalog.htm diff --git a/include/libxml/encoding.h b/include/libxml/encoding.h index b2ff102a..6fbaf7e7 100644 --- a/include/libxml/encoding.h +++ b/include/libxml/encoding.h @@ -47,7 +47,7 @@ extern "C" { * declaration are looked at and a converter is looked for at that * point. If not found the parser stops here as asked by the XML REC * Converter can be registered by the user using xmlRegisterCharEncodingHandler - * but the currentl form doesn't allow stateful transcoding (a serious + * but the current form doesn't allow stateful transcoding (a serious * problem agreed !). If iconv has been found it will be used * automatically and allow stateful transcoding, the simplest is then * to be sure to enable icon and to provide iconv libs for the encoding @@ -82,9 +82,9 @@ typedef enum { /** * xmlCharEncodingInputFunc: - * @out: a pointer ot an array of bytes to store the UTF-8 result + * @out: a pointer to an array of bytes to store the UTF-8 result * @outlen: the length of @out - * @in: a pointer ot an array of chars in the original encoding + * @in: a pointer to an array of chars in the original encoding * @inlen: the length of @in * * Take a block of chars in the original encoding and try to convert @@ -94,7 +94,7 @@ typedef enum { * if the transcoding failed. * The value of @inlen after return is the number of octets consumed * as the return value is positive, else unpredictiable. - * The value of @outlen after return is the number of ocetes consumed. + * The value of @outlen after return is the number of octets consumed. */ typedef int (* xmlCharEncodingInputFunc)(unsigned char* out, int *outlen, const unsigned char* in, int *inlen); @@ -102,9 +102,9 @@ typedef int (* xmlCharEncodingInputFunc)(unsigned char* out, int *outlen, /** * xmlCharEncodingOutputFunc: - * @out: a pointer ot an array of bytes to store the result + * @out: a pointer to an array of bytes to store the result * @outlen: the length of @out - * @in: a pointer ot an array of UTF-8 chars + * @in: a pointer to an array of UTF-8 chars * @inlen: the length of @in * * Take a block of UTF-8 chars in and try to convert it to an other diff --git a/include/libxml/entities.h b/include/libxml/entities.h index 33d3fcf5..4ce07519 100644 --- a/include/libxml/entities.h +++ b/include/libxml/entities.h @@ -1,5 +1,5 @@ /* - * entities.h : interface for the XML entities handking + * entities.h : interface for the XML entities handling * * See Copyright for the status of this software. * @@ -35,7 +35,7 @@ typedef enum { typedef struct _xmlEntity xmlEntity; typedef xmlEntity *xmlEntityPtr; struct _xmlEntity { - void *_private; /* for Corba, must be first ! */ + void *_private; /* application data */ xmlElementType type; /* XML_ENTITY_DECL, must be second ! */ const xmlChar *name; /* Attribute name */ struct _xmlNode *children; /* NULL */ @@ -57,8 +57,8 @@ struct _xmlEntity { }; /* - * ALl entities are stored in an hash table - * there is 2 separate hash tables for global and parmeter entities + * All entities are stored in an hash table + * there is 2 separate hash tables for global and parameter entities */ typedef struct _xmlHashTable xmlEntitiesTable; diff --git a/include/libxml/globals.h b/include/libxml/globals.h index 72454c93..35faed46 100644 --- a/include/libxml/globals.h +++ b/include/libxml/globals.h @@ -92,7 +92,7 @@ void xmlInitializeGlobalState(xmlGlobalStatePtr gs); /* * In general the memory allocation entry points are not kept - * thread specific but this can be overriden by LIBXML_THREAD_ALLOC_ENABLED + * thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED * - xmlMalloc * - xmlRealloc * - xmlMemStrdup diff --git a/include/libxml/parser.h b/include/libxml/parser.h index d86f887b..4f863c08 100644 --- a/include/libxml/parser.h +++ b/include/libxml/parser.h @@ -47,7 +47,7 @@ struct _xmlParserInput { const char *directory; /* the directory/base of the file */ const xmlChar *base; /* Base of the array to parse */ const xmlChar *cur; /* Current char being parsed */ - const xmlChar *end; /* end of the arry to parse */ + const xmlChar *end; /* end of the array to parse */ int length; /* length if known */ int line; /* Current line */ int col; /* Current column */ @@ -89,13 +89,13 @@ struct _xmlParserNodeInfoSeq { * xmlParserInputState: * * The parser is now working also as a state based parser - * The recursive one use the stagte info for entities processing + * The recursive one use the state info for entities processing */ typedef enum { XML_PARSER_EOF = -1, /* nothing is to be parsed */ XML_PARSER_START = 0, /* nothing has been parsed */ XML_PARSER_MISC, /* Misc* before int subset */ - XML_PARSER_PI, /* Whithin a processing instruction */ + XML_PARSER_PI, /* Within a processing instruction */ XML_PARSER_DTD, /* within some DTD content */ XML_PARSER_PROLOG, /* Misc* after internal subset */ XML_PARSER_COMMENT, /* within a comment */ @@ -322,9 +322,11 @@ struct _xmlSAXHandler { * xmlExternalEntityLoader: * @URL: The System ID of the resource requested * @ID: The Public ID of the resource requested - * @xmlParserCtxtPtr: the XML parser context + * @context: the XML parser context * * External entity loaders types + * + * Returns the entity input parser */ typedef xmlParserInputPtr (*xmlExternalEntityLoader)(const char *URL, const char *ID, @@ -342,14 +344,14 @@ LIBXML_DLL_IMPORT extern xmlSAXHandler htmlDefaultSAXHandler; LIBXML_DLL_IMPORT extern xmlSAXHandler docbDefaultSAXHandler; /* - * entity substitution default behaviour. + * entity substitution default behavior. */ #ifdef VMS /** * xmlSubstituteEntitiesDefaultValue: * - * global variable controlling the entity substitution default behaviour + * global variable controlling the entity substitution default behavior */ LIBXML_DLL_IMPORT extern int xmlSubstituteEntitiesDefaultVal; #define xmlSubstituteEntitiesDefaultValue xmlSubstituteEntitiesDefaultVal diff --git a/include/libxml/parserInternals.h b/include/libxml/parserInternals.h index 0f62a8cb..491d749b 100644 --- a/include/libxml/parserInternals.h +++ b/include/libxml/parserInternals.h @@ -316,25 +316,25 @@ void xmlParseExternalSubset (xmlParserCtxtPtr ctxt, /** * XML_SUBSTITUTE_NONE: * - * If no entities need to be substitued + * If no entities need to be substituted */ #define XML_SUBSTITUTE_NONE 0 /** * XML_SUBSTITUTE_REF: * - * Whether general entities need to be substitued + * Whether general entities need to be substituted */ #define XML_SUBSTITUTE_REF 1 /** * XML_SUBSTITUTE_PEREF: * - * Whether parameter entities need to be substitued + * Whether parameter entities need to be substituted */ #define XML_SUBSTITUTE_PEREF 2 /** * XML_SUBSTITUTE_BOTH: * - * Both general and parameter entities need to be substitued + * Both general and parameter entities need to be substituted */ #define XML_SUBSTITUTE_BOTH 3 @@ -365,7 +365,7 @@ int namePush (xmlParserCtxtPtr ctxt, xmlChar *value); /* - * other comodities shared between parser.c and parserInternals + * other commodities shared between parser.c and parserInternals */ int xmlSkipBlankChars (xmlParserCtxtPtr ctxt); int xmlStringCurrentChar (xmlParserCtxtPtr ctxt, diff --git a/include/libxml/tree.h b/include/libxml/tree.h index e1940868..fd6065bf 100644 --- a/include/libxml/tree.h +++ b/include/libxml/tree.h @@ -423,14 +423,14 @@ struct _xmlNode { struct _xmlNode *next; /* next sibling link */ struct _xmlNode *prev; /* previous sibling link */ struct _xmlDoc *doc; /* the containing document */ + + /* End of common part */ xmlNs *ns; /* pointer to the associated namespace */ #ifndef XML_USE_BUFFER_CONTENT xmlChar *content; /* the content */ #else xmlBufferPtr content; /* the content in a buffer */ #endif - - /* End of common part */ struct _xmlAttr *properties;/* properties list */ xmlNs *nsDef; /* namespace definitions on this node */ }; diff --git a/include/libxml/xlink.h b/include/libxml/xlink.h index 318ebcaf..e8fdf555 100644 --- a/include/libxml/xlink.h +++ b/include/libxml/xlink.h @@ -63,7 +63,7 @@ typedef enum { typedef void (*xlinkNodeDetectFunc) (void *ctx, xmlNodePtr node); /** - * The link detection module interract with the upper layers using + * The link detection module interact with the upper layers using * a set of callback registered at parsing time. */ @@ -155,7 +155,7 @@ struct _xlinkHandler { }; /* - * the default detection routine, can be overriden, they call the default + * the default detection routine, can be overridden, they call the default * detection callbacks. */ diff --git a/include/libxml/xpath.h b/include/libxml/xpath.h index 088f6ff3..42e727d2 100644 --- a/include/libxml/xpath.h +++ b/include/libxml/xpath.h @@ -303,7 +303,7 @@ int xmlXPathIsInf (double val); * xmlXPathNodeSetGetLength: * @ns: a node-set * - * Implement a functionnality similar to the DOM NodeList.length + * Implement a functionality similar to the DOM NodeList.length * * Returns the number of nodes in the node-set. */ @@ -313,7 +313,7 @@ int xmlXPathIsInf (double val); * @ns: a node-set * @index: index of a node in the set * - * Implements a functionnality similar to the DOM NodeList.item() + * Implements a functionality similar to the DOM NodeList.item() * * Returns the xmlNodePtr at the given @index in @ns or NULL if * @index is out of range (0 to length-1) @@ -377,7 +377,7 @@ void xmlXPathFreeContext (xmlXPathContextPtr ctxt); * Evaluation functions. */ xmlXPathObjectPtr xmlXPathEval (const xmlChar *str, - xmlXPathContextPtr ctxt); + xmlXPathContextPtr ctx); xmlXPathObjectPtr xmlXPathEvalExpression (const xmlChar *str, xmlXPathContextPtr ctxt); int xmlXPathEvalPredicate (xmlXPathContextPtr ctxt, diff --git a/include/libxml/xpathInternals.h b/include/libxml/xpathInternals.h index b3e0afbe..ed39e365 100644 --- a/include/libxml/xpathInternals.h +++ b/include/libxml/xpathInternals.h @@ -1,6 +1,6 @@ /* - * xpath.c: internal interfaces for XML Path Language implementation - * used to build new modules on top of XPath + * xpathInternals.c: internal interfaces for XML Path Language implementation + * used to build new modules on top of XPath * * See COPYRIGHT for the status of this software * @@ -330,7 +330,7 @@ typedef xmlXPathObjectPtr (*xmlXPathVariableLookupFunc) (void *ctxt, void xmlXPathRegisterVariableLookup (xmlXPathContextPtr ctxt, xmlXPathVariableLookupFunc f, - void *varCtxt); + void *data); /* * Function Lookup forwarding @@ -402,7 +402,7 @@ int xmlXPathRegisterNs (xmlXPathContextPtr ctxt, const xmlChar *prefix, const xmlChar *ns_uri); const xmlChar * xmlXPathNsLookup (xmlXPathContextPtr ctxt, - const xmlChar *ns_uri); + const xmlChar *prefix); void xmlXPathRegisteredNsCleanup (xmlXPathContextPtr ctxt); int xmlXPathRegisterFunc (xmlXPathContextPtr ctxt, @@ -490,7 +490,7 @@ void xmlXPathFreeNodeSet(xmlNodeSetPtr obj); xmlXPathObjectPtr xmlXPathNewNodeSet(xmlNodePtr val); xmlXPathObjectPtr xmlXPathNewNodeSetList(xmlNodeSetPtr val); xmlXPathObjectPtr xmlXPathWrapNodeSet(xmlNodeSetPtr val); - xmlXPathObjectPtr xmlXPathWrapExternal(void *val); +xmlXPathObjectPtr xmlXPathWrapExternal(void *val); void xmlXPathFreeNodeSetList(xmlXPathObjectPtr obj); diff --git a/nanoftp.c b/nanoftp.c index 7224a5ad..875e54a7 100644 --- a/nanoftp.c +++ b/nanoftp.c @@ -12,9 +12,9 @@ #define HAVE_NETINET_IN_H #define HAVE_NETDB_H #define HAVE_SYS_TIME_H -#else /* STANDALONE */ +#else /* TESTING */ #define NEED_SOCKETS -#endif /* STANDALONE */ +#endif /* TESTING */ #include "libxml.h" @@ -768,7 +768,7 @@ xmlNanoFTPCheckResponse(void *ctx) { } /** - * Send the user authentification + * Send the user authentication */ static int @@ -793,7 +793,7 @@ xmlNanoFTPSendUser(void *ctx) { } /** - * Send the password authentification + * Send the password authentication */ static int @@ -1013,7 +1013,7 @@ xmlNanoFTPConnect(void *ctx) { */ switch (proxyType) { case 0: - /* we will try in seqence */ + /* we will try in sequence */ case 1: /* Using SITE command */ snprintf(buf, sizeof(buf), "SITE %s\r\n", ctxt->hostname); diff --git a/nanohttp.c b/nanohttp.c index be92b320..4e08c5b5 100644 --- a/nanohttp.c +++ b/nanohttp.c @@ -606,7 +606,7 @@ xmlNanoHTTPReadLine(xmlNanoHTTPCtxtPtr ctxt) { * We currently parse and process: * - The HTTP revision/ return code * - The Content-Type - * - The Location for redirrect processing. + * - The Location for redirect processing. * * Returns -1 in case of failure, the file descriptor number otherwise */ @@ -685,7 +685,7 @@ xmlNanoHTTPScanAnswer(xmlNanoHTTPCtxtPtr ctxt, const char *line) { /** * xmlNanoHTTPConnectAttempt: - * @addr: a socket adress structure + * @addr: a socket address structure * * Attempt a connection to the given IP:port endpoint. It forces * non-blocking semantic on the socket, and allow 60 seconds for @@ -944,7 +944,7 @@ xmlNanoHTTPOpen(const char *URL, char **contentType) { * @URL: The URL to load * @contentType: if available the Content-Type information will be * returned at that location - * @redir: if availble the redirected URL will be returned + * @redir: if available the redirected URL will be returned * * This function try to open a connection to the indicated resource * via HTTP GET. @@ -1014,6 +1014,7 @@ xmlNanoHTTPClose(void *ctx) { * @contentType: the Content-Type information IN and OUT * @redir: the redirected URL OUT * @headers: the extra headers + * @ilen: input length * * This function try to open a connection to the indicated resource * via HTTP using the given @method, adding the given extra headers @@ -1245,6 +1246,7 @@ retry: * @input: the input string if any * @contentType: the Content-Type information IN and OUT * @headers: the extra headers + * @ilen: input length * * This function try to open a connection to the indicated resource * via HTTP using the given @method, adding the given extra headers diff --git a/parser.c b/parser.c index 5e11c3ee..870cafb6 100644 --- a/parser.c +++ b/parser.c @@ -12,7 +12,7 @@ * * Okay this is a big file, the parser core is around 7000 lines, then it * is followed by the progressive parser top routines, then the various - * high level APIs to call the parser and a few miscelaneous functions. + * high level APIs to call the parser and a few miscellaneous functions. * A number of helper functions and deprecated ones have been moved to * parserInternals.c to reduce this file size. * As much as possible the functions are associated with their relative @@ -22,7 +22,7 @@ * The DOM tree build is realized from the default SAX callbacks in * the module SAX.c. * The routines doing the validation checks are in valid.c and called either - * from the SAX callbacks or as standalones functions using a preparsed + * from the SAX callbacks or as standalone functions using a preparsed * document. * * See Copyright for the status of this software. @@ -247,7 +247,7 @@ static int spacePop(xmlParserCtxtPtr ctxt) { * * NEXT Skip to the next character, this does the proper decoding * in UTF-8 mode. It also pop-up unfinished entities on the fly. - * NEXTL(l) Skip l xmlChars in the input buffer + * NEXTL(l) Skip l xmlChar in the input buffer * CUR_CHAR(l) returns the current unicode character (int), set l * to the number of xmlChars used for the encoding [0-5]. * CUR_SCHAR same but operate on a string instead of the context @@ -527,7 +527,8 @@ xmlParseCharRef(xmlParserCtxtPtr ctxt) { } else { ctxt->errNo = XML_ERR_INVALID_CHAR; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) - ctxt->sax->error(ctxt->userData, "CharRef: invalid xmlChar value %d\n", + ctxt->sax->error(ctxt->userData, + "xmlParseCharRef: invalid xmlChar value %d\n", val); ctxt->wellFormed = 0; ctxt->disableSAX = 1; @@ -612,7 +613,7 @@ xmlParseStringCharRef(xmlParserCtxtPtr ctxt, const xmlChar **str) { ctxt->errNo = XML_ERR_INVALID_CHARREF; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, - "xmlParseCharRef: invalid value\n"); + "xmlParseStringCharRef: invalid value\n"); ctxt->wellFormed = 0; ctxt->disableSAX = 1; return(0); @@ -630,7 +631,7 @@ xmlParseStringCharRef(xmlParserCtxtPtr ctxt, const xmlChar **str) { ctxt->errNo = XML_ERR_INVALID_CHAR; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, - "CharRef: invalid xmlChar value %d\n", val); + "xmlParseStringCharRef: invalid xmlChar value %d\n", val); ctxt->wellFormed = 0; ctxt->disableSAX = 1; } @@ -667,7 +668,7 @@ xmlParseStringCharRef(xmlParserCtxtPtr ctxt, const xmlChar **str) { * http://www.w3.org/TR/REC-xml#entproc * i.e. * - Included in literal in entity values - * - Included as Paraemeter Entity reference within DTDs + * - Included as Parameter Entity reference within DTDs */ void xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) { @@ -746,11 +747,11 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) { name = xmlParseName(ctxt); if (xmlParserDebugEntities) xmlGenericError(xmlGenericErrorContext, - "PE Reference: %s\n", name); + "PEReference: %s\n", name); if (name == NULL) { ctxt->errNo = XML_ERR_PEREF_NO_NAME; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) - ctxt->sax->error(ctxt->userData, "xmlHandlePEReference: no name\n"); + ctxt->sax->error(ctxt->userData, "xmlParserHandlePEReference: no name\n"); ctxt->wellFormed = 0; ctxt->disableSAX = 1; } else { @@ -803,7 +804,7 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) { /* * handle the extra spaces added before and after * c.f. http://www.w3.org/TR/REC-xml#as-PE - * this is done independantly. + * this is done independently. */ input = xmlNewEntityInputStream(ctxt, entity); xmlPushInput(ctxt, input); @@ -834,7 +835,7 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) { } else { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, - "xmlHandlePEReference: %s is not a parameter entity\n", + "xmlParserHandlePEReference: %s is not a parameter entity\n", name); ctxt->wellFormed = 0; ctxt->disableSAX = 1; @@ -844,7 +845,7 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) { ctxt->errNo = XML_ERR_PEREF_SEMICOL_MISSING; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, - "xmlHandlePEReference: expecting ';'\n"); + "xmlParserHandlePEReference: expecting ';'\n"); ctxt->wellFormed = 0; ctxt->disableSAX = 1; } @@ -874,7 +875,7 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) { * @end2: an end marker xmlChar, 0 if none * @end3: an end marker xmlChar, 0 if none * - * Takes a entity string content and process to do the adequate subtitutions. + * Takes a entity string content and process to do the adequate substitutions. * * [67] Reference ::= EntityRef | CharRef * @@ -913,12 +914,12 @@ xmlStringDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int what, buffer_size = XML_PARSER_BIG_BUFFER_SIZE; buffer = (xmlChar *) xmlMalloc(buffer_size * sizeof(xmlChar)); if (buffer == NULL) { - perror("xmlDecodeEntities: malloc failed"); + perror("xmlStringDecodeEntities: malloc failed"); return(NULL); } /* - * Ok loop until we reach one of the ending char or a size limit. + * OK loop until we reach one of the ending char or a size limit. * we are operating on already parsed values. */ c = CUR_SCHAR(str, l); @@ -1276,7 +1277,7 @@ xmlStrncasecmp(const xmlChar *str1, const xmlChar *str2, int len) { * * a strchr for xmlChar's * - * Returns the xmlChar * for the first occurence or NULL. + * Returns the xmlChar * for the first occurrence or NULL. */ const xmlChar * @@ -1296,7 +1297,7 @@ xmlStrchr(const xmlChar *str, xmlChar val) { * * a strstr for xmlChar's * - * Returns the xmlChar * for the first occurence or NULL. + * Returns the xmlChar * for the first occurrence or NULL. */ const xmlChar * @@ -1324,7 +1325,7 @@ xmlStrstr(const xmlChar *str, const xmlChar *val) { * * a case-ignoring strstr for xmlChar's * - * Returns the xmlChar * for the first occurence or NULL. + * Returns the xmlChar * for the first occurrence or NULL. */ const xmlChar * @@ -1352,7 +1353,7 @@ xmlStrcasestr(const xmlChar *str, xmlChar *val) { * * Extract a substring of a given string * - * Returns the xmlChar * for the first occurence or NULL. + * Returns the xmlChar * for the first occurrence or NULL. */ xmlChar * @@ -1398,7 +1399,7 @@ xmlStrlen(const xmlChar *str) { * @add: the xmlChar * array added * @len: the length of @add * - * a strncat for array of xmlChar's, it will extend cur with the len + * a strncat for array of xmlChar's, it will extend @cur with the len * first bytes of @add. * * Returns a new xmlChar *, the original @cur is reallocated if needed @@ -1492,7 +1493,7 @@ static int areBlanks(xmlParserCtxtPtr ctxt, const xmlChar *str, int len) { if (!(IS_BLANK(str[i]))) return(0); /* - * Look if the element is mixed content in the Dtd if available + * Look if the element is mixed content in the DTD if available */ if (ctxt->node == NULL) return(0); if (ctxt->myDoc != NULL) { @@ -1521,7 +1522,7 @@ static int areBlanks(xmlParserCtxtPtr ctxt, const xmlChar *str, int len) { } /* - * Forward definition for recusive behaviour. + * Forward definition for recursive behavior. */ void xmlParsePEReference(xmlParserCtxtPtr ctxt); void xmlParseReference(xmlParserCtxtPtr ctxt); @@ -1822,7 +1823,7 @@ xmlParseNameComplex(xmlParserCtxtPtr ctxt) { * * [6] Names ::= Name (S Name)* * - * Returns the Name parsed or NULL. The str pointer + * Returns the Name parsed or NULL. The @str pointer * is updated to the current location in the string. */ @@ -1959,7 +1960,7 @@ xmlParseNmtoken(xmlParserCtxtPtr ctxt) { if (buffer == NULL) { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, - "xmlParseNameComplex: out of memory\n"); + "xmlParseNmtoken: out of memory\n"); return(NULL); } } @@ -1986,7 +1987,7 @@ xmlParseNmtoken(xmlParserCtxtPtr ctxt) { * [9] EntityValue ::= '"' ([^%&"] | PEReference | Reference)* '"' | * "'" ([^%&'] | PEReference | Reference)* "'" * - * Returns the EntityValue parsed with reference substitued or NULL + * Returns the EntityValue parsed with reference substituted or NULL */ xmlChar * @@ -2203,7 +2204,7 @@ xmlParseAttValue(xmlParserCtxtPtr ctxt) { } /* - * Ok loop until we reach one of the ending char or a size limit. + * OK loop until we reach one of the ending char or a size limit. */ c = CUR_CHAR(l); while (((NXT(0) != limit) && /* checked */ @@ -2644,7 +2645,7 @@ xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata) { COPY_BUF(l,buf,nbchar,cur); if (nbchar >= XML_PARSER_BIG_BUFFER_SIZE) { /* - * Ok the segment is to be consumed as chars. + * OK the segment is to be consumed as chars. */ if ((ctxt->sax != NULL) && (!ctxt->disableSAX)) { if (areBlanks(ctxt, buf, nbchar)) { @@ -2668,7 +2669,7 @@ xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata) { } if (nbchar != 0) { /* - * Ok the segment is to be consumed as chars. + * OK the segment is to be consumed as chars. */ if ((ctxt->sax != NULL) && (!ctxt->disableSAX)) { if (areBlanks(ctxt, buf, nbchar)) { @@ -2691,7 +2692,7 @@ xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata) { * * Parse an External ID or a Public ID * - * NOTE: Productions [75] and [83] interract badly since [75] can generate + * NOTE: Productions [75] and [83] interact badly since [75] can generate * 'PUBLIC' S PubidLiteral S SystemLiteral * * [75] ExternalID ::= 'SYSTEM' S SystemLiteral @@ -2954,7 +2955,7 @@ xmlParsePITarget(xmlParserCtxtPtr ctxt) { if ((ctxt->sax != NULL) && (ctxt->sax->warning != NULL)) { ctxt->errNo = XML_ERR_RESERVED_XML_NAME; ctxt->sax->warning(ctxt->userData, - "xmlParsePItarget: invalid name prefix 'xml'\n"); + "xmlParsePITarget: invalid name prefix 'xml'\n"); } } return(name); @@ -4209,7 +4210,7 @@ xmlParseElementMixedContentDecl(xmlParserCtxtPtr ctxt) { * * [ VC: Proper Group/PE Nesting ] applies to [49] and [50] * TODO Parameter-entity replacement text must be properly nested - * with parenthetized groups. That is to say, if either of the + * with parenthesized groups. That is to say, if either of the * opening or closing parentheses in a choice, seq, or Mixed * construct is contained in the replacement text for a parameter * entity, both must be contained in the same replacement text. For @@ -4802,7 +4803,7 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) { } /* - * Parse up to the end of the conditionnal section + * Parse up to the end of the conditional section * But disable SAX event generating DTD building in the meantime */ state = ctxt->disableSAX; @@ -5183,7 +5184,7 @@ xmlParseReference(xmlParserCtxtPtr ctxt) { * * ANSWER: since lt gt amp .. are already defined, * this is a redefinition and hence the fact that the - * contentis not well balanced is not a Wf error, this + * content is not well balanced is not a Wf error, this * is lousy but acceptable. */ list = xmlNewDocText(ctxt->myDoc, value); @@ -5291,7 +5292,7 @@ xmlParseReference(xmlParserCtxtPtr ctxt) { /* * Seems we are generating the DOM content, do * a simple tree copy for all references except the first - * In the first occurence list contains the replacement + * In the first occurrence list contains the replacement */ if (list == NULL) { xmlNodePtr new, cur; @@ -5306,8 +5307,8 @@ xmlParseReference(xmlParserCtxtPtr ctxt) { } else { /* * the name change is to avoid coalescing of the - * node with a prossible previous text one which - * would make ent->children a dandling pointer + * node with a possible previous text one which + * would make ent->children a dangling pointer */ if (ent->children->type == XML_TEXT_NODE) ent->children->name = xmlStrdup(BAD_CAST "nbktext"); @@ -5728,7 +5729,7 @@ xmlParseStringEntityRef(xmlParserCtxtPtr ctxt, const xmlChar ** str) { * [ WFC: No Recursion ] * A parsed entity must not contain a recursive reference * to itself, either directly or indirectly. - * Done somewhwere else + * Done somewhere else */ } else { @@ -6084,7 +6085,7 @@ xmlParseDocTypeDecl(xmlParserCtxtPtr ctxt) { } /** - * xmlParseInternalsubset: + * xmlParseInternalSubset: * @ctxt: an XML parser context * * parse the internal subset declaration @@ -6474,7 +6475,7 @@ xmlParseEndTag(xmlParserCtxtPtr ctxt) { ctxt->name, name); } else if (ctxt->name != NULL) { ctxt->sax->error(ctxt->userData, - "Ending tag eror for: %s\n", ctxt->name); + "Ending tag error for: %s\n", ctxt->name); } else { ctxt->sax->error(ctxt->userData, "Ending tag error: internal error ???\n"); @@ -6609,7 +6610,7 @@ xmlParseCDSect(xmlParserCtxtPtr ctxt) { NEXTL(l); /* - * Ok the buffer is to be consumed as cdata. + * OK the buffer is to be consumed as cdata. */ if ((ctxt->sax != NULL) && (!ctxt->disableSAX)) { if (ctxt->sax->cdataBlock != NULL) @@ -7406,7 +7407,7 @@ xmlParseXMLDecl(xmlParserCtxtPtr ctxt) { * xmlParseMisc: * @ctxt: an XML parser context * - * parse an XML Misc* optionnal field. + * parse an XML Misc* optional field. * * [27] Misc ::= Comment | PI | S */ @@ -7595,7 +7596,7 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) { * xmlParseExtParsedEnt: * @ctxt: an XML parser context * - * parse a genreral parsed entity + * parse a general parsed entity * An external general parsed entity is well-formed if it matches the * production labeled extParsedEnt. * @@ -8382,7 +8383,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) { * a sequence of blank chars and the next one is * not available to check against '<' presence. * - tries to homogenize the differences in SAX - * callbacks beween the push and pull versions + * callbacks between the push and pull versions * of the parser. */ if ((ctxt->inputNr == 1) && @@ -8851,7 +8852,7 @@ xmlCreateIOParserCtxt(xmlSAXHandlerPtr sax, void *user_data, /************************************************************************ * * - * Front ends when parsing a Dtd * + * Front ends when parsing a DTD * * * ************************************************************************/ @@ -9670,7 +9671,7 @@ xmlParseEntity(const char *filename) { * xmlCreateEntityParserCtxt: * @URL: the entity URL * @ID: the entity PUBLIC ID - * @base: a posible base for the target URI + * @base: a possible base for the target URI * * Create a parser context for an external entity * Automatic support for ZLIB/Compress compressed document is provided diff --git a/parserInternals.c b/parserInternals.c index 4c097d93..f7ca6464 100644 --- a/parserInternals.c +++ b/parserInternals.c @@ -1,6 +1,6 @@ /* - * parser.c : Internal routines (and obsolete ones) needed for the - * XML and HTML parsers. + * parserInternals.c : Internal routines (and obsolete ones) needed for the + * XML and HTML parsers. * * See Copyright for the status of this software. * @@ -956,7 +956,7 @@ xmlParserInputRead(xmlParserInputPtr in, int len) { ret = xmlParserInputBufferRead(in->buf, len); if (in->base != in->buf->buffer->content) { /* - * the buffer has been realloced + * the buffer has been reallocated */ indx = in->cur - in->base; in->base = in->buf->buffer->content; @@ -1015,7 +1015,7 @@ xmlParserInputGrow(xmlParserInputPtr in, int len) { */ if (in->base != in->buf->buffer->content) { /* - * the buffer has been realloced + * the buffer has been reallocated */ indx = in->cur - in->base; in->base = in->buf->buffer->content; @@ -1053,7 +1053,7 @@ xmlParserInputShrink(xmlParserInputPtr in) { used = in->cur - in->buf->buffer->content; /* * Do not shrink on large buffers whose only a tiny fraction - * was consumned + * was consumed */ if ((int) in->buf->buffer->use > used + 2 * INPUT_CHUNK) return; @@ -1074,7 +1074,7 @@ xmlParserInputShrink(xmlParserInputPtr in) { xmlParserInputBufferRead(in->buf, 2 * INPUT_CHUNK); if (in->base != in->buf->buffer->content) { /* - * the buffer has been realloced + * the buffer has been ereallocated */ indx = in->cur - in->base; in->base = in->buf->buffer->content; @@ -1192,7 +1192,7 @@ xmlNextChar(xmlParserCtxtPtr ctxt) { } else { /* * Assume it's a fixed length encoding (1) with - * a compatibke encoding for the ASCII set, since + * a compatible encoding for the ASCII set, since * XML constructs only use < 128 chars */ ctxt->input->cur++; @@ -1216,7 +1216,7 @@ xmlNextChar(xmlParserCtxtPtr ctxt) { encoding_error: /* * If we detect an UTF8 error that probably mean that the - * input encoding didn't get properly advertized in the + * input encoding didn't get properly advertised in the * declaration header. Report the error and switch the encoding * to ISO-Latin-1 (if you don't like this policy, just declare the * encoding !) @@ -1240,7 +1240,7 @@ encoding_error: * @ctxt: the XML parser context * @len: pointer to the length of the char read * - * The current char value, if using UTF-8 this may actaully span multiple + * The current char value, if using UTF-8 this may actually span multiple * bytes in the input buffer. Implement the end of line normalization: * 2.11 End-of-Line Handling * Wherever an external parsed entity or the literal entity value @@ -1344,7 +1344,7 @@ xmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) { } /* * Assume it's a fixed length encoding (1) with - * a compatibke encoding for the ASCII set, since + * a compatible encoding for the ASCII set, since * XML constructs only use < 128 chars */ *len = 1; @@ -1359,7 +1359,7 @@ xmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) { encoding_error: /* * If we detect an UTF8 error that probably mean that the - * input encoding didn't get properly advertized in the + * input encoding didn't get properly advertised in the * declaration header. Report the error and switch the encoding * to ISO-Latin-1 (if you don't like this policy, just declare the * encoding !) @@ -1384,7 +1384,7 @@ encoding_error: * @cur: pointer to the beginning of the char * @len: pointer to the length of the char read * - * The current char value, if using UTF-8 this may actaully span multiple + * The current char value, if using UTF-8 this may actually span multiple * bytes in the input buffer. * * Returns the current char value and its length @@ -1456,7 +1456,7 @@ xmlStringCurrentChar(xmlParserCtxtPtr ctxt, const xmlChar *cur, int *len) { } /* * Assume it's a fixed length encoding (1) with - * a compatibke encoding for the ASCII set, since + * a compatible encoding for the ASCII set, since * XML constructs only use < 128 chars */ *len = 1; @@ -1464,7 +1464,7 @@ xmlStringCurrentChar(xmlParserCtxtPtr ctxt, const xmlChar *cur, int *len) { encoding_error: /* * If we detect an UTF8 error that probably mean that the - * input encoding didn't get properly advertized in the + * input encoding didn't get properly advertised in the * declaration header. Report the error and switch the encoding * to ISO-Latin-1 (if you don't like this policy, just declare the * encoding !) @@ -1484,7 +1484,7 @@ encoding_error: /** * xmlCopyCharMultiByte: - * @out: pointer to an arry of xmlChar + * @out: pointer to an array of xmlChar * @val: the char value * * append the char value in the array @@ -1510,7 +1510,7 @@ xmlCopyCharMultiByte(xmlChar *out, int val) { else if (val < 0x110000) { *out++= (val >> 18) | 0xF0; bits= 12; } else { xmlGenericError(xmlGenericErrorContext, - "Internal error, xmlCopyChar 0x%X out of bound\n", + "Internal error, xmlCopyCharMultiByte 0x%X out of bound\n", val); return(0); } @@ -1525,7 +1525,7 @@ xmlCopyCharMultiByte(xmlChar *out, int val) { /** * xmlCopyChar: * @len: Ignored, compatibility - * @out: pointer to an arry of xmlChar + * @out: pointer to an array of xmlChar * @val: the char value * * append the char value in the array @@ -1775,7 +1775,7 @@ xmlSwitchToEncoding(xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler) } /* - * Shring the current input buffer. + * Shrink the current input buffer. * Move it as the raw buffer and create a new input buffer */ processed = ctxt->input->cur - ctxt->input->base; @@ -1785,7 +1785,7 @@ xmlSwitchToEncoding(xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler) if (ctxt->html) { /* - * converst as much as possbile of the buffer + * convert as much as possible of the buffer */ nbchars = xmlCharEncInFunc(ctxt->input->buf->encoder, ctxt->input->buf->buffer, @@ -1821,13 +1821,13 @@ xmlSwitchToEncoding(xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler) */ if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, - "xmlSwitchEncoding : no input\n"); + "xmlSwitchToEncoding : no input\n"); return(-1); } else { int processed; /* - * Shring the current input buffer. + * Shrink the current input buffer. * Move it as the raw buffer and create a new input buffer */ processed = ctxt->input->cur - ctxt->input->base; @@ -1865,7 +1865,7 @@ xmlSwitchToEncoding(xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler) } else { if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, - "xmlSwitchEncoding : no input\n"); + "xmlSwitchToEncoding : no input\n"); return(-1); } /* @@ -2561,8 +2561,8 @@ xmlLineNumbersDefault(int val) { * Set and return the previous value for default entity support. * Initially the parser always keep entity references instead of substituting * entity values in the output. This function has to be used to change the - * default parser behaviour - * SAX::subtituteEntities() has to be used for changing that on a file by + * default parser behavior + * SAX::substituteEntities() has to be used for changing that on a file by * file basis. * * Returns the last value for 0 for no substitution, 1 for substitution. @@ -2589,7 +2589,7 @@ xmlSubstituteEntitiesDefault(int val) { * ignorableWhitespace() are only generated when running the parser in * validating mode and when the current element doesn't allow CDATA or * mixed content. - * This function is provided as a way to force the standard behaviour + * This function is provided as a way to force the standard behavior * on 1.X libs and to switch back to the old mode for compatibility when * running 1.X client code on 2.X . Upgrade of 1.X code should be done * by using xmlIsBlankNode() commodity function to detect the "empty" @@ -2750,7 +2750,7 @@ xmlDecodeEntities(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED, int len ATTRIBUTE_UNUS } /* - * Ok loop until we reach one of the ending char or a size limit. + * OK loop until we reach one of the ending char or a size limit. */ GROW; c = CUR_CHAR(l); @@ -3281,7 +3281,7 @@ xmlScanName(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED) { * [66] CharRef ::= '&#' [0-9]+ ';' | * '&#x' [0-9a-fA-F]+ ';' * - * A PEReference may have been detectect in the current input stream + * 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 */ @@ -3344,7 +3344,7 @@ xmlParserHandleReference(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED) { ctxt->errNo = XML_ERR_CHARREF_IN_DTD; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, - "CharRef are forbiden in DTDs!\n"); + "CharRef are forbidden in DTDs!\n"); ctxt->wellFormed = 0; ctxt->disableSAX = 1; return; @@ -3416,7 +3416,7 @@ xmlParserHandleReference(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED) { /* * NOTE: in the case of attributes values, we don't do the * substitution here unless we are in a mode where - * the parser is explicitely asked to substitute + * the parser is explicitly asked to substitute * entities. The SAX callback is called with values * without entity substitution. * This will then be handled by xmlStringDecodeEntities @@ -3432,7 +3432,7 @@ xmlParserHandleReference(xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED) { ctxt->errNo = XML_ERR_ENTITYREF_IN_DTD; if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ctxt->sax->error(ctxt->userData, - "Entity references are forbiden in DTDs!\n"); + "Entity references are forbidden in DTDs!\n"); ctxt->wellFormed = 0; ctxt->disableSAX = 1; return; @@ -3582,7 +3582,7 @@ handle_as_char: * Creation of a Namespace, the old way using PI and without scoping * DEPRECATED !!! * It now create a namespace on the root element of the document if found. - * Returns NULL this functionnality had been removed + * Returns NULL this functionality had been removed */ xmlNsPtr xmlNewGlobalNs(xmlDocPtr doc ATTRIBUTE_UNUSED, const xmlChar *href ATTRIBUTE_UNUSED, @@ -3651,7 +3651,7 @@ xmlUpgradeOldNs(xmlDocPtr doc ATTRIBUTE_UNUSED) { static int deprecated = 0; if (!deprecated) { xmlGenericError(xmlGenericErrorContext, - "xmlNewGlobalNs() deprecated function reached\n"); + "xmlUpgradeOldNs() deprecated function reached\n"); deprecated = 1; } #if 0 diff --git a/testSAX.c b/testSAX.c index a6a0d799..0bf394f3 100644 --- a/testSAX.c +++ b/testSAX.c @@ -1,5 +1,5 @@ /* - * tester.c : a small tester program for parsing using the SAX API. + * testSAX.c : a small tester program for parsing using the SAX API. * * See Copyright for the status of this software. * diff --git a/threads.c b/threads.c index 6b32207d..be3b1316 100644 --- a/threads.c +++ b/threads.c @@ -260,7 +260,7 @@ xmlFreeGlobalState(void *state) * * xmlNewGlobalState() allocates a global state. This structure is used to * hold all data for use by a thread when supporting backwards compatibility - * of libmxml2 to pre-thread-safe behaviour. + * of libxml2 to pre-thread-safe behaviour. * * Returns the newly allocated xmlGlobalStatePtr or NULL in case of error */ @@ -335,7 +335,7 @@ xmlGetThreadId(void) /** * xmlIsMainThread: * - * xmlIsMainThread() check wether the current thread is the main thread. + * xmlIsMainThread() check whether the current thread is the main thread. * * Returns 1 if the current thread is the main thread, 0 otherwise */ diff --git a/tree.c b/tree.c index 4ce89200..b75f304a 100644 --- a/tree.c +++ b/tree.c @@ -413,7 +413,7 @@ xmlFreeDtd(xmlDtdPtr cur) { xmlNodePtr next, c = cur->children; /* - * Cleanup all the DTD comments they are not in the Dtd + * Cleanup all the DTD comments they are not in the DTD * indexes. */ while (c != NULL) { @@ -1628,7 +1628,7 @@ xmlNewReference(xmlDocPtr doc, const xmlChar *name) { xmlBufferAdd(cur->content, ent->content, -1); #endif /* - * The parent pointer in entity is a Dtd pointer and thus is NOT + * The parent pointer in entity is a DTD pointer and thus is NOT * updated. Not sure if this is 100% correct. * -George */ @@ -2380,7 +2380,7 @@ xmlFreeNodeList(xmlNodePtr cur) { * * The xmlStrEqual comparisons need to be done when (happened with * XML::libXML and XML::libXSLT) the library is included twice - * statically in the binary and a tree allocated by one occurent + * statically in the binary and a tree allocated by one occurrence * of the lib gets freed by the other occurrence, in this case * the string addresses compare are not sufficient. */ @@ -2447,7 +2447,7 @@ xmlFreeNode(xmlNodePtr cur) { * * The xmlStrEqual comparisons need to be done when (happened with * XML::libXML and XML::libXSLT) the library is included twice statically - * in the binary and a tree allocated by one occurent of the lib gets + * in the binary and a tree allocated by one occurence of the lib gets * freed by the other occurrence, in this case the string addresses compare * are not sufficient. */ @@ -2955,7 +2955,7 @@ xmlCopyDtd(xmlDtdPtr dtd) { * @recursive: if 1 do a recursive copy. * * Do a copy of the document info. If recursive, the content tree will - * be copied too as well as Dtd, namespaces and entities. + * be copied too as well as DTD, namespaces and entities. * * Returns: a new #xmlDocPtr, or NULL in case of error. */ diff --git a/trio.c b/trio.c index 1d6ea6a4..76d46baf 100644 --- a/trio.c +++ b/trio.c @@ -825,7 +825,7 @@ TrioGetPosition(const char *format, * TrioFindNamespace [private] * * Find registered user-defined specifier. - * The prev argument is used for optimisation only. + * The prev argument is used for optimization only. */ static userdef_T * TrioFindNamespace(const char *name, userdef_T **prev) @@ -4025,7 +4025,7 @@ trio_print_pointer(void *ref, * The subtraction of the null pointer is a workaround * to avoid a compiler warning. The performance overhead * is negligible (and likely to be removed by an - * optimising compiler). The (char *) casting is done + * optimizing compiler). The (char *) casting is done * to please ANSI C++. */ number = (trio_uintmax_t)((char *)pointer - (char *)0); @@ -4264,7 +4264,7 @@ TrioGetCharacterClass(const char *format, if (internalCollationUnconverted) { - /* Lazy evalutation of collation array */ + /* Lazy evaluation of collation array */ TrioGetCollation(); internalCollationUnconverted = FALSE; } @@ -4832,7 +4832,7 @@ TrioReadDouble(trio_T *self, } if (StrEqual(doubleString, NAN_LOWER)) { - /* NaN must not have a preceeding + nor - */ + /* NaN must not have a preceding + nor - */ *target = trio_nan(); return TRUE; } diff --git a/trionan.c b/trionan.c index cc564440..b2a5ec2e 100644 --- a/trionan.c +++ b/trionan.c @@ -110,7 +110,7 @@ static const char rcsid[] = "@(#)$Id$"; * maximum exponent is 10 bits wide (2^10 == 1024). * o DBL_MANT_DIG == 53: The mantissa is 52 bits wide, but because * numbers are normalized the initial binary 1 is represented - * implictly (the so-called "hidden bit"), which leaves us with + * implicitly (the so-called "hidden bit"), which leaves us with * the ability to represent 53 bits wide mantissa. */ #if (FLT_RADIX == 2) && (DBL_MAX_EXP == 1024) && (DBL_MANT_DIG == 53) diff --git a/uri.c b/uri.c index a20eec98..c68a01c0 100644 --- a/uri.c +++ b/uri.c @@ -19,7 +19,7 @@ /************************************************************************ * * - * Macros to differenciate various character type * + * Macros to differentiate various character type * * directly extracted from RFC 2396 * * * ************************************************************************/ @@ -797,7 +797,7 @@ xmlNormalizeURIPath(char *path) { * xmlURIUnescapeString: * @str: the string to unescape * @len: the length in bytes to unescape (or <= 0 to indicate full string) - * @target: optionnal destination buffer + * @target: optional destination buffer * * Unescaping routine, does not do validity checks ! * Output is direct unsigned char translation of %XX values (no encoding) @@ -879,7 +879,7 @@ xmlURIEscapeStr(const xmlChar *str, const xmlChar *list) { ret = (xmlChar *) xmlMalloc(len); if (ret == NULL) { xmlGenericError(xmlGenericErrorContext, - "xmlURIEscape: out of memory\n"); + "xmlURIEscapeStr: out of memory\n"); return(NULL); } in = (const xmlChar *) str; @@ -890,7 +890,7 @@ xmlURIEscapeStr(const xmlChar *str, const xmlChar *list) { ret = (xmlChar *) xmlRealloc(ret, len); if (ret == NULL) { xmlGenericError(xmlGenericErrorContext, - "xmlURIEscape: out of memory\n"); + "xmlURIEscapeStr: out of memory\n"); return(NULL); } } @@ -1500,7 +1500,7 @@ xmlParseURIAuthority(xmlURIPtr uri, const char **str) { * @uri: pointer to an URI structure * @str: pointer to the string to analyze * - * Parse an URI hirarchical part + * Parse an URI hierarchical part * * hier_part = ( net_path | abs_path ) [ "?" query ] * abs_path = "/" path_segments @@ -1658,7 +1658,7 @@ xmlParseURIReference(xmlURIPtr uri, const char *str) { xmlCleanURI(uri); /* - * Try first to parse aboslute refs, then fallback to relative if + * Try first to parse absolute refs, then fallback to relative if * it fails. */ ret = xmlParseAbsoluteURI(uri, &str); diff --git a/valid.c b/valid.c index 35c2acb6..0ee4c330 100644 --- a/valid.c +++ b/valid.c @@ -72,7 +72,7 @@ scope type name##VPop(xmlValidCtxtPtr ctxt) { \ /* * I use a home made algorithm less complex and easier to - * debug/maintin than a generic NFA -> DFA state based algo. The + * debug/maintain than a generic NFA -> DFA state based algo. The * only restriction is on the deepness of the tree limited by the * size of the occurs bitfield * @@ -85,7 +85,7 @@ scope type name##VPop(xmlValidCtxtPtr ctxt) { \ typedef struct _xmlValidState { xmlElementContentPtr cont; /* pointer to the content model subtree */ xmlNodePtr node; /* pointer to the current node in the list */ - long occurs;/* bitfield for multiple occurences */ + long occurs;/* bitfield for multiple occurrences */ unsigned char depth; /* current depth in the overall tree */ unsigned char state; /* ROLLBACK_XXX */ } _xmlValidState; @@ -302,7 +302,7 @@ xmlValidStateDebug(xmlValidCtxtPtr ctxt) { #define DEBUG_VALID_MSG(m) #endif -/* TODO: use hash table for accesses to elem and attribute dedinitions */ +/* TODO: use hash table for accesses to elem and attribute definitions */ #define VERROR \ if ((ctxt != NULL) && (ctxt->error != NULL)) ctxt->error @@ -390,7 +390,7 @@ xmlSplitQName2(const xmlChar *name, xmlChar **prefix) { * * Allocate an element content structure. * - * Returns NULL if not, othervise the new element content structure + * Returns NULL if not, otherwise the new element content structure */ xmlElementContentPtr xmlNewElementContent(xmlChar *name, xmlElementContentType type) { @@ -722,7 +722,7 @@ xmlFreeElement(xmlElementPtr elem) { * * Register a new element declaration * - * Returns NULL if not, othervise the entity + * Returns NULL if not, otherwise the entity */ xmlElementPtr xmlAddElementDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *name, @@ -821,7 +821,7 @@ xmlAddElementDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *name, if (ret != NULL) { if (ret->etype != XML_ELEMENT_TYPE_UNDEFINED) { /* - * The element is already defined in this Dtd. + * The element is already defined in this DTD. */ VERROR(ctxt->userData, "Redefinition of element %s\n", name); if (uqname != NULL) @@ -850,7 +850,7 @@ xmlAddElementDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *name, */ if (xmlHashAddEntry2(table, name, ns, ret)) { /* - * The element is already defined in this Dtd. + * The element is already defined in this DTD. */ VERROR(ctxt->userData, "Redefinition of element %s\n", name); xmlFreeElement(ret); @@ -868,7 +868,7 @@ xmlAddElementDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *name, ret->attributes = oldAttributes; /* - * Link it to the Dtd + * Link it to the DTD */ ret->parent = dtd; ret->doc = dtd->doc; @@ -1133,7 +1133,7 @@ xmlScanAttributeDeclCallback(xmlAttributePtr attr, xmlAttributePtr *list, * @elem: the element name * * When inserting a new element scan the DtD for existing attributes - * for taht element and initialize the Attribute chain + * for that element and initialize the Attribute chain * * Returns the pointer to the first attribute decl in the chain, * possibly NULL. @@ -1232,7 +1232,7 @@ xmlFreeAttribute(xmlAttributePtr attr) { * Register a new attribute declaration * Note that @tree becomes the ownership of the DTD * - * Returns NULL if not new, othervise the attribute decl + * Returns NULL if not new, otherwise the attribute decl */ xmlAttributePtr xmlAddAttributeDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *elem, @@ -1340,7 +1340,7 @@ xmlAddAttributeDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *elem, */ if (xmlHashAddEntry3(table, name, ns, elem, ret) < 0) { /* - * The attribute is already defined in this Dtd. + * The attribute is already defined in this DTD. */ VWARNING(ctxt->userData, "Attribute %s on %s: already defined\n", @@ -1363,7 +1363,7 @@ xmlAddAttributeDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *elem, elem, name); /* * Insert namespace default def first they need to be - * processed firt. + * processed first. */ if ((xmlStrEqual(ret->name, BAD_CAST "xmlns")) || ((ret->prefix != NULL && @@ -1392,7 +1392,7 @@ xmlAddAttributeDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *elem, } /* - * Link it to the Dtd + * Link it to the DTD */ ret->parent = dtd; ret->doc = dtd->doc; @@ -1515,7 +1515,7 @@ xmlDumpAttributeDecl(xmlBufferPtr buf, xmlAttributePtr attr) { break; default: xmlGenericError(xmlGenericErrorContext, - "xmlDumpAttributeTable: internal: unknown type %d\n", + "xmlDumpAttributeDecl: internal: unknown type %d\n", attr->atype); } switch (attr->def) { @@ -1532,7 +1532,7 @@ xmlDumpAttributeDecl(xmlBufferPtr buf, xmlAttributePtr attr) { break; default: xmlGenericError(xmlGenericErrorContext, - "xmlDumpAttributeTable: internal: unknown default %d\n", + "xmlDumpAttributeDecl: internal: unknown default %d\n", attr->def); } if (attr->defaultValue != NULL) { @@ -1601,7 +1601,7 @@ xmlFreeNotation(xmlNotationPtr nota) { * * Register a new notation declaration * - * Returns NULL if not, othervise the entity + * Returns NULL if not, otherwise the entity */ xmlNotationPtr xmlAddNotationDecl(xmlValidCtxtPtr ctxt ATTRIBUTE_UNUSED, xmlDtdPtr dtd, @@ -1803,7 +1803,7 @@ xmlFreeID(xmlIDPtr id) { * * Register a new id declaration * - * Returns NULL if not, othervise the new xmlIDPtr + * Returns NULL if not, otherwise the new xmlIDPtr */ xmlIDPtr xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value, @@ -1813,17 +1813,17 @@ xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value, if (doc == NULL) { xmlGenericError(xmlGenericErrorContext, - "xmlAddIDDecl: doc == NULL\n"); + "xmlAddID: doc == NULL\n"); return(NULL); } if (value == NULL) { xmlGenericError(xmlGenericErrorContext, - "xmlAddIDDecl: value == NULL\n"); + "xmlAddID: value == NULL\n"); return(NULL); } if (attr == NULL) { xmlGenericError(xmlGenericErrorContext, - "xmlAddIDDecl: attr == NULL\n"); + "xmlAddID: attr == NULL\n"); return(NULL); } @@ -1854,7 +1854,7 @@ xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value, if (xmlHashAddEntry(table, value, ret) < 0) { /* - * The id is already defined in this Dtd. + * The id is already defined in this DTD. */ VERROR(ctxt->userData, "ID %s already defined\n", value); xmlFreeID(ret); @@ -1880,7 +1880,7 @@ xmlFreeIDTable(xmlIDTablePtr table) { * @elem: the element carrying the attribute * @attr: the attribute * - * Determine whether an attribute is of type ID. In case we have Dtd(s) + * Determine whether an attribute is of type ID. In case we have DTD(s) * then this is simple, otherwise we use an heuristic: name ID (upper * or lowercase). * @@ -2048,7 +2048,7 @@ xmlFreeRefList(xmlListPtr list_ref) { * @data: Contents of current link * @user: Value supplied by the user * - * Return 0 to abort the walk or 1 to continue + * Returns 0 to abort the walk or 1 to continue */ static int xmlWalkRemoveRef(const void *data, const void *user) @@ -2073,7 +2073,7 @@ xmlWalkRemoveRef(const void *data, const void *user) * * Register a new ref declaration * - * Returns NULL if not, othervise the new xmlRefPtr + * Returns NULL if not, otherwise the new xmlRefPtr */ xmlRefPtr xmlAddRef(xmlValidCtxtPtr ctxt ATTRIBUTE_UNUSED, xmlDocPtr doc, const xmlChar *value, @@ -2084,17 +2084,17 @@ xmlAddRef(xmlValidCtxtPtr ctxt ATTRIBUTE_UNUSED, xmlDocPtr doc, const xmlChar *v if (doc == NULL) { xmlGenericError(xmlGenericErrorContext, - "xmlAddRefDecl: doc == NULL\n"); + "xmlAddRef: doc == NULL\n"); return(NULL); } if (value == NULL) { xmlGenericError(xmlGenericErrorContext, - "xmlAddRefDecl: value == NULL\n"); + "xmlAddRef: value == NULL\n"); return(NULL); } if (attr == NULL) { xmlGenericError(xmlGenericErrorContext, - "xmlAddRefDecl: attr == NULL\n"); + "xmlAddRef: attr == NULL\n"); return(NULL); } @@ -2164,7 +2164,7 @@ xmlFreeRefTable(xmlRefTablePtr table) { * @elem: the element carrying the attribute * @attr: the attribute * - * Determine whether an attribute is of type Ref. In case we have Dtd(s) + * Determine whether an attribute is of type Ref. In case we have DTD(s) * then this is simple, otherwise we use an heuristic: name Ref (upper * or lowercase). * @@ -2264,12 +2264,12 @@ xmlGetRefs(xmlDocPtr doc, const xmlChar *ID) { xmlRefTablePtr table; if (doc == NULL) { - xmlGenericError(xmlGenericErrorContext, "xmlGetRef: doc == NULL\n"); + xmlGenericError(xmlGenericErrorContext, "xmlGetRefs: doc == NULL\n"); return(NULL); } if (ID == NULL) { - xmlGenericError(xmlGenericErrorContext, "xmlGetRef: ID == NULL\n"); + xmlGenericError(xmlGenericErrorContext, "xmlGetRefs: ID == NULL\n"); return(NULL); } @@ -2291,7 +2291,7 @@ xmlGetRefs(xmlDocPtr doc, const xmlChar *ID) { * @dtd: a pointer to the DtD to search * @name: the element name * - * Search the Dtd for the description of this element + * Search the DTD for the description of this element * * returns the xmlElementPtr if found or NULL */ @@ -2321,7 +2321,7 @@ xmlGetDtdElementDesc(xmlDtdPtr dtd, const xmlChar *name) { * @name: the element name * @create: create an empty description if not found * - * Search the Dtd for the description of this element + * Search the DTD for the description of this element * * returns the xmlElementPtr if found or NULL */ @@ -2346,7 +2346,7 @@ xmlGetDtdElementDesc2(xmlDtdPtr dtd, const xmlChar *name, int create) { } if (table == NULL) { xmlGenericError(xmlGenericErrorContext, - "xmlGetDtdElementDesc: Table creation failed!\n"); + "xmlGetDtdElementDesc2: Table creation failed!\n"); return(NULL); } } @@ -2360,7 +2360,7 @@ xmlGetDtdElementDesc2(xmlDtdPtr dtd, const xmlChar *name, int create) { cur = (xmlElementPtr) xmlMalloc(sizeof(xmlElement)); if (cur == NULL) { xmlGenericError(xmlGenericErrorContext, - "xmlGetDtdElementDesc: out of memory\n"); + "xmlGetDtdElementDesc2: out of memory\n"); return(NULL); } memset(cur, 0, sizeof(xmlElement)); @@ -2386,7 +2386,7 @@ xmlGetDtdElementDesc2(xmlDtdPtr dtd, const xmlChar *name, int create) { * @name: the element name * @prefix: the element namespace prefix * - * Search the Dtd for the description of this element + * Search the DTD for the description of this element * * returns the xmlElementPtr if found or NULL */ @@ -2409,7 +2409,7 @@ xmlGetDtdQElementDesc(xmlDtdPtr dtd, const xmlChar *name, * @elem: the element name * @name: the attribute name * - * Search the Dtd for the description of this attribute on + * Search the DTD for the description of this attribute on * this element. * * returns the xmlAttributePtr if found or NULL @@ -2446,7 +2446,7 @@ xmlGetDtdAttrDesc(xmlDtdPtr dtd, const xmlChar *elem, const xmlChar *name) { * @name: the attribute name * @prefix: the attribute namespace prefix * - * Search the Dtd for the description of this qualified attribute on + * Search the DTD for the description of this qualified attribute on * this element. * * returns the xmlAttributePtr if found or NULL @@ -2469,7 +2469,7 @@ xmlGetDtdQAttrDesc(xmlDtdPtr dtd, const xmlChar *elem, const xmlChar *name, * @dtd: a pointer to the DtD to search * @name: the notation name * - * Search the Dtd for the description of this notation + * Search the DTD for the description of this notation * * returns the xmlNotationPtr if found or NULL */ @@ -2491,7 +2491,7 @@ xmlGetDtdNotationDesc(xmlDtdPtr dtd, const xmlChar *name) { * @doc: the document * @notationName: the notation name to check * - * Validate that the given mame match a notation declaration. + * Validate that the given name match a notation declaration. * - [ VC: Notation Declared ] * * returns 1 if valid or 0 otherwise @@ -2637,7 +2637,7 @@ xmlValidateNamesValue(const xmlChar *value) { /** * xmlValidateNmtokenValue: - * @value: an Mntoken value + * @value: an Nmtoken value * * Validate that the given value match Nmtoken production * @@ -2674,7 +2674,7 @@ xmlValidateNmtokenValue(const xmlChar *value) { /** * xmlValidateNmtokensValue: - * @value: an Mntokens value + * @value: an Nmtokens value * * Validate that the given value match Nmtokens production * @@ -2738,7 +2738,7 @@ xmlValidateNmtokensValue(const xmlChar *value) { * Try to validate a single notation definition * basically it does the following checks as described by the * XML-1.0 recommendation: - * - it seems that no validity constraing exist on notation declarations + * - it seems that no validity constraint exists on notation declarations * But this function get called anyway ... * * returns 1 if valid or 0 otherwise @@ -3036,7 +3036,7 @@ xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc, if (attr->atype == XML_ATTRIBUTE_ID) { int nbId; - /* the trick is taht we parse DtD as their own internal subset */ + /* the trick is that we parse DtD as their own internal subset */ xmlElementPtr elem = xmlGetDtdElementDesc(doc->intSubset, attr->elem); if (elem != NULL) { @@ -3277,7 +3277,7 @@ xmlValidateOneAttribute(xmlValidCtxtPtr ctxt, xmlDocPtr doc, if (attrDecl->def == XML_ATTRIBUTE_FIXED) { if (!xmlStrEqual(value, attrDecl->defaultValue)) { VERROR(ctxt->userData, - "Value for attribute %s on %s is differnt from default \"%s\"\n", + "Value for attribute %s on %s is different from default \"%s\"\n", attr->name, elem->name, attrDecl->defaultValue); ret = 0; } @@ -3429,7 +3429,7 @@ cont: * epsilon transition, go directly to the analysis phase */ if (STATE == ROLLBACK_PARENT) { - DEBUG_VALID_MSG("restaured parent branch"); + DEBUG_VALID_MSG("restored parent branch"); DEBUG_VALID_STATE(NODE, CONT) ret = 1; goto analyze; @@ -3598,7 +3598,7 @@ cont: analyze: while (CONT != NULL) { /* - * First do the analysis depending on the occurence model at + * First do the analysis depending on the occurrence model at * this level. */ if (ret == 0) { @@ -3988,21 +3988,21 @@ xmlValidateElementContent(xmlValidCtxtPtr ctxt, xmlNodePtr child, if (name != NULL) { VERROR(ctxt->userData, - "Element %s content doesn't follow the Dtd\nExpecting %s, got %s\n", + "Element %s content doesn't follow the DTD\nExpecting %s, got %s\n", name, expr, list); } else { VERROR(ctxt->userData, - "Element content doesn't follow the Dtd\nExpecting %s, got %s\n", + "Element content doesn't follow the DTD\nExpecting %s, got %s\n", expr, list); } } else { if (name != NULL) { VERROR(ctxt->userData, - "Element %s content doesn't follow the Dtd\n", + "Element %s content doesn't follow the DTD\n", name); } else { VERROR(ctxt->userData, - "Element content doesn't follow the Dtd\n"); + "Element content doesn't follow the DTD\n"); } } ret = 0; @@ -4227,7 +4227,7 @@ xmlValidateOneElement(xmlValidCtxtPtr ctxt, xmlDocPtr doc, return(0); } - /* Check taht the element content matches the definition */ + /* Check that the element content matches the definition */ switch (elemDecl->etype) { case XML_ELEMENT_TYPE_UNDEFINED: VERROR(ctxt->userData, "No declaration for element %s\n", @@ -4566,7 +4566,7 @@ xmlValidateRef(xmlRefPtr ref, xmlValidCtxtPtr ctxt, * @data: Contents of current link * @user: Value supplied by the user * - * Return 0 to abort the walk or 1 to continue + * Returns 0 to abort the walk or 1 to continue */ static int xmlWalkValidateList(const void *data, const void *user) diff --git a/xinclude.c b/xinclude.c index 620e4261..3f38b623 100644 --- a/xinclude.c +++ b/xinclude.c @@ -672,7 +672,7 @@ xmlXIncludePreProcessNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node) { * * Find and load the infoset replacement for the given node. * - * Returns 0 if substition succeeded, -1 if some processing failed + * Returns 0 if substitution succeeded, -1 if some processing failed */ static int xmlXIncludeLoadNode(xmlXIncludeCtxtPtr ctxt, int nr) { @@ -739,7 +739,7 @@ xmlXIncludeLoadNode(xmlXIncludeCtxtPtr ctxt, int nr) { xmlChar *escbase; xmlChar *eschref; /* - * Some escapeing may be needed + * Some escaping may be needed */ escbase = xmlURIEscape(base); eschref = xmlURIEscape(href); @@ -796,7 +796,7 @@ xmlXIncludeLoadNode(xmlXIncludeCtxtPtr ctxt, int nr) { * * Inplement the infoset replacement for the given node * - * Returns 0 if substition succeeded, -1 if some processing failed + * Returns 0 if substitution succeeded, -1 if some processing failed */ static int xmlXIncludeIncludeNode(xmlXIncludeCtxtPtr ctxt, int nr) { @@ -864,7 +864,7 @@ xmlXIncludeTestNode(xmlNodePtr node) { * * Implement the XInclude substitution on the XML document @doc * - * Returns 0 if no substition were done, -1 if some processing failed + * Returns 0 if no substitution were done, -1 if some processing failed * or the number of substitutions done. */ static int @@ -932,7 +932,7 @@ xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc) { * * Implement the XInclude substitution on the XML document @doc * - * Returns 0 if no substition were done, -1 if some processing failed + * Returns 0 if no substitution were done, -1 if some processing failed * or the number of substitutions done. */ int diff --git a/xlink.c b/xlink.c index 7715d2e0..d0d8ea0a 100644 --- a/xlink.c +++ b/xlink.c @@ -87,7 +87,7 @@ xlinkGetDefaultDetect (void) { /** * xlinkSetDefaultDetect: - * @func: pointer to the new detction routine. + * @func: pointer to the new detection routine. * * Set the default xlink detection routine */ diff --git a/xmlIO.c b/xmlIO.c index f4ef8bad..bfa80963 100644 --- a/xmlIO.c +++ b/xmlIO.c @@ -1214,7 +1214,7 @@ xmlIOHTTPCloseWrite( void * context, const char * http_mthd ) { close_rc = 0; else xmlGenericError( xmlGenericErrorContext, - "xmlIOHTTPClose: HTTP '%s' of %d %s\n'%s' %s %d\n", + "xmlIOHTTPCloseWrite: HTTP '%s' of %d %s\n'%s' %s %d\n", http_mthd, content_lgth, "bytes to URI", ctxt->uri, "failed. HTTP return code:", http_rtn ); @@ -1657,7 +1657,7 @@ xmlParserInputBufferCreateFilename #endif /* - * Try to find one of the input accept method accepting taht scheme + * Try to find one of the input accept method accepting that scheme * Go in reverse to give precedence to user defined handlers. * try with an unescaped version of the URI */ @@ -1743,7 +1743,7 @@ xmlOutputBufferCreateFilename(const char *URI, /* - * Try to find one of the output accept method accepting taht scheme + * Try to find one of the output accept method accepting that scheme * Go in reverse to give precedence to user defined handlers. * try with an unescaped version of the URI */ @@ -2089,7 +2089,7 @@ xmlParserInputBufferPush(xmlParserInputBufferPtr in, * This routine handle the I18N transcoding to internal UTF-8 * This routine is used when operating the parser in normal (pull) mode * - * TODO: one should be able to remove one extra copy by copying directy + * TODO: one should be able to remove one extra copy by copying directly * onto in->buffer or in->raw * * Returns the number of chars read and stored in the buffer, or -1 @@ -2334,7 +2334,7 @@ xmlOutputBufferFlush(xmlOutputBufferPtr out) { nbchars = xmlCharEncOutFunc(out->encoder, out->conv, out->buffer); if (nbchars < 0) { xmlGenericError(xmlGenericErrorContext, - "xmlOutputBufferWrite: encoder error\n"); + "xmlOutputBufferFlush: encoder error\n"); return(-1); } } @@ -2586,7 +2586,7 @@ xmlGetExternalEntityLoader(void) { * * Load an external entity, note that the use of this function for * unparsed entities may generate problems - * TODO: a more generic External entitiy API must be designed + * TODO: a more generic External entity API must be designed * * Returns the xmlParserInputPtr or NULL */ diff --git a/xmlcatalog.c b/xmlcatalog.c index 3d0f73c0..3f153698 100644 --- a/xmlcatalog.c +++ b/xmlcatalog.c @@ -400,7 +400,7 @@ int main(int argc, char **argv) { if (sgml) { /* - * Maintainance of SGML catalogs. + * Maintenance of SGML catalogs. */ xmlCatalogPtr catal = NULL; xmlCatalogPtr super = NULL; diff --git a/xmllint.c b/xmllint.c index 1d80b62a..6cdcef3c 100644 --- a/xmllint.c +++ b/xmllint.c @@ -647,7 +647,7 @@ static void parseAndPrintFile(char *filename) { ctxt = xmlCreateFileParserCtxt(filename); if (ctxt == NULL) { - /* If xmlCreateFileParseCtxt() return NULL something + /* If xmlCreateFileParserCtxt() return NULL something strange happened so we don't want to do anything. Do we want to print an error message here? */ @@ -738,7 +738,7 @@ static void parseAndPrintFile(char *filename) { #ifdef LIBXML_DEBUG_ENABLED /* - * shell interraction + * shell interaction */ if (shell) xmlShell(doc, filename, xmlShellReadline, stdout); @@ -983,7 +983,7 @@ static void usage(const char *name) { #ifdef LIBXML_XINCLUDE_ENABLED printf("\t--xinclude : do XInclude processing\n"); #endif - printf("\t--loaddtd : fetch external Dtd\n"); + printf("\t--loaddtd : fetch external DTD\n"); printf("\t--dtdattr : loaddtd + populate the tree with inherited attributes \n"); printf("\t--dropdtd : remove the DOCTYPE of the input docs\n"); } @@ -1212,7 +1212,7 @@ main(int argc, char **argv) { } if ((timing) && (repeat)) startTimer(); - /* Remember file names. "-" means stding. */ + /* Remember file names. "-" means stdin. */ if ((argv[i][0] != '-') || (strcmp(argv[i], "-") == 0)) { if (repeat) { for (count = 0;count < 100 * repeat;count++) diff --git a/xpath.c b/xpath.c index 63edcc03..8e3adb67 100644 --- a/xpath.c +++ b/xpath.c @@ -8,7 +8,7 @@ * Public reference: * http://www.w3.org/TR/xpath * - * See COPYRIGHT for the status of this software + * See Copyright for the status of this software * * Author: daniel@veillard.com * @@ -911,6 +911,8 @@ extern type name##Pop(xmlXPathParserContextPtr ctxt) { \ * @value: the XPath object * * Pushes a new XPath object on top of the value stack + * + * returns the number of items on the value stack */ PUSH_AND_POP(xmlXPathObjectPtr, value) @@ -1021,7 +1023,7 @@ xmlXPathPopNodeSet (xmlXPathParserContextPtr ctxt) { * xmlXPathPopExternal: * @ctxt: an XPath parser context * - * Pops an external oject from the stack, handling conversion if needed. + * Pops an external object from the stack, handling conversion if needed. * Check error with #xmlXPathCheckError. * * Returns the object @@ -1195,8 +1197,8 @@ xmlXPathFormatNumber(double number, char buffer[], int buffersize) static const char *xmlXPathErrorMessages[] = { "Ok", "Number encoding", - "Unfinished litteral", - "Start of litteral", + "Unfinished literal", + "Start of literal", "Expected $ for variable reference", "Undefined variable", "Invalid predicate", @@ -1402,7 +1404,7 @@ xmlXPathNodeSetCreate(xmlNodePtr val) { ret = (xmlNodeSetPtr) xmlMalloc(sizeof(xmlNodeSet)); if (ret == NULL) { xmlGenericError(xmlGenericErrorContext, - "xmlXPathNewNodeSet: out of memory\n"); + "xmlXPathNodeSetCreate: out of memory\n"); return(NULL); } memset(ret, 0 , (size_t) sizeof(xmlNodeSet)); @@ -1411,7 +1413,7 @@ xmlXPathNodeSetCreate(xmlNodePtr val) { sizeof(xmlNodePtr)); if (ret->nodeTab == NULL) { xmlGenericError(xmlGenericErrorContext, - "xmlXPathNewNodeSet: out of memory\n"); + "xmlXPathNodeSetCreate: out of memory\n"); return(NULL); } memset(ret->nodeTab, 0 , @@ -1447,7 +1449,7 @@ xmlXPathNodeSetContains (xmlNodeSetPtr cur, xmlNodePtr val) { * @cur: the initial node set * @val: a new xmlNodePtr * - * add a new xmlNodePtr ot an existing NodeSet + * add a new xmlNodePtr to an existing NodeSet */ void xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xmlNodePtr val) { @@ -1496,7 +1498,7 @@ xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xmlNodePtr val) { * @cur: the initial node set * @val: a new xmlNodePtr * - * add a new xmlNodePtr ot an existing NodeSet, optimized version + * add a new xmlNodePtr to an existing NodeSet, optimized version * when we are sure the node is not already in the set. */ void @@ -1541,7 +1543,7 @@ xmlXPathNodeSetAddUnique(xmlNodeSetPtr cur, xmlNodePtr val) { * Merges two nodesets, all nodes from @val2 are added to @val1 * if @val1 is NULL, a new set is created and copied from @val2 * - * Returns val1 once extended or NULL in case of error. + * Returns @val1 once extended or NULL in case of error. */ xmlNodeSetPtr xmlXPathNodeSetMerge(xmlNodeSetPtr val1, xmlNodeSetPtr val2) { @@ -2258,9 +2260,9 @@ xmlXPathRegisterFuncNS(xmlXPathContextPtr ctxt, const xmlChar *name, * xmlXPathRegisterFuncLookup: * @ctxt: the XPath context * @f: the lookup function - * @data: the lookup data + * @funcCtxt: the lookup data * - * Registers an external mecanism to do function lookup. + * Registers an external mechanism to do function lookup. */ void xmlXPathRegisterFuncLookup (xmlXPathContextPtr ctxt, @@ -2727,7 +2729,7 @@ xmlXPathWrapExternal (void *val) { ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); if (ret == NULL) { xmlGenericError(xmlGenericErrorContext, - "xmlXPathWrapString: out of memory\n"); + "xmlXPathWrapExternal: out of memory\n"); return(NULL); } memset(ret, 0 , (size_t) sizeof(xmlXPathObject)); @@ -2930,7 +2932,7 @@ xmlXPathCastNodeSetToString (xmlNodeSetPtr ns) { * Converts an existing object to its string() equivalent * * Returns the string value of the object, NULL in case of error. - * A new string is allocated only if needed (val isn't a + * A new string is allocated only if needed (@val isn't a * string object). */ xmlChar * @@ -3416,7 +3418,7 @@ xmlXPathCompParserContext(xmlXPathCompExprPtr comp, xmlXPathContextPtr ctxt) { ret = (xmlXPathParserContextPtr) xmlMalloc(sizeof(xmlXPathParserContext)); if (ret == NULL) { xmlGenericError(xmlGenericErrorContext, - "xmlXPathNewParserContext: out of memory\n"); + "xmlXPathCompParserContext: out of memory\n"); return(NULL); } memset(ret, 0 , (size_t) sizeof(xmlXPathParserContext)); @@ -3427,7 +3429,7 @@ xmlXPathCompParserContext(xmlXPathCompExprPtr comp, xmlXPathContextPtr ctxt) { if (ret->valueTab == NULL) { xmlFree(ret); xmlGenericError(xmlGenericErrorContext, - "xmlXPathNewParserContext: out of memory\n"); + "xmlXPathCompParserContext: out of memory\n"); return(NULL); } ret->valueNr = 0; @@ -3706,7 +3708,7 @@ xmlXPathCompareNodeSetString(xmlXPathParserContextPtr ctxt, int inf, int strict, * xmlXPathCompareNodeSets: * @inf: less than (1) or greater than (0) * @strict: is the comparison strict - * @arg1: the fist node set object + * @arg1: the first node set object * @arg2: the second node set object * * Implement the compare operation on nodesets: @@ -4246,7 +4248,7 @@ xmlXPathEqualValues(xmlXPathParserContextPtr ctxt) { * number. The >= comparison will be true if and only if the first number * is greater than or equal to the second number. * - * Returns 1 if the comparaison succeeded, 0 if it failed + * Returns 1 if the comparison succeeded, 0 if it failed */ int xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict) { @@ -4359,7 +4361,7 @@ xmlXPathAddValues(xmlXPathParserContextPtr ctxt) { * xmlXPathSubValues: * @ctxt: the XPath Parser context * - * Implement the substraction operation on XPath objects: + * Implement the subtraction operation on XPath objects: * The numeric operators convert their operands to numbers as if * by calling the number function. */ @@ -5113,7 +5115,7 @@ xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs) { * Implement the position() XPath function * number position() * The position function returns the position of the context node in the - * context node list. The first position is 1, and so the last positionr + * context node list. The first position is 1, and so the last position * will be equal to last(). */ void @@ -5387,7 +5389,7 @@ xmlXPathNamespaceURIFunction(xmlXPathParserContextPtr ctxt, int nargs) { * Implement the name() XPath function * string name(node-set?) * The name function returns a string containing a QName representing - * the name of the node in the argument node-set that is first in documenti + * the name of the node in the argument node-set that is first in document * order. The QName must represent the name with respect to the namespace * declarations in effect on the node whose name is being represented. * Typically, this will be the form in which the name occurred in the XML @@ -5478,7 +5480,7 @@ xmlXPathNameFunction(xmlXPathParserContextPtr ctxt, int nargs) * before the decimal point and at least one digit after the * decimal point, preceded by a minus sign (-) if the number * is negative; there must be no leading zeros before the decimal - * point apart possibly from the one required digit immediatelyi + * point apart possibly from the one required digit immediately * before the decimal point; beyond the one required digit * after the decimal point there must be as many, but only as * many, more digits as are needed to uniquely distinguish the @@ -6289,7 +6291,7 @@ static xmlChar * xmlXPathParseNameComplex(xmlXPathParserContextPtr ctxt, * @cur: pointer to the beginning of the char * @len: pointer to the length of the char read * - * The current char value, if using UTF-8 this may actaully span multiple + * The current char value, if using UTF-8 this may actually span multiple * bytes in the input buffer. * * Returns the current char value and its length @@ -8176,7 +8178,7 @@ xmlXPathNodeCollectAndTest(xmlXPathParserContextPtr ctxt, * - For other axes, the principal node type is element. * * A node test * is true for any node of the - * principal node type. For example, child::* willi + * principal node type. For example, child::* will * select all element children of the context node */ tmp = ctxt->context->node; @@ -8598,7 +8600,7 @@ xmlXPathNodeCollectAndTestNth(xmlXPathParserContextPtr ctxt, * - For other axes, the principal node type is element. * * A node test * is true for any node of the - * principal node type. For example, child::* willi + * principal node type. For example, child::* will * select all element children of the context node */ tmp = ctxt->context->node; @@ -9235,7 +9237,7 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op) URI = xmlXPathNsLookup(ctxt->context, op->value5); if (URI == NULL) { xmlGenericError(xmlGenericErrorContext, - "xmlXPathRunEval: variable %s bound to undefined prefix %s\n", + "xmlXPathCompOpEval: variable %s bound to undefined prefix %s\n", op->value4, op->value5); return (total); } @@ -9259,14 +9261,14 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op) xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]); if (ctxt->valueNr < op->value) { xmlGenericError(xmlGenericErrorContext, - "xmlXPathRunEval: parameter error\n"); + "xmlXPathCompOpEval: parameter error\n"); ctxt->error = XPATH_INVALID_OPERAND; return (total); } for (i = 0; i < op->value; i++) if (ctxt->valueTab[(ctxt->valueNr - 1) - i] == NULL) { xmlGenericError(xmlGenericErrorContext, - "xmlXPathRunEval: parameter error\n"); + "xmlXPathCompOpEval: parameter error\n"); ctxt->error = XPATH_INVALID_OPERAND; return (total); } @@ -9283,7 +9285,7 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op) URI = xmlXPathNsLookup(ctxt->context, op->value5); if (URI == NULL) { xmlGenericError(xmlGenericErrorContext, - "xmlXPathRunEval: function %s bound to undefined prefix %s\n", + "xmlXPathCompOpEval: function %s bound to undefined prefix %s\n", op->value4, op->value5); return (total); } @@ -9292,7 +9294,7 @@ xmlXPathCompOpEval(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op) } if (func == NULL) { xmlGenericError(xmlGenericErrorContext, - "xmlXPathRunEval: function %s not found\n", + "xmlXPathCompOpEval: function %s not found\n", op->value4); XP_ERROR0(XPATH_UNKNOWN_FUNC_ERROR); } @@ -9721,7 +9723,7 @@ xmlXPathRunEval(xmlXPathParserContextPtr ctxt) { * is not a number, then the result will be converted as if by a call * to the boolean function. * - * Return 1 if predicate is true, 0 otherwise + * Returns 1 if predicate is true, 0 otherwise */ int xmlXPathEvalPredicate(xmlXPathContextPtr ctxt, xmlXPathObjectPtr res) { @@ -9759,7 +9761,7 @@ xmlXPathEvalPredicate(xmlXPathContextPtr ctxt, xmlXPathObjectPtr res) { * is not a number, then the result will be converted as if by a call * to the boolean function. * - * Return 1 if predicate is true, 0 otherwise + * Returns 1 if predicate is true, 0 otherwise */ int xmlXPathEvaluatePredicateResult(xmlXPathParserContextPtr ctxt, @@ -9790,7 +9792,7 @@ xmlXPathEvaluatePredicateResult(xmlXPathParserContextPtr ctxt, * * Compile an XPath expression * - * Returns the xmlXPathObjectPtr resulting from the eveluation or NULL. + * Returns the xmlXPathObjectPtr resulting from the evaluation or NULL. * the caller has to free the object. */ xmlXPathCompExprPtr @@ -9827,7 +9829,7 @@ xmlXPathCompile(const xmlChar *str) { * * Evaluate the Precompiled XPath expression in the given context. * - * Returns the xmlXPathObjectPtr resulting from the eveluation or NULL. + * Returns the xmlXPathObjectPtr resulting from the evaluation or NULL. * the caller has to free the object. */ xmlXPathObjectPtr @@ -9863,7 +9865,7 @@ xmlXPathCompiledEval(xmlXPathCompExprPtr comp, xmlXPathContextPtr ctx) { if (ctxt->value == NULL) { xmlGenericError(xmlGenericErrorContext, - "xmlXPathEval: evaluation failed\n"); + "xmlXPathCompiledEval: evaluation failed\n"); res = NULL; } else { res = valuePop(ctxt); @@ -9880,7 +9882,7 @@ xmlXPathCompiledEval(xmlXPathCompExprPtr comp, xmlXPathContextPtr ctx) { } while (tmp != NULL); if ((stack != 0) && (res != NULL)) { xmlGenericError(xmlGenericErrorContext, - "xmlXPathEval: %d object left on the stack\n", + "xmlXPathCompiledEval: %d object left on the stack\n", stack); } if (ctxt->error != XPATH_EXPRESSION_OK) { @@ -9917,7 +9919,7 @@ xmlXPathEvalExpr(xmlXPathParserContextPtr ctxt) { * * Evaluate the XPath Location Path in the given context. * - * Returns the xmlXPathObjectPtr resulting from the eveluation or NULL. + * Returns the xmlXPathObjectPtr resulting from the evaluation or NULL. * the caller has to free the object. */ xmlXPathObjectPtr diff --git a/xpointer.c b/xpointer.c index e5c8c7bf..5a3a84e1 100644 --- a/xpointer.c +++ b/xpointer.c @@ -230,7 +230,7 @@ xmlXPtrRangeCheckOrder(xmlXPathObjectPtr range) { * * Compare two ranges * - * Return 1 if equal, 0 otherwise + * Returns 1 if equal, 0 otherwise */ static int xmlXPtrRangesEqual(xmlXPathObjectPtr range1, xmlXPathObjectPtr range2) { @@ -281,7 +281,7 @@ xmlXPtrNewRange(xmlNodePtr start, int startindex, ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); if (ret == NULL) { xmlGenericError(xmlGenericErrorContext, - "xmlXPtrNewRangePoints: out of memory\n"); + "xmlXPtrNewRange: out of memory\n"); return(NULL); } memset(ret, 0 , (size_t) sizeof(xmlXPathObject)); @@ -458,7 +458,7 @@ xmlXPtrNewCollapsedRange(xmlNodePtr start) { ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); if (ret == NULL) { xmlGenericError(xmlGenericErrorContext, - "xmlXPtrNewRangeNodes: out of memory\n"); + "xmlXPtrNewCollapsedRange: out of memory\n"); return(NULL); } memset(ret, 0 , (size_t) sizeof(xmlXPathObject)); @@ -571,7 +571,7 @@ xmlXPtrLocationSetCreate(xmlXPathObjectPtr val) { * @cur: the initial range set * @val: a new xmlXPathObjectPtr * - * add a new xmlXPathObjectPtr ot an existing LocationSet + * add a new xmlXPathObjectPtr to an existing LocationSet * If the location already exist in the set @val is freed. */ void @@ -762,7 +762,7 @@ xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set) { ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); if (ret == NULL) { xmlGenericError(xmlGenericErrorContext, - "xmlXPtrNewLocationSetNodes: out of memory\n"); + "xmlXPtrNewLocationSetNodeSet: out of memory\n"); return(NULL); } memset(ret, 0 , (size_t) sizeof(xmlXPathObject)); @@ -909,7 +909,7 @@ xmlXPtrGetChildNo(xmlXPathParserContextPtr ctxt, int indx) { * are not balanced, a syntax error results. * * Parse and evaluate an XPtrPart. Basically it generates the unescaped - * string and if the scheme is 'xpointer' it will call the XPath interprter. + * string and if the scheme is 'xpointer' it will call the XPath interpreter. * * TODO: there is no new scheme registration mechanism */ @@ -1054,7 +1054,7 @@ xmlXPtrEvalXPtrPart(xmlXPathParserContextPtr ctxt, xmlChar *name) { * ----------- * * Parse and evaluate a Full XPtr i.e. possibly a cascade of XPath based - * expressions or other shemes. + * expressions or other schemes. */ static void xmlXPtrEvalFullXPtr(xmlXPathParserContextPtr ctxt, xmlChar *name) { @@ -1106,7 +1106,7 @@ xmlXPtrEvalFullXPtr(xmlXPathParserContextPtr ctxt, xmlChar *name) { } /* - * Is there another XPoointer part. + * Is there another XPointer part. */ SKIP_BLANKS; name = xmlXPathParseName(ctxt); @@ -1127,7 +1127,7 @@ xmlXPtrEvalFullXPtr(xmlXPathParserContextPtr ctxt, xmlChar *name) { static void xmlXPtrEvalChildSeq(xmlXPathParserContextPtr ctxt, xmlChar *name) { /* - * XPointer don't allow by syntax to adress in mutirooted trees + * XPointer don't allow by syntax to address in mutirooted trees * this might prove useful in some cases, warn about it. */ if ((name == NULL) && (CUR == '/') && (NXT(1) != '1')) { @@ -1174,7 +1174,7 @@ xmlXPtrEvalXPointer(xmlXPathParserContextPtr ctxt) { if (ctxt->valueTab == NULL) { xmlFree(ctxt); xmlGenericError(xmlGenericErrorContext, - "xmlXPathRunEval: out of memory\n"); + "xmlXPathEvalXPointer: out of memory\n"); return; } ctxt->valueNr = 0; @@ -1270,7 +1270,7 @@ xmlXPtrNewContext(xmlDocPtr doc, xmlNodePtr here, xmlNodePtr origin) { * * Evaluate the XPath Location Path in the given context. * - * Returns the xmlXPathObjectPtr resulting from the eveluation or NULL. + * Returns the xmlXPathObjectPtr resulting from the evaluation or NULL. * the caller has to free the object. */ xmlXPathObjectPtr @@ -1462,7 +1462,7 @@ xmlXPtrBuildRangeNodeList(xmlXPathObjectPtr range) { /* Do not copy DTD informations */ break; case XML_ENTITY_DECL: - TODO /* handle csossing entities -> stack needed */ + TODO /* handle crossing entities -> stack needed */ break; case XML_XINCLUDE_START: case XML_XINCLUDE_END: @@ -1780,7 +1780,7 @@ xmlXPtrStartPointFunction(xmlXPathParserContextPtr ctxt, int nargs) { * location-set end-point(location-set) * * For each location x in the argument location-set, end-point adds a - * location of type point to the result location-set. That point representsi + * location of type point to the result location-set. That point represents * the end point of location x and is determined by the following rules: * * - If x is of type point, the resulting point is x. @@ -1788,7 +1788,7 @@ xmlXPtrStartPointFunction(xmlXPathParserContextPtr ctxt, int nargs) { * - If x is of type root or element, the container node of the resulting * point is x and the index is the number of location children of x. * - If x is of type text, comment, or processing instruction, the container - * node of the resulting point is x and the index is the length of thei + * node of the resulting point is x and the index is the length of the * string-value of x. * - If x is of type attribute or namespace, the function must signal a * syntax error. @@ -2358,7 +2358,7 @@ xmlXPtrAdvanceChar(xmlNodePtr *node, int *indx, int bytes) { * * Returns -1 in case of failure, 0 if not found, 1 if found in which case * (@start, @startindex) will indicate the position of the beginning - * of the range and (@end, @endindex) will endicate the end + * of the range and (@end, @endindex) will indicate the end * of the range */ static int @@ -2452,12 +2452,12 @@ xmlXPtrMatchString(const xmlChar *string, xmlNodePtr start, int startindex, * @end: the end textnode * @endindex: the end index * - * Search the next occurence of @string within the document content + * Search the next occurrence of @string within the document content * until the (@end, @endindex) point is reached * * Returns -1 in case of failure, 0 if not found, 1 if found in which case * (@start, @startindex) will indicate the position of the beginning - * of the range and (@end, @endindex) will endicate the end + * of the range and (@end, @endindex) will indicate the end * of the range */ static int