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