* entityDeclDebug: * @ctxt: An XML parser context * @name: the entity name * @type: the entity type * @publicId: The public ID of the entity * @systemId: The system ID of the entity * @content: the entity value (without processing). * * An entity definition has been parsed */
| 775 | * An entity definition has been parsed |
| 776 | */ |
| 777 | static void |
| 778 | entityDeclDebug(void *ctx, const xmlChar *name, int type, |
| 779 | const xmlChar *publicId, const xmlChar *systemId, xmlChar *content) |
| 780 | { |
| 781 | debugContext *ctxt = ctx; |
| 782 | xmlEntityPtr ent; |
| 783 | const xmlChar *nullstr = BAD_CAST "(null)"; |
| 784 | |
| 785 | ent = xmlNewEntity(NULL, name, type, publicId, systemId, content); |
| 786 | if (systemId != NULL) |
| 787 | ent->URI = xmlBuildURI(systemId, (const xmlChar *) ctxt->filename); |
| 788 | |
| 789 | if ((type == XML_INTERNAL_PARAMETER_ENTITY) || |
| 790 | (type == XML_EXTERNAL_PARAMETER_ENTITY)) |
| 791 | xmlHashAddEntry(ctxt->parameterEntities, name, ent); |
| 792 | else |
| 793 | xmlHashAddEntry(ctxt->generalEntities, name, ent); |
| 794 | |
| 795 | /* not all libraries handle printing null pointers nicely */ |
| 796 | if (publicId == NULL) |
| 797 | publicId = nullstr; |
| 798 | if (systemId == NULL) |
| 799 | systemId = nullstr; |
| 800 | if (content == NULL) |
| 801 | content = (xmlChar *)nullstr; |
| 802 | callbacks++; |
| 803 | if (quiet) |
| 804 | return; |
| 805 | fprintf(SAXdebug, "SAX.entityDecl(%s, %d, %s, %s, %s)\n", |
| 806 | name, type, publicId, systemId, content); |
| 807 | } |
| 808 | |
| 809 | /** |
| 810 | * attributeDeclDebug: |
nothing calls this directly
no test coverage detected