| 1733 | } |
| 1734 | |
| 1735 | XML_Parser XMLCALL |
| 1736 | XML_ExternalEntityParserCreate(XML_Parser oldParser, const XML_Char *context, |
| 1737 | const XML_Char *encodingName) { |
| 1738 | XML_Parser parser = oldParser; |
| 1739 | DTD *newDtd = NULL; |
| 1740 | DTD *oldDtd; |
| 1741 | XML_StartElementHandler oldStartElementHandler; |
| 1742 | XML_EndElementHandler oldEndElementHandler; |
| 1743 | XML_CharacterDataHandler oldCharacterDataHandler; |
| 1744 | XML_ProcessingInstructionHandler oldProcessingInstructionHandler; |
| 1745 | XML_CommentHandler oldCommentHandler; |
| 1746 | XML_StartCdataSectionHandler oldStartCdataSectionHandler; |
| 1747 | XML_EndCdataSectionHandler oldEndCdataSectionHandler; |
| 1748 | XML_DefaultHandler oldDefaultHandler; |
| 1749 | XML_UnparsedEntityDeclHandler oldUnparsedEntityDeclHandler; |
| 1750 | XML_NotationDeclHandler oldNotationDeclHandler; |
| 1751 | XML_StartNamespaceDeclHandler oldStartNamespaceDeclHandler; |
| 1752 | XML_EndNamespaceDeclHandler oldEndNamespaceDeclHandler; |
| 1753 | XML_NotStandaloneHandler oldNotStandaloneHandler; |
| 1754 | XML_ExternalEntityRefHandler oldExternalEntityRefHandler; |
| 1755 | XML_SkippedEntityHandler oldSkippedEntityHandler; |
| 1756 | XML_UnknownEncodingHandler oldUnknownEncodingHandler; |
| 1757 | XML_ElementDeclHandler oldElementDeclHandler; |
| 1758 | XML_AttlistDeclHandler oldAttlistDeclHandler; |
| 1759 | XML_EntityDeclHandler oldEntityDeclHandler; |
| 1760 | XML_XmlDeclHandler oldXmlDeclHandler; |
| 1761 | ELEMENT_TYPE *oldDeclElementType; |
| 1762 | |
| 1763 | void *oldUserData; |
| 1764 | void *oldHandlerArg; |
| 1765 | XML_Bool oldDefaultExpandInternalEntities; |
| 1766 | XML_Parser oldExternalEntityRefHandlerArg; |
| 1767 | #ifdef XML_DTD |
| 1768 | enum XML_ParamEntityParsing oldParamEntityParsing; |
| 1769 | int oldInEntityValue; |
| 1770 | #endif |
| 1771 | XML_Bool oldns_triplets; |
| 1772 | /* Note that the new parser shares the same hash secret as the old |
| 1773 | parser, so that dtdCopy and copyEntityTable can lookup values |
| 1774 | from hash tables associated with either parser without us having |
| 1775 | to worry which hash secrets each table has. |
| 1776 | */ |
| 1777 | unsigned long oldhash_secret_salt; |
| 1778 | XML_Bool oldReparseDeferralEnabled; |
| 1779 | |
| 1780 | /* Validate the oldParser parameter before we pull everything out of it */ |
| 1781 | if (oldParser == NULL) |
| 1782 | return NULL; |
| 1783 | |
| 1784 | /* Stash the original parser contents on the stack */ |
| 1785 | oldDtd = parser->m_dtd; |
| 1786 | oldStartElementHandler = parser->m_startElementHandler; |
| 1787 | oldEndElementHandler = parser->m_endElementHandler; |
| 1788 | oldCharacterDataHandler = parser->m_characterDataHandler; |
| 1789 | oldProcessingInstructionHandler = parser->m_processingInstructionHandler; |
| 1790 | oldCommentHandler = parser->m_commentHandler; |
| 1791 | oldStartCdataSectionHandler = parser->m_startCdataSectionHandler; |
| 1792 | oldEndCdataSectionHandler = parser->m_endCdataSectionHandler; |
nothing calls this directly
no test coverage detected
searching dependent graphs…