• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:output

34     FILE *output;               /* the output file */  member
53 ctxt->depth = 0; in xmlCtxtDumpInitCtxt()
54 ctxt->check = 0; in xmlCtxtDumpInitCtxt()
55 ctxt->errors = 0; in xmlCtxtDumpInitCtxt()
56 ctxt->output = stdout; in xmlCtxtDumpInitCtxt()
57 ctxt->doc = NULL; in xmlCtxtDumpInitCtxt()
58 ctxt->node = NULL; in xmlCtxtDumpInitCtxt()
59 ctxt->dict = NULL; in xmlCtxtDumpInitCtxt()
60 ctxt->nodict = 0; in xmlCtxtDumpInitCtxt()
61 ctxt->options = 0; in xmlCtxtDumpInitCtxt()
63 ctxt->shift[i] = ' '; in xmlCtxtDumpInitCtxt()
64 ctxt->shift[100] = 0; in xmlCtxtDumpInitCtxt()
80 * Returns 1 if in scope, -1 in case of argument error,
81 * -2 if the namespace is not in scope, and -3 if not on
90 return(-1); in xmlNsCheckScope()
92 if ((node->type != XML_ELEMENT_NODE) && in xmlNsCheckScope()
93 (node->type != XML_ATTRIBUTE_NODE) && in xmlNsCheckScope()
94 (node->type != XML_DOCUMENT_NODE) && in xmlNsCheckScope()
95 (node->type != XML_TEXT_NODE) && in xmlNsCheckScope()
96 (node->type != XML_HTML_DOCUMENT_NODE) && in xmlNsCheckScope()
97 (node->type != XML_XINCLUDE_START)) in xmlNsCheckScope()
98 return(-2); in xmlNsCheckScope()
101 ((node->type == XML_ELEMENT_NODE) || in xmlNsCheckScope()
102 (node->type == XML_ATTRIBUTE_NODE) || in xmlNsCheckScope()
103 (node->type == XML_TEXT_NODE) || in xmlNsCheckScope()
104 (node->type == XML_XINCLUDE_START))) { in xmlNsCheckScope()
105 if ((node->type == XML_ELEMENT_NODE) || in xmlNsCheckScope()
106 (node->type == XML_XINCLUDE_START)) { in xmlNsCheckScope()
107 cur = node->nsDef; in xmlNsCheckScope()
111 if (xmlStrEqual(cur->prefix, ns->prefix)) in xmlNsCheckScope()
112 return(-2); in xmlNsCheckScope()
113 cur = cur->next; in xmlNsCheckScope()
116 node = node->parent; in xmlNsCheckScope()
120 ((node->type == XML_DOCUMENT_NODE) || in xmlNsCheckScope()
121 (node->type == XML_HTML_DOCUMENT_NODE))) { in xmlNsCheckScope()
122 xmlNsPtr oldNs = ((xmlDocPtr) node)->oldNs; in xmlNsCheckScope()
126 return(-3); in xmlNsCheckScope()
132 if (ctxt->check) in xmlCtxtDumpSpaces()
134 if ((ctxt->output != NULL) && (ctxt->depth > 0)) { in xmlCtxtDumpSpaces()
135 if (ctxt->depth < 50) in xmlCtxtDumpSpaces()
136 fprintf(ctxt->output, "%s", &ctxt->shift[100 - 2 * ctxt->depth]); in xmlCtxtDumpSpaces()
138 fprintf(ctxt->output, "%s", ctxt->shift); in xmlCtxtDumpSpaces()
152 ctxt->errors++; in xmlDebugErr()
153 fprintf(ctxt->output, "ERROR %d: %s", error, msg); in xmlDebugErr()
158 ctxt->errors++; in xmlDebugErr2()
159 fprintf(ctxt->output, "ERROR %d: ", error); in xmlDebugErr2()
160 fprintf(ctxt->output, msg, extra); in xmlDebugErr2()
165 ctxt->errors++; in xmlDebugErr3()
166 fprintf(ctxt->output, "ERROR %d: ", error); in xmlDebugErr3()
167 fprintf(ctxt->output, msg, extra); in xmlDebugErr3()
184 if (ret == -2) { in xmlCtxtNsCheckScope()
185 if (ns->prefix == NULL) in xmlCtxtNsCheckScope()
191 (char *) ns->prefix); in xmlCtxtNsCheckScope()
193 if (ret == -3) { in xmlCtxtNsCheckScope()
194 if (ns->prefix == NULL) in xmlCtxtNsCheckScope()
200 (char *) ns->prefix); in xmlCtxtNsCheckScope()
209 * Do debugging on the string, currently it just checks the UTF-8 content
215 if (ctxt->check) { in xmlCtxtCheckString()
218 "String is not UTF-8 %s", (const char *) str); in xmlCtxtCheckString()
234 if (ctxt->check) { in xmlCtxtCheckName()
243 if ((ctxt->dict != NULL) && in xmlCtxtCheckName()
244 (!xmlDictOwns(ctxt->dict, name)) && in xmlCtxtCheckName()
245 ((ctxt->doc == NULL) || in xmlCtxtCheckName()
246 ((ctxt->doc->parseFlags & (XML_PARSE_SAX1 | XML_PARSE_NODICT)) == 0))) { in xmlCtxtCheckName()
259 doc = node->doc; in xmlCtxtGenericNodeCheck()
261 if (node->parent == NULL) in xmlCtxtGenericNodeCheck()
264 if (node->doc == NULL) { in xmlCtxtGenericNodeCheck()
269 dict = doc->dict; in xmlCtxtGenericNodeCheck()
270 if ((dict == NULL) && (ctxt->nodict == 0)) { in xmlCtxtGenericNodeCheck()
271 ctxt->nodict = 1; in xmlCtxtGenericNodeCheck()
273 if (ctxt->doc == NULL) in xmlCtxtGenericNodeCheck()
274 ctxt->doc = doc; in xmlCtxtGenericNodeCheck()
276 if (ctxt->dict == NULL) { in xmlCtxtGenericNodeCheck()
277 ctxt->dict = dict; in xmlCtxtGenericNodeCheck()
280 if ((node->parent != NULL) && (node->doc != node->parent->doc) && in xmlCtxtGenericNodeCheck()
281 (!xmlStrEqual(node->name, BAD_CAST "pseudoroot"))) in xmlCtxtGenericNodeCheck()
284 if (node->prev == NULL) { in xmlCtxtGenericNodeCheck()
285 if (node->type == XML_ATTRIBUTE_NODE) { in xmlCtxtGenericNodeCheck()
286 if ((node->parent != NULL) && in xmlCtxtGenericNodeCheck()
287 (node != (xmlNodePtr) node->parent->properties)) in xmlCtxtGenericNodeCheck()
291 } else if ((node->parent != NULL) && (node->parent->children != node)) in xmlCtxtGenericNodeCheck()
295 if (node->prev->next != node) in xmlCtxtGenericNodeCheck()
297 "Node prev->next : back link wrong\n"); in xmlCtxtGenericNodeCheck()
299 if (node->next == NULL) { in xmlCtxtGenericNodeCheck()
300 if ((node->parent != NULL) && (node->type != XML_ATTRIBUTE_NODE) && in xmlCtxtGenericNodeCheck()
301 (node->parent->last != node) && in xmlCtxtGenericNodeCheck()
302 (node->parent->type == XML_ELEMENT_NODE)) in xmlCtxtGenericNodeCheck()
306 if (node->next->prev != node) in xmlCtxtGenericNodeCheck()
308 "Node next->prev : forward link wrong\n"); in xmlCtxtGenericNodeCheck()
309 if (node->next->parent != node->parent) in xmlCtxtGenericNodeCheck()
311 "Node next->prev : forward link wrong\n"); in xmlCtxtGenericNodeCheck()
313 if (node->type == XML_ELEMENT_NODE) { in xmlCtxtGenericNodeCheck()
316 ns = node->nsDef; in xmlCtxtGenericNodeCheck()
319 ns = ns->next; in xmlCtxtGenericNodeCheck()
321 if (node->ns != NULL) in xmlCtxtGenericNodeCheck()
322 xmlCtxtNsCheckScope(ctxt, node, node->ns); in xmlCtxtGenericNodeCheck()
323 } else if (node->type == XML_ATTRIBUTE_NODE) { in xmlCtxtGenericNodeCheck()
324 if (node->ns != NULL) in xmlCtxtGenericNodeCheck()
325 xmlCtxtNsCheckScope(ctxt, node, node->ns); in xmlCtxtGenericNodeCheck()
328 if ((node->type != XML_ELEMENT_NODE) && in xmlCtxtGenericNodeCheck()
329 (node->type != XML_ATTRIBUTE_NODE) && in xmlCtxtGenericNodeCheck()
330 (node->type != XML_ELEMENT_DECL) && in xmlCtxtGenericNodeCheck()
331 (node->type != XML_ATTRIBUTE_DECL) && in xmlCtxtGenericNodeCheck()
332 (node->type != XML_DTD_NODE) && in xmlCtxtGenericNodeCheck()
333 (node->type != XML_HTML_DOCUMENT_NODE) && in xmlCtxtGenericNodeCheck()
334 (node->type != XML_DOCUMENT_NODE)) { in xmlCtxtGenericNodeCheck()
335 if (node->content != NULL) in xmlCtxtGenericNodeCheck()
336 xmlCtxtCheckString(ctxt, (const xmlChar *) node->content); in xmlCtxtGenericNodeCheck()
338 switch (node->type) { in xmlCtxtGenericNodeCheck()
341 xmlCtxtCheckName(ctxt, node->name); in xmlCtxtGenericNodeCheck()
344 if ((node->name == xmlStringText) || in xmlCtxtGenericNodeCheck()
345 (node->name == xmlStringTextNoenc)) in xmlCtxtGenericNodeCheck()
348 if ((ctxt->dict != NULL) && in xmlCtxtGenericNodeCheck()
349 (node->name == xmlDictLookup(ctxt->dict, BAD_CAST "nbktext", in xmlCtxtGenericNodeCheck()
355 (const char *) node->name); in xmlCtxtGenericNodeCheck()
358 if (node->name == xmlStringComment) in xmlCtxtGenericNodeCheck()
362 (const char *) node->name); in xmlCtxtGenericNodeCheck()
365 xmlCtxtCheckName(ctxt, node->name); in xmlCtxtGenericNodeCheck()
368 if (node->name == NULL) in xmlCtxtGenericNodeCheck()
372 (const char *) node->name); in xmlCtxtGenericNodeCheck()
397 if (ctxt->check) { in xmlCtxtDumpString()
402 fprintf(ctxt->output, "(NULL)"); in xmlCtxtDumpString()
409 fputc(' ', ctxt->output); in xmlCtxtDumpString()
411 fprintf(ctxt->output, "#%X", str[i]); in xmlCtxtDumpString()
413 fputc(str[i], ctxt->output); in xmlCtxtDumpString()
414 fprintf(ctxt->output, "..."); in xmlCtxtDumpString()
423 if (!ctxt->check) in xmlCtxtDumpDtdNode()
424 fprintf(ctxt->output, "DTD node is NULL\n"); in xmlCtxtDumpDtdNode()
428 if (dtd->type != XML_DTD_NODE) { in xmlCtxtDumpDtdNode()
433 if (!ctxt->check) { in xmlCtxtDumpDtdNode()
434 if (dtd->name != NULL) in xmlCtxtDumpDtdNode()
435 fprintf(ctxt->output, "DTD(%s)", (char *) dtd->name); in xmlCtxtDumpDtdNode()
437 fprintf(ctxt->output, "DTD"); in xmlCtxtDumpDtdNode()
438 if (dtd->ExternalID != NULL) in xmlCtxtDumpDtdNode()
439 fprintf(ctxt->output, ", PUBLIC %s", (char *) dtd->ExternalID); in xmlCtxtDumpDtdNode()
440 if (dtd->SystemID != NULL) in xmlCtxtDumpDtdNode()
441 fprintf(ctxt->output, ", SYSTEM %s", (char *) dtd->SystemID); in xmlCtxtDumpDtdNode()
442 fprintf(ctxt->output, "\n"); in xmlCtxtDumpDtdNode()
456 if (!ctxt->check) in xmlCtxtDumpAttrDecl()
457 fprintf(ctxt->output, "Attribute declaration is NULL\n"); in xmlCtxtDumpAttrDecl()
460 if (attr->type != XML_ATTRIBUTE_DECL) { in xmlCtxtDumpAttrDecl()
465 if (attr->name != NULL) { in xmlCtxtDumpAttrDecl()
466 if (!ctxt->check) in xmlCtxtDumpAttrDecl()
467 fprintf(ctxt->output, "ATTRDECL(%s)", (char *) attr->name); in xmlCtxtDumpAttrDecl()
471 if (attr->elem != NULL) { in xmlCtxtDumpAttrDecl()
472 if (!ctxt->check) in xmlCtxtDumpAttrDecl()
473 fprintf(ctxt->output, " for %s", (char *) attr->elem); in xmlCtxtDumpAttrDecl()
477 if (!ctxt->check) { in xmlCtxtDumpAttrDecl()
478 switch (attr->atype) { in xmlCtxtDumpAttrDecl()
480 fprintf(ctxt->output, " CDATA"); in xmlCtxtDumpAttrDecl()
483 fprintf(ctxt->output, " ID"); in xmlCtxtDumpAttrDecl()
486 fprintf(ctxt->output, " IDREF"); in xmlCtxtDumpAttrDecl()
489 fprintf(ctxt->output, " IDREFS"); in xmlCtxtDumpAttrDecl()
492 fprintf(ctxt->output, " ENTITY"); in xmlCtxtDumpAttrDecl()
495 fprintf(ctxt->output, " ENTITIES"); in xmlCtxtDumpAttrDecl()
498 fprintf(ctxt->output, " NMTOKEN"); in xmlCtxtDumpAttrDecl()
501 fprintf(ctxt->output, " NMTOKENS"); in xmlCtxtDumpAttrDecl()
504 fprintf(ctxt->output, " ENUMERATION"); in xmlCtxtDumpAttrDecl()
507 fprintf(ctxt->output, " NOTATION "); in xmlCtxtDumpAttrDecl()
510 if (attr->tree != NULL) { in xmlCtxtDumpAttrDecl()
512 xmlEnumerationPtr cur = attr->tree; in xmlCtxtDumpAttrDecl()
516 fprintf(ctxt->output, "|%s", (char *) cur->name); in xmlCtxtDumpAttrDecl()
518 fprintf(ctxt->output, " (%s", (char *) cur->name); in xmlCtxtDumpAttrDecl()
519 cur = cur->next; in xmlCtxtDumpAttrDecl()
524 fprintf(ctxt->output, ")"); in xmlCtxtDumpAttrDecl()
526 fprintf(ctxt->output, "...)"); in xmlCtxtDumpAttrDecl()
528 switch (attr->def) { in xmlCtxtDumpAttrDecl()
532 fprintf(ctxt->output, " REQUIRED"); in xmlCtxtDumpAttrDecl()
535 fprintf(ctxt->output, " IMPLIED"); in xmlCtxtDumpAttrDecl()
538 fprintf(ctxt->output, " FIXED"); in xmlCtxtDumpAttrDecl()
541 if (attr->defaultValue != NULL) { in xmlCtxtDumpAttrDecl()
542 fprintf(ctxt->output, "\""); in xmlCtxtDumpAttrDecl()
543 xmlCtxtDumpString(ctxt, attr->defaultValue); in xmlCtxtDumpAttrDecl()
544 fprintf(ctxt->output, "\""); in xmlCtxtDumpAttrDecl()
546 fprintf(ctxt->output, "\n"); in xmlCtxtDumpAttrDecl()
561 if (!ctxt->check) in xmlCtxtDumpElemDecl()
562 fprintf(ctxt->output, "Element declaration is NULL\n"); in xmlCtxtDumpElemDecl()
565 if (elem->type != XML_ELEMENT_DECL) { in xmlCtxtDumpElemDecl()
570 if (elem->name != NULL) { in xmlCtxtDumpElemDecl()
571 if (!ctxt->check) { in xmlCtxtDumpElemDecl()
572 fprintf(ctxt->output, "ELEMDECL("); in xmlCtxtDumpElemDecl()
573 xmlCtxtDumpString(ctxt, elem->name); in xmlCtxtDumpElemDecl()
574 fprintf(ctxt->output, ")"); in xmlCtxtDumpElemDecl()
579 if (!ctxt->check) { in xmlCtxtDumpElemDecl()
580 switch (elem->etype) { in xmlCtxtDumpElemDecl()
582 fprintf(ctxt->output, ", UNDEFINED"); in xmlCtxtDumpElemDecl()
585 fprintf(ctxt->output, ", EMPTY"); in xmlCtxtDumpElemDecl()
588 fprintf(ctxt->output, ", ANY"); in xmlCtxtDumpElemDecl()
591 fprintf(ctxt->output, ", MIXED "); in xmlCtxtDumpElemDecl()
594 fprintf(ctxt->output, ", MIXED "); in xmlCtxtDumpElemDecl()
597 if ((elem->type != XML_ELEMENT_NODE) && (elem->content != NULL)) { in xmlCtxtDumpElemDecl()
601 xmlSnprintfElementContent(buf, 5000, elem->content, 1); in xmlCtxtDumpElemDecl()
603 fprintf(ctxt->output, "%s", buf); in xmlCtxtDumpElemDecl()
605 fprintf(ctxt->output, "\n"); in xmlCtxtDumpElemDecl()
620 if (!ctxt->check) in xmlCtxtDumpEntityDecl()
621 fprintf(ctxt->output, "Entity declaration is NULL\n"); in xmlCtxtDumpEntityDecl()
624 if (ent->type != XML_ENTITY_DECL) { in xmlCtxtDumpEntityDecl()
629 if (ent->name != NULL) { in xmlCtxtDumpEntityDecl()
630 if (!ctxt->check) { in xmlCtxtDumpEntityDecl()
631 fprintf(ctxt->output, "ENTITYDECL("); in xmlCtxtDumpEntityDecl()
632 xmlCtxtDumpString(ctxt, ent->name); in xmlCtxtDumpEntityDecl()
633 fprintf(ctxt->output, ")"); in xmlCtxtDumpEntityDecl()
638 if (!ctxt->check) { in xmlCtxtDumpEntityDecl()
639 switch (ent->etype) { in xmlCtxtDumpEntityDecl()
641 fprintf(ctxt->output, ", internal\n"); in xmlCtxtDumpEntityDecl()
644 fprintf(ctxt->output, ", external parsed\n"); in xmlCtxtDumpEntityDecl()
647 fprintf(ctxt->output, ", unparsed\n"); in xmlCtxtDumpEntityDecl()
650 fprintf(ctxt->output, ", parameter\n"); in xmlCtxtDumpEntityDecl()
653 fprintf(ctxt->output, ", external parameter\n"); in xmlCtxtDumpEntityDecl()
656 fprintf(ctxt->output, ", predefined\n"); in xmlCtxtDumpEntityDecl()
659 if (ent->ExternalID) { in xmlCtxtDumpEntityDecl()
661 fprintf(ctxt->output, " ExternalID=%s\n", in xmlCtxtDumpEntityDecl()
662 (char *) ent->ExternalID); in xmlCtxtDumpEntityDecl()
664 if (ent->SystemID) { in xmlCtxtDumpEntityDecl()
666 fprintf(ctxt->output, " SystemID=%s\n", in xmlCtxtDumpEntityDecl()
667 (char *) ent->SystemID); in xmlCtxtDumpEntityDecl()
669 if (ent->URI != NULL) { in xmlCtxtDumpEntityDecl()
671 fprintf(ctxt->output, " URI=%s\n", (char *) ent->URI); in xmlCtxtDumpEntityDecl()
673 if (ent->content) { in xmlCtxtDumpEntityDecl()
675 fprintf(ctxt->output, " content="); in xmlCtxtDumpEntityDecl()
676 xmlCtxtDumpString(ctxt, ent->content); in xmlCtxtDumpEntityDecl()
677 fprintf(ctxt->output, "\n"); in xmlCtxtDumpEntityDecl()
693 if (!ctxt->check) in xmlCtxtDumpNamespace()
694 fprintf(ctxt->output, "namespace node is NULL\n"); in xmlCtxtDumpNamespace()
697 if (ns->type != XML_NAMESPACE_DECL) { in xmlCtxtDumpNamespace()
702 if (ns->href == NULL) { in xmlCtxtDumpNamespace()
703 if (ns->prefix != NULL) in xmlCtxtDumpNamespace()
706 (char *) ns->prefix); in xmlCtxtDumpNamespace()
711 if (!ctxt->check) { in xmlCtxtDumpNamespace()
712 if (ns->prefix != NULL) in xmlCtxtDumpNamespace()
713 fprintf(ctxt->output, "namespace %s href=", in xmlCtxtDumpNamespace()
714 (char *) ns->prefix); in xmlCtxtDumpNamespace()
716 fprintf(ctxt->output, "default namespace href="); in xmlCtxtDumpNamespace()
718 xmlCtxtDumpString(ctxt, ns->href); in xmlCtxtDumpNamespace()
719 fprintf(ctxt->output, "\n"); in xmlCtxtDumpNamespace()
729 ns = ns->next; in xmlCtxtDumpNamespaceList()
739 if (!ctxt->check) in xmlCtxtDumpEntity()
740 fprintf(ctxt->output, "Entity is NULL\n"); in xmlCtxtDumpEntity()
743 if (!ctxt->check) { in xmlCtxtDumpEntity()
744 switch (ent->etype) { in xmlCtxtDumpEntity()
746 fprintf(ctxt->output, "INTERNAL_GENERAL_ENTITY "); in xmlCtxtDumpEntity()
749 fprintf(ctxt->output, "EXTERNAL_GENERAL_PARSED_ENTITY "); in xmlCtxtDumpEntity()
752 fprintf(ctxt->output, "EXTERNAL_GENERAL_UNPARSED_ENTITY "); in xmlCtxtDumpEntity()
755 fprintf(ctxt->output, "INTERNAL_PARAMETER_ENTITY "); in xmlCtxtDumpEntity()
758 fprintf(ctxt->output, "EXTERNAL_PARAMETER_ENTITY "); in xmlCtxtDumpEntity()
761 fprintf(ctxt->output, "ENTITY_%d ! ", (int) ent->etype); in xmlCtxtDumpEntity()
763 fprintf(ctxt->output, "%s\n", ent->name); in xmlCtxtDumpEntity()
764 if (ent->ExternalID) { in xmlCtxtDumpEntity()
766 fprintf(ctxt->output, "ExternalID=%s\n", in xmlCtxtDumpEntity()
767 (char *) ent->ExternalID); in xmlCtxtDumpEntity()
769 if (ent->SystemID) { in xmlCtxtDumpEntity()
771 fprintf(ctxt->output, "SystemID=%s\n", (char *) ent->SystemID); in xmlCtxtDumpEntity()
773 if (ent->URI) { in xmlCtxtDumpEntity()
775 fprintf(ctxt->output, "URI=%s\n", (char *) ent->URI); in xmlCtxtDumpEntity()
777 if (ent->content) { in xmlCtxtDumpEntity()
779 fprintf(ctxt->output, "content="); in xmlCtxtDumpEntity()
780 xmlCtxtDumpString(ctxt, ent->content); in xmlCtxtDumpEntity()
781 fprintf(ctxt->output, "\n"); in xmlCtxtDumpEntity()
788 * @output: the FILE * for the output
800 if (!ctxt->check) in xmlCtxtDumpAttr()
801 fprintf(ctxt->output, "Attr is NULL"); in xmlCtxtDumpAttr()
804 if (!ctxt->check) { in xmlCtxtDumpAttr()
805 fprintf(ctxt->output, "ATTRIBUTE "); in xmlCtxtDumpAttr()
806 xmlCtxtDumpString(ctxt, attr->name); in xmlCtxtDumpAttr()
807 fprintf(ctxt->output, "\n"); in xmlCtxtDumpAttr()
808 if (attr->children != NULL) { in xmlCtxtDumpAttr()
809 ctxt->depth++; in xmlCtxtDumpAttr()
810 xmlCtxtDumpNodeList(ctxt, attr->children); in xmlCtxtDumpAttr()
811 ctxt->depth--; in xmlCtxtDumpAttr()
814 if (attr->name == NULL) in xmlCtxtDumpAttr()
826 * @output: the FILE * for the output
837 attr = attr->next; in xmlCtxtDumpAttrList()
843 * @output: the FILE * for the output
853 if (!ctxt->check) { in xmlCtxtDumpOneNode()
855 fprintf(ctxt->output, "node is NULL\n"); in xmlCtxtDumpOneNode()
859 ctxt->node = node; in xmlCtxtDumpOneNode()
861 switch (node->type) { in xmlCtxtDumpOneNode()
863 if (!ctxt->check) { in xmlCtxtDumpOneNode()
865 fprintf(ctxt->output, "ELEMENT "); in xmlCtxtDumpOneNode()
866 if ((node->ns != NULL) && (node->ns->prefix != NULL)) { in xmlCtxtDumpOneNode()
867 xmlCtxtDumpString(ctxt, node->ns->prefix); in xmlCtxtDumpOneNode()
868 fprintf(ctxt->output, ":"); in xmlCtxtDumpOneNode()
870 xmlCtxtDumpString(ctxt, node->name); in xmlCtxtDumpOneNode()
871 fprintf(ctxt->output, "\n"); in xmlCtxtDumpOneNode()
875 if (!ctxt->check) in xmlCtxtDumpOneNode()
877 fprintf(ctxt->output, "Error, ATTRIBUTE found here\n"); in xmlCtxtDumpOneNode()
881 if (!ctxt->check) { in xmlCtxtDumpOneNode()
883 if (node->name == (const xmlChar *) xmlStringTextNoenc) in xmlCtxtDumpOneNode()
884 fprintf(ctxt->output, "TEXT no enc"); in xmlCtxtDumpOneNode()
886 fprintf(ctxt->output, "TEXT"); in xmlCtxtDumpOneNode()
887 if (ctxt->options & DUMP_TEXT_TYPE) { in xmlCtxtDumpOneNode()
888 if (node->content == (xmlChar *) &(node->properties)) in xmlCtxtDumpOneNode()
889 fprintf(ctxt->output, " compact\n"); in xmlCtxtDumpOneNode()
890 else if (xmlDictOwns(ctxt->dict, node->content) == 1) in xmlCtxtDumpOneNode()
891 fprintf(ctxt->output, " interned\n"); in xmlCtxtDumpOneNode()
893 fprintf(ctxt->output, "\n"); in xmlCtxtDumpOneNode()
895 fprintf(ctxt->output, "\n"); in xmlCtxtDumpOneNode()
899 if (!ctxt->check) { in xmlCtxtDumpOneNode()
901 fprintf(ctxt->output, "CDATA_SECTION\n"); in xmlCtxtDumpOneNode()
905 if (!ctxt->check) { in xmlCtxtDumpOneNode()
907 fprintf(ctxt->output, "ENTITY_REF(%s)\n", in xmlCtxtDumpOneNode()
908 (char *) node->name); in xmlCtxtDumpOneNode()
912 if (!ctxt->check) { in xmlCtxtDumpOneNode()
914 fprintf(ctxt->output, "ENTITY\n"); in xmlCtxtDumpOneNode()
918 if (!ctxt->check) { in xmlCtxtDumpOneNode()
920 fprintf(ctxt->output, "PI %s\n", (char *) node->name); in xmlCtxtDumpOneNode()
924 if (!ctxt->check) { in xmlCtxtDumpOneNode()
926 fprintf(ctxt->output, "COMMENT\n"); in xmlCtxtDumpOneNode()
931 if (!ctxt->check) { in xmlCtxtDumpOneNode()
934 fprintf(ctxt->output, "Error, DOCUMENT found here\n"); in xmlCtxtDumpOneNode()
938 if (!ctxt->check) { in xmlCtxtDumpOneNode()
940 fprintf(ctxt->output, "DOCUMENT_TYPE\n"); in xmlCtxtDumpOneNode()
944 if (!ctxt->check) { in xmlCtxtDumpOneNode()
946 fprintf(ctxt->output, "DOCUMENT_FRAG\n"); in xmlCtxtDumpOneNode()
950 if (!ctxt->check) { in xmlCtxtDumpOneNode()
952 fprintf(ctxt->output, "NOTATION\n"); in xmlCtxtDumpOneNode()
971 if (!ctxt->check) { in xmlCtxtDumpOneNode()
973 fprintf(ctxt->output, "INCLUDE START\n"); in xmlCtxtDumpOneNode()
977 if (!ctxt->check) { in xmlCtxtDumpOneNode()
979 fprintf(ctxt->output, "INCLUDE END\n"); in xmlCtxtDumpOneNode()
983 if (!ctxt->check) in xmlCtxtDumpOneNode()
986 "Unknown node type %d\n", node->type); in xmlCtxtDumpOneNode()
989 if (node->doc == NULL) { in xmlCtxtDumpOneNode()
990 if (!ctxt->check) { in xmlCtxtDumpOneNode()
993 fprintf(ctxt->output, "PBM: doc == NULL !!!\n"); in xmlCtxtDumpOneNode()
995 ctxt->depth++; in xmlCtxtDumpOneNode()
996 if ((node->type == XML_ELEMENT_NODE) && (node->nsDef != NULL)) in xmlCtxtDumpOneNode()
997 xmlCtxtDumpNamespaceList(ctxt, node->nsDef); in xmlCtxtDumpOneNode()
998 if ((node->type == XML_ELEMENT_NODE) && (node->properties != NULL)) in xmlCtxtDumpOneNode()
999 xmlCtxtDumpAttrList(ctxt, node->properties); in xmlCtxtDumpOneNode()
1000 if (node->type != XML_ENTITY_REF_NODE) { in xmlCtxtDumpOneNode()
1001 if ((node->type != XML_ELEMENT_NODE) && (node->content != NULL)) { in xmlCtxtDumpOneNode()
1002 if (!ctxt->check) { in xmlCtxtDumpOneNode()
1004 fprintf(ctxt->output, "content="); in xmlCtxtDumpOneNode()
1005 xmlCtxtDumpString(ctxt, node->content); in xmlCtxtDumpOneNode()
1006 fprintf(ctxt->output, "\n"); in xmlCtxtDumpOneNode()
1012 ent = xmlGetDocEntity(node->doc, node->name); in xmlCtxtDumpOneNode()
1016 ctxt->depth--; in xmlCtxtDumpOneNode()
1026 * @output: the FILE * for the output
1036 if (!ctxt->check) { in xmlCtxtDumpNode()
1038 fprintf(ctxt->output, "node is NULL\n"); in xmlCtxtDumpNode()
1043 if ((node->type != XML_NAMESPACE_DECL) && in xmlCtxtDumpNode()
1044 (node->children != NULL) && (node->type != XML_ENTITY_REF_NODE)) { in xmlCtxtDumpNode()
1045 ctxt->depth++; in xmlCtxtDumpNode()
1046 xmlCtxtDumpNodeList(ctxt, node->children); in xmlCtxtDumpNode()
1047 ctxt->depth--; in xmlCtxtDumpNode()
1053 * @output: the FILE * for the output
1064 node = node->next; in xmlCtxtDumpNodeList()
1072 if (!ctxt->check) in xmlCtxtDumpDocHead()
1073 fprintf(ctxt->output, "DOCUMENT == NULL !\n"); in xmlCtxtDumpDocHead()
1076 ctxt->node = (xmlNodePtr) doc; in xmlCtxtDumpDocHead()
1078 switch (doc->type) { in xmlCtxtDumpDocHead()
1112 if (!ctxt->check) in xmlCtxtDumpDocHead()
1113 fprintf(ctxt->output, "DOCUMENT\n"); in xmlCtxtDumpDocHead()
1116 if (!ctxt->check) in xmlCtxtDumpDocHead()
1117 fprintf(ctxt->output, "HTML DOCUMENT\n"); in xmlCtxtDumpDocHead()
1133 "Unknown node type %d\n", doc->type); in xmlCtxtDumpDocHead()
1139 * @output: the FILE * for the output
1149 if (!ctxt->check) { in xmlCtxtDumpDocumentHead()
1150 if (doc->name != NULL) { in xmlCtxtDumpDocumentHead()
1151 fprintf(ctxt->output, "name="); in xmlCtxtDumpDocumentHead()
1152 xmlCtxtDumpString(ctxt, BAD_CAST doc->name); in xmlCtxtDumpDocumentHead()
1153 fprintf(ctxt->output, "\n"); in xmlCtxtDumpDocumentHead()
1155 if (doc->version != NULL) { in xmlCtxtDumpDocumentHead()
1156 fprintf(ctxt->output, "version="); in xmlCtxtDumpDocumentHead()
1157 xmlCtxtDumpString(ctxt, doc->version); in xmlCtxtDumpDocumentHead()
1158 fprintf(ctxt->output, "\n"); in xmlCtxtDumpDocumentHead()
1160 if (doc->encoding != NULL) { in xmlCtxtDumpDocumentHead()
1161 fprintf(ctxt->output, "encoding="); in xmlCtxtDumpDocumentHead()
1162 xmlCtxtDumpString(ctxt, doc->encoding); in xmlCtxtDumpDocumentHead()
1163 fprintf(ctxt->output, "\n"); in xmlCtxtDumpDocumentHead()
1165 if (doc->URL != NULL) { in xmlCtxtDumpDocumentHead()
1166 fprintf(ctxt->output, "URL="); in xmlCtxtDumpDocumentHead()
1167 xmlCtxtDumpString(ctxt, doc->URL); in xmlCtxtDumpDocumentHead()
1168 fprintf(ctxt->output, "\n"); in xmlCtxtDumpDocumentHead()
1170 if (doc->standalone) in xmlCtxtDumpDocumentHead()
1171 fprintf(ctxt->output, "standalone=true\n"); in xmlCtxtDumpDocumentHead()
1173 if (doc->oldNs != NULL) in xmlCtxtDumpDocumentHead()
1174 xmlCtxtDumpNamespaceList(ctxt, doc->oldNs); in xmlCtxtDumpDocumentHead()
1179 * @output: the FILE * for the output
1188 if (!ctxt->check) in xmlCtxtDumpDocument()
1189 fprintf(ctxt->output, "DOCUMENT == NULL !\n"); in xmlCtxtDumpDocument()
1193 if (((doc->type == XML_DOCUMENT_NODE) || in xmlCtxtDumpDocument()
1194 (doc->type == XML_HTML_DOCUMENT_NODE)) in xmlCtxtDumpDocument()
1195 && (doc->children != NULL)) { in xmlCtxtDumpDocument()
1196 ctxt->depth++; in xmlCtxtDumpDocument()
1197 xmlCtxtDumpNodeList(ctxt, doc->children); in xmlCtxtDumpDocument()
1198 ctxt->depth--; in xmlCtxtDumpDocument()
1209 if (!ctxt->check) in xmlCtxtDumpEntityCallback()
1210 fprintf(ctxt->output, "Entity is NULL"); in xmlCtxtDumpEntityCallback()
1213 if (!ctxt->check) { in xmlCtxtDumpEntityCallback()
1214 fprintf(ctxt->output, "%s : ", (char *) cur->name); in xmlCtxtDumpEntityCallback()
1215 switch (cur->etype) { in xmlCtxtDumpEntityCallback()
1217 fprintf(ctxt->output, "INTERNAL GENERAL, "); in xmlCtxtDumpEntityCallback()
1220 fprintf(ctxt->output, "EXTERNAL PARSED, "); in xmlCtxtDumpEntityCallback()
1223 fprintf(ctxt->output, "EXTERNAL UNPARSED, "); in xmlCtxtDumpEntityCallback()
1226 fprintf(ctxt->output, "INTERNAL PARAMETER, "); in xmlCtxtDumpEntityCallback()
1229 fprintf(ctxt->output, "EXTERNAL PARAMETER, "); in xmlCtxtDumpEntityCallback()
1233 "Unknown entity type %d\n", cur->etype); in xmlCtxtDumpEntityCallback()
1235 if (cur->ExternalID != NULL) in xmlCtxtDumpEntityCallback()
1236 fprintf(ctxt->output, "ID \"%s\"", (char *) cur->ExternalID); in xmlCtxtDumpEntityCallback()
1237 if (cur->SystemID != NULL) in xmlCtxtDumpEntityCallback()
1238 fprintf(ctxt->output, "SYSTEM \"%s\"", (char *) cur->SystemID); in xmlCtxtDumpEntityCallback()
1239 if (cur->orig != NULL) in xmlCtxtDumpEntityCallback()
1240 fprintf(ctxt->output, "\n orig \"%s\"", (char *) cur->orig); in xmlCtxtDumpEntityCallback()
1241 if ((cur->type != XML_ELEMENT_NODE) && (cur->content != NULL)) in xmlCtxtDumpEntityCallback()
1242 fprintf(ctxt->output, "\n content \"%s\"", in xmlCtxtDumpEntityCallback()
1243 (char *) cur->content); in xmlCtxtDumpEntityCallback()
1244 fprintf(ctxt->output, "\n"); in xmlCtxtDumpEntityCallback()
1250 * @output: the FILE * for the output
1260 if ((doc->intSubset != NULL) && (doc->intSubset->entities != NULL)) { in xmlCtxtDumpEntities()
1262 doc->intSubset->entities; in xmlCtxtDumpEntities()
1264 if (!ctxt->check) in xmlCtxtDumpEntities()
1265 fprintf(ctxt->output, "Entities in internal subset\n"); in xmlCtxtDumpEntities()
1268 fprintf(ctxt->output, "No entities in internal subset\n"); in xmlCtxtDumpEntities()
1269 if ((doc->extSubset != NULL) && (doc->extSubset->entities != NULL)) { in xmlCtxtDumpEntities()
1271 doc->extSubset->entities; in xmlCtxtDumpEntities()
1273 if (!ctxt->check) in xmlCtxtDumpEntities()
1274 fprintf(ctxt->output, "Entities in external subset\n"); in xmlCtxtDumpEntities()
1276 } else if (!ctxt->check) in xmlCtxtDumpEntities()
1277 fprintf(ctxt->output, "No entities in external subset\n"); in xmlCtxtDumpEntities()
1282 * @output: the FILE * for the output
1291 if (!ctxt->check) in xmlCtxtDumpDTD()
1292 fprintf(ctxt->output, "DTD is NULL\n"); in xmlCtxtDumpDTD()
1296 if (dtd->children == NULL) in xmlCtxtDumpDTD()
1297 fprintf(ctxt->output, " DTD is empty\n"); in xmlCtxtDumpDTD()
1299 ctxt->depth++; in xmlCtxtDumpDTD()
1300 xmlCtxtDumpNodeList(ctxt, dtd->children); in xmlCtxtDumpDTD()
1301 ctxt->depth--; in xmlCtxtDumpDTD()
1313 * @output: the FILE * for the output
1319 xmlDebugDumpString(FILE * output, const xmlChar * str) in xmlDebugDumpString() argument
1323 if (output == NULL) in xmlDebugDumpString()
1324 output = stdout; in xmlDebugDumpString()
1326 fprintf(output, "(NULL)"); in xmlDebugDumpString()
1333 fputc(' ', output); in xmlDebugDumpString()
1335 fprintf(output, "#%X", str[i]); in xmlDebugDumpString()
1337 fputc(str[i], output); in xmlDebugDumpString()
1338 fprintf(output, "..."); in xmlDebugDumpString()
1343 * @output: the FILE * for the output
1350 xmlDebugDumpAttr(FILE *output, xmlAttrPtr attr, int depth) { in xmlDebugDumpAttr() argument
1353 if (output == NULL) return; in xmlDebugDumpAttr()
1355 ctxt.output = output; in xmlDebugDumpAttr()
1364 * @output: the FILE * for the output
1370 xmlDebugDumpEntities(FILE * output, xmlDocPtr doc) in xmlDebugDumpEntities() argument
1374 if (output == NULL) return; in xmlDebugDumpEntities()
1376 ctxt.output = output; in xmlDebugDumpEntities()
1383 * @output: the FILE * for the output
1390 xmlDebugDumpAttrList(FILE * output, xmlAttrPtr attr, int depth) in xmlDebugDumpAttrList() argument
1394 if (output == NULL) return; in xmlDebugDumpAttrList()
1396 ctxt.output = output; in xmlDebugDumpAttrList()
1404 * @output: the FILE * for the output
1411 xmlDebugDumpOneNode(FILE * output, xmlNodePtr node, int depth) in xmlDebugDumpOneNode() argument
1415 if (output == NULL) return; in xmlDebugDumpOneNode()
1417 ctxt.output = output; in xmlDebugDumpOneNode()
1425 * @output: the FILE * for the output
1432 xmlDebugDumpNode(FILE * output, xmlNodePtr node, int depth) in xmlDebugDumpNode() argument
1436 if (output == NULL) in xmlDebugDumpNode()
1437 output = stdout; in xmlDebugDumpNode()
1439 ctxt.output = output; in xmlDebugDumpNode()
1447 * @output: the FILE * for the output
1454 xmlDebugDumpNodeList(FILE * output, xmlNodePtr node, int depth) in xmlDebugDumpNodeList() argument
1458 if (output == NULL) in xmlDebugDumpNodeList()
1459 output = stdout; in xmlDebugDumpNodeList()
1461 ctxt.output = output; in xmlDebugDumpNodeList()
1469 * @output: the FILE * for the output
1475 xmlDebugDumpDocumentHead(FILE * output, xmlDocPtr doc) in xmlDebugDumpDocumentHead() argument
1479 if (output == NULL) in xmlDebugDumpDocumentHead()
1480 output = stdout; in xmlDebugDumpDocumentHead()
1483 ctxt.output = output; in xmlDebugDumpDocumentHead()
1490 * @output: the FILE * for the output
1496 xmlDebugDumpDocument(FILE * output, xmlDocPtr doc) in xmlDebugDumpDocument() argument
1500 if (output == NULL) in xmlDebugDumpDocument()
1501 output = stdout; in xmlDebugDumpDocument()
1504 ctxt.output = output; in xmlDebugDumpDocument()
1511 * @output: the FILE * for the output
1517 xmlDebugDumpDTD(FILE * output, xmlDtdPtr dtd) in xmlDebugDumpDTD() argument
1521 if (output == NULL) in xmlDebugDumpDTD()
1522 output = stdout; in xmlDebugDumpDTD()
1525 ctxt.output = output; in xmlDebugDumpDTD()
1538 * @output: the FILE * for the output
1541 * Check the document for potential content problems, and output
1542 * the errors to @output
1547 xmlDebugCheckDocument(FILE * output, xmlDocPtr doc) in xmlDebugCheckDocument() argument
1551 if (output == NULL) in xmlDebugCheckDocument()
1552 output = stdout; in xmlDebugCheckDocument()
1554 ctxt.output = output; in xmlDebugCheckDocument()