diff options
Diffstat (limited to 'debugXML.c')
| -rw-r--r-- | debugXML.c | 60 |
1 files changed, 39 insertions, 21 deletions
@@ -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 * |
