MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlCtxtDumpEntityDecl

Function xmlCtxtDumpEntityDecl

ThirdParty/libxml2/vtklibxml2/debugXML.c:626–697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

624}
625
626static void
627xmlCtxtDumpEntityDecl(xmlDebugCtxtPtr ctxt, xmlEntityPtr ent)
628{
629 xmlCtxtDumpSpaces(ctxt);
630
631 if (ent == NULL) {
632 if (!ctxt->check)
633 fprintf(ctxt->output, "Entity declaration is NULL\n");
634 return;
635 }
636 if (ent->type != XML_ENTITY_DECL) {
637 xmlDebugErr(ctxt, XML_CHECK_NOT_ENTITY_DECL,
638 "Node is not an entity declaration");
639 return;
640 }
641 if (ent->name != NULL) {
642 if (!ctxt->check) {
643 fprintf(ctxt->output, "ENTITYDECL(");
644 xmlCtxtDumpString(ctxt, ent->name);
645 fprintf(ctxt->output, ")");
646 }
647 } else
648 xmlDebugErr(ctxt, XML_CHECK_NO_NAME,
649 "Entity declaration has no name");
650 if (!ctxt->check) {
651 switch (ent->etype) {
652 case XML_INTERNAL_GENERAL_ENTITY:
653 fprintf(ctxt->output, ", internal\n");
654 break;
655 case XML_EXTERNAL_GENERAL_PARSED_ENTITY:
656 fprintf(ctxt->output, ", external parsed\n");
657 break;
658 case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY:
659 fprintf(ctxt->output, ", unparsed\n");
660 break;
661 case XML_INTERNAL_PARAMETER_ENTITY:
662 fprintf(ctxt->output, ", parameter\n");
663 break;
664 case XML_EXTERNAL_PARAMETER_ENTITY:
665 fprintf(ctxt->output, ", external parameter\n");
666 break;
667 case XML_INTERNAL_PREDEFINED_ENTITY:
668 fprintf(ctxt->output, ", predefined\n");
669 break;
670 }
671 if (ent->ExternalID) {
672 xmlCtxtDumpSpaces(ctxt);
673 fprintf(ctxt->output, " ExternalID=%s\n",
674 (char *) ent->ExternalID);
675 }
676 if (ent->SystemID) {
677 xmlCtxtDumpSpaces(ctxt);
678 fprintf(ctxt->output, " SystemID=%s\n",
679 (char *) ent->SystemID);
680 }
681 if (ent->URI != NULL) {
682 xmlCtxtDumpSpaces(ctxt);
683 fprintf(ctxt->output, " URI=%s\n", (char *) ent->URI);

Callers 1

xmlCtxtDumpOneNodeFunction · 0.85

Calls 5

xmlCtxtDumpSpacesFunction · 0.85
fprintfFunction · 0.85
xmlDebugErrFunction · 0.85
xmlCtxtDumpStringFunction · 0.85
xmlCtxtGenericNodeCheckFunction · 0.85

Tested by

no test coverage detected