| 743 | } |
| 744 | |
| 745 | static void |
| 746 | xmlCtxtDumpEntity(xmlDebugCtxtPtr ctxt, xmlEntityPtr ent) |
| 747 | { |
| 748 | xmlCtxtDumpSpaces(ctxt); |
| 749 | |
| 750 | if (ent == NULL) { |
| 751 | if (!ctxt->check) |
| 752 | fprintf(ctxt->output, "Entity is NULL\n"); |
| 753 | return; |
| 754 | } |
| 755 | if (!ctxt->check) { |
| 756 | switch (ent->etype) { |
| 757 | case XML_INTERNAL_GENERAL_ENTITY: |
| 758 | fprintf(ctxt->output, "INTERNAL_GENERAL_ENTITY "); |
| 759 | break; |
| 760 | case XML_EXTERNAL_GENERAL_PARSED_ENTITY: |
| 761 | fprintf(ctxt->output, "EXTERNAL_GENERAL_PARSED_ENTITY "); |
| 762 | break; |
| 763 | case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY: |
| 764 | fprintf(ctxt->output, "EXTERNAL_GENERAL_UNPARSED_ENTITY "); |
| 765 | break; |
| 766 | case XML_INTERNAL_PARAMETER_ENTITY: |
| 767 | fprintf(ctxt->output, "INTERNAL_PARAMETER_ENTITY "); |
| 768 | break; |
| 769 | case XML_EXTERNAL_PARAMETER_ENTITY: |
| 770 | fprintf(ctxt->output, "EXTERNAL_PARAMETER_ENTITY "); |
| 771 | break; |
| 772 | default: |
| 773 | fprintf(ctxt->output, "ENTITY_%d ! ", (int) ent->etype); |
| 774 | } |
| 775 | fprintf(ctxt->output, "%s\n", ent->name); |
| 776 | if (ent->ExternalID) { |
| 777 | xmlCtxtDumpSpaces(ctxt); |
| 778 | fprintf(ctxt->output, "ExternalID=%s\n", |
| 779 | (char *) ent->ExternalID); |
| 780 | } |
| 781 | if (ent->SystemID) { |
| 782 | xmlCtxtDumpSpaces(ctxt); |
| 783 | fprintf(ctxt->output, "SystemID=%s\n", (char *) ent->SystemID); |
| 784 | } |
| 785 | if (ent->URI) { |
| 786 | xmlCtxtDumpSpaces(ctxt); |
| 787 | fprintf(ctxt->output, "URI=%s\n", (char *) ent->URI); |
| 788 | } |
| 789 | if (ent->content) { |
| 790 | xmlCtxtDumpSpaces(ctxt); |
| 791 | fprintf(ctxt->output, "content="); |
| 792 | xmlCtxtDumpString(ctxt, ent->content); |
| 793 | fprintf(ctxt->output, "\n"); |
| 794 | } |
| 795 | } |
| 796 | } |
| 797 | |
| 798 | /** |
| 799 | * xmlCtxtDumpAttr: |
no test coverage detected