From d009e2fa33a5b7708b776a064eed393a78fe1489 Mon Sep 17 00:00:00 2001 From: Alberto Massari <amassari@apache.org> Date: Thu, 8 Dec 2005 15:57:46 +0000 Subject: [PATCH] Rename DOMEntityResolver into DOMLSResourceResolver git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@355132 13f79535-47bb-0310-9956-ffa450edef68 --- .../VC6/xerces-all/XercesLib/XercesLib.dsp | 12 +- .../xerces-all/XercesLib/XercesLib.vcproj | 6 +- .../VC8/xerces-all/XercesLib/XercesLib.vcproj | 8 +- src/Makefile.am | 2 +- src/Makefile.in | 2 +- src/xercesc/dom/DOM.hpp | 2 +- src/xercesc/dom/DOMLSInput.hpp | 4 +- src/xercesc/dom/DOMLSOutput.hpp | 105 +----------------- src/xercesc/dom/DOMLSParser.hpp | 1 - ...Resolver.hpp => DOMLSResourceResolver.hpp} | 76 +++++++------ src/xercesc/parsers/DOMLSParserImpl.cpp | 16 +-- src/xercesc/parsers/DOMLSParserImpl.hpp | 5 +- src/xercesc/parsers/XercesDOMParser.hpp | 2 +- 13 files changed, 72 insertions(+), 169 deletions(-) rename src/xercesc/dom/{DOMEntityResolver.hpp => DOMLSResourceResolver.hpp} (50%) diff --git a/Projects/Win32/VC6/xerces-all/XercesLib/XercesLib.dsp b/Projects/Win32/VC6/xerces-all/XercesLib/XercesLib.dsp index f3c885763..a3e619caf 100644 --- a/Projects/Win32/VC6/xerces-all/XercesLib/XercesLib.dsp +++ b/Projects/Win32/VC6/xerces-all/XercesLib/XercesLib.dsp @@ -45,7 +45,7 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /GB /MD /W3 /GX /O2 /Ob2 /I "..\..\..\..\..\src" /D "NDEBUG" /D "PLATFORM_WIN32" /D "_CRTDBG_MAP_ALLOC" /D "XERCES_USE_FILEMGR_WINDOWS" /D "XERCES_USE_MUTEXMGR_WINDOWS" /D "XERCES_USE_ATOMICOPMGR_WINDOWS" /D "XERCES_USE_NETACCESSOR_WINSOCK" /D "XERCES_USE_WIN32_MSGLOADER" /D "XERCES_USE_TRANSCODER_WINDOWS" /D "XERCES_PATH_DELIMITER_BACKSLASH" /D "XERCES_BUILDING_LIBRARY" /D "WIN32" /D "_WINDOWS" /D "HAVE_FTIME" /D "HAVE_LIMITS_H" /D "HAVE_SYS_TIMEB_H" /D "HAVE_STRICMP" /D "HAVE_STRNICMP" /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /Ob2 /I "..\..\..\..\..\src" /D "NDEBUG" /D "PLATFORM_WIN32" /D "_CRTDBG_MAP_ALLOC" /D "XERCES_USE_FILEMGR_WINDOWS" /D "XERCES_USE_MUTEXMGR_WINDOWS" /D "XERCES_USE_ATOMICOPMGR_WINDOWS" /D "XERCES_USE_NETACCESSOR_WINSOCK" /D "XERCES_USE_WIN32_MSGLOADER" /D "XERCES_USE_TRANSCODER_WINDOWS" /D "XERCES_PATH_DELIMITER_BACKSLASH" /D "XERCES_BUILDING_LIBRARY" /D "WIN32" /D "_WINDOWS" /D "HAVE_FTIME" /D "HAVE_LIMITS_H" /D "HAVE_SYS_TIMEB_H" /D "HAVE_STRICMP" /D "HAVE_STRNICMP" /FD /c # SUBTRACT CPP /Fr # ADD BASE MTL /D "NDEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /D "NDEBUG" /mktyplib203 /o "NUL" /win32 @@ -71,7 +71,7 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c -# ADD CPP /nologo /GB /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\..\src" /D "_DEBUG" /D "_CRTDBG_MAP_ALLOC" /D "XERCES_USE_FILEMGR_WINDOWS" /D "XERCES_USE_MUTEXMGR_WINDOWS" /D "XERCES_USE_ATOMICOPMGR_WINDOWS" /D "XERCES_USE_NETACCESSOR_WINSOCK" /D "XERCES_USE_WIN32_MSGLOADER" /D "XERCES_USE_TRANSCODER_WINDOWS" /D "XERCES_PATH_DELIMITER_BACKSLASH" /D "XERCES_BUILDING_LIBRARY" /D "WIN32" /D "_WINDOWS" /D "HAVE_FTIME" /D "HAVE_LIMITS_H" /D "HAVE_SYS_TIMEB_H" /D "HAVE_STRICMP" /D "HAVE_STRNICMP" /FD /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\..\src" /D "_DEBUG" /D "_CRTDBG_MAP_ALLOC" /D "XERCES_USE_FILEMGR_WINDOWS" /D "XERCES_USE_MUTEXMGR_WINDOWS" /D "XERCES_USE_ATOMICOPMGR_WINDOWS" /D "XERCES_USE_NETACCESSOR_WINSOCK" /D "XERCES_USE_WIN32_MSGLOADER" /D "XERCES_USE_TRANSCODER_WINDOWS" /D "XERCES_PATH_DELIMITER_BACKSLASH" /D "XERCES_BUILDING_LIBRARY" /D "WIN32" /D "_WINDOWS" /D "HAVE_FTIME" /D "HAVE_LIMITS_H" /D "HAVE_SYS_TIMEB_H" /D "HAVE_STRICMP" /D "HAVE_STRNICMP" /FD /c # SUBTRACT CPP /Fr # ADD BASE MTL /D "_DEBUG" /mktyplib203 /o "NUL" /win32 # ADD MTL /D "_DEBUG" /mktyplib203 /o "NUL" /win32 @@ -3184,10 +3184,6 @@ SOURCE=..\..\..\..\..\src\xercesc\dom\DOMEntityReference.hpp # End Source File # Begin Source File -SOURCE=..\..\..\..\..\src\xercesc\dom\DOMEntityResolver.hpp -# End Source File -# Begin Source File - SOURCE=..\..\..\..\..\src\xercesc\dom\DOMError.hpp # End Source File # Begin Source File @@ -3252,6 +3248,10 @@ SOURCE=..\..\..\..\..\src\xercesc\dom\DOMLSParserFilter.hpp # End Source File # Begin Source File +SOURCE=..\..\..\..\..\src\xercesc\dom\DOMLSResourceResolver.hpp +# End Source File +# Begin Source File + SOURCE=..\..\..\..\..\src\xercesc\dom\DOMLSSerializer.hpp # End Source File # Begin Source File diff --git a/Projects/Win32/VC7.1/xerces-all/XercesLib/XercesLib.vcproj b/Projects/Win32/VC7.1/xerces-all/XercesLib/XercesLib.vcproj index fc5aa5cd3..e0ddd8781 100644 --- a/Projects/Win32/VC7.1/xerces-all/XercesLib/XercesLib.vcproj +++ b/Projects/Win32/VC7.1/xerces-all/XercesLib/XercesLib.vcproj @@ -2352,9 +2352,6 @@ copy $(InputDir)\$(InputName).msvc.hpp $(InputPath) <File RelativePath="..\..\..\..\..\src\xercesc\dom\DOMEntityReference.hpp"> </File> - <File - RelativePath="..\..\..\..\..\src\xercesc\dom\DOMEntityResolver.hpp"> - </File> <File RelativePath="..\..\..\..\..\src\xercesc\dom\DOMError.hpp"> </File> @@ -2403,6 +2400,9 @@ copy $(InputDir)\$(InputName).msvc.hpp $(InputPath) <File RelativePath="..\..\..\..\..\src\xercesc\dom\DOMLSParserFilter.hpp"> </File> + <File + RelativePath="..\..\..\..\..\src\xercesc\dom\DOMLSResourceResolver.hpp"> + </File> <File RelativePath="..\..\..\..\..\src\xercesc\dom\DOMLSSerializer.hpp"> </File> diff --git a/Projects/Win32/VC8/xerces-all/XercesLib/XercesLib.vcproj b/Projects/Win32/VC8/xerces-all/XercesLib/XercesLib.vcproj index 32fd4c73a..bd238260f 100644 --- a/Projects/Win32/VC8/xerces-all/XercesLib/XercesLib.vcproj +++ b/Projects/Win32/VC8/xerces-all/XercesLib/XercesLib.vcproj @@ -3137,10 +3137,6 @@ RelativePath="..\..\..\..\..\src\xercesc\dom\DOMEntityReference.hpp" > </File> - <File - RelativePath="..\..\..\..\..\src\xercesc\dom\DOMEntityResolver.hpp" - > - </File> <File RelativePath="..\..\..\..\..\src\xercesc\dom\DOMError.hpp" > @@ -3205,6 +3201,10 @@ RelativePath="..\..\..\..\..\src\xercesc\dom\DOMLSParserFilter.hpp" > </File> + <File + RelativePath="..\..\..\..\..\src\xercesc\dom\DOMLSResourceResolver.hpp" + > + </File> <File RelativePath="..\..\..\..\..\src\xercesc\dom\DOMLSSerializer.hpp" > diff --git a/src/Makefile.am b/src/Makefile.am index ade98b4c5..e94063829 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -266,7 +266,6 @@ dom_headers = \ xercesc/dom/DOMElement.hpp \ xercesc/dom/DOMEntity.hpp \ xercesc/dom/DOMEntityReference.hpp \ - xercesc/dom/DOMEntityResolver.hpp \ xercesc/dom/DOMError.hpp \ xercesc/dom/DOMErrorHandler.hpp \ xercesc/dom/DOMException.hpp \ @@ -281,6 +280,7 @@ dom_headers = \ xercesc/dom/DOMLSOutput.hpp \ xercesc/dom/DOMLSParser.hpp \ xercesc/dom/DOMLSParserFilter.hpp \ + xercesc/dom/DOMLSResourceResolver.hpp \ xercesc/dom/DOMLSSerializer.hpp \ xercesc/dom/DOMLSSerializerFilter.hpp \ xercesc/dom/DOMNamedNodeMap.hpp \ diff --git a/src/Makefile.in b/src/Makefile.in index 7501cfdae..c88ce2778 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1120,7 +1120,6 @@ dom_headers = \ xercesc/dom/DOMElement.hpp \ xercesc/dom/DOMEntity.hpp \ xercesc/dom/DOMEntityReference.hpp \ - xercesc/dom/DOMEntityResolver.hpp \ xercesc/dom/DOMError.hpp \ xercesc/dom/DOMErrorHandler.hpp \ xercesc/dom/DOMException.hpp \ @@ -1135,6 +1134,7 @@ dom_headers = \ xercesc/dom/DOMLSOutput.hpp \ xercesc/dom/DOMLSParser.hpp \ xercesc/dom/DOMLSParserFilter.hpp \ + xercesc/dom/DOMLSResourceResolver.hpp \ xercesc/dom/DOMLSSerializer.hpp \ xercesc/dom/DOMLSSerializerFilter.hpp \ xercesc/dom/DOMNamedNodeMap.hpp \ diff --git a/src/xercesc/dom/DOM.hpp b/src/xercesc/dom/DOM.hpp index 0072ed84a..836aaaad1 100644 --- a/src/xercesc/dom/DOM.hpp +++ b/src/xercesc/dom/DOM.hpp @@ -57,7 +57,7 @@ // Introduced in DOM Level 3 #include <xercesc/dom/DOMLSParser.hpp> #include <xercesc/dom/DOMConfiguration.hpp> -#include <xercesc/dom/DOMEntityResolver.hpp> +#include <xercesc/dom/DOMLSResourceResolver.hpp> #include <xercesc/dom/DOMError.hpp> #include <xercesc/dom/DOMErrorHandler.hpp> #include <xercesc/dom/DOMImplementationLS.hpp> diff --git a/src/xercesc/dom/DOMLSInput.hpp b/src/xercesc/dom/DOMLSInput.hpp index 8ec25014f..ffe9bad3c 100644 --- a/src/xercesc/dom/DOMLSInput.hpp +++ b/src/xercesc/dom/DOMLSInput.hpp @@ -40,7 +40,7 @@ class BinInputStream; * * <p>There are two places that the application will deliver this input source * to the parser: as the argument to the parse method, or as the return value - * of the DOMEntityResolver.resolveEntity method.</p> + * of the DOMLSResourceResolver.resolveResource method.</p> * * <p>The DOMBuilder will use the DOMLSInput object to determine how to * read XML input. If there is a character stream available, the parser will @@ -53,7 +53,7 @@ class BinInputStream; * never modify it in any way (it may modify a copy if necessary).</p> * * @see DOMBuilder#parse - * @see DOMEntityResolver#resolveEntity + * @see DOMLSResourceResolver#resolveResource * @since DOM Level 3 */ class CDOM_EXPORT DOMLSInput diff --git a/src/xercesc/dom/DOMLSOutput.hpp b/src/xercesc/dom/DOMLSOutput.hpp index 2483dd426..7cade6bee 100644 --- a/src/xercesc/dom/DOMLSOutput.hpp +++ b/src/xercesc/dom/DOMLSOutput.hpp @@ -31,29 +31,11 @@ class BinInputStream; /** - * This interface represents a single input source for an XML entity. + * This interface represents an output destination for data. * - * <p>This interface allows an application to encapsulate information about - * an input source in a single object, which may include a public identifier, - * a system identifier, a byte stream (possibly with a specified encoding), - * and/or a character stream.</p> + * Xerces currently doesn't use <code>DOMLSOutput</code> objects * - * <p>There are two places that the application will deliver this input source - * to the parser: as the argument to the parse method, or as the return value - * of the DOMEntityResolver.resolveEntity method.</p> - * - * <p>The DOMBuilder will use the DOMLSOutput object to determine how to - * read XML input. If there is a character stream available, the parser will - * read that stream directly; if not, the parser will use a byte stream, if - * available; if neither a character stream nor a byte stream is available, - * the parser will attempt to open a URI connection to the resource identified - * by the system identifier.</p> - * - * <p>A DOMLSOutput object belongs to the application: the parser shall - * never modify it in any way (it may modify a copy if necessary).</p> - * - * @see DOMBuilder#parse - * @see DOMEntityResolver#resolveEntity + * @see XMLFormatTarget * @since DOM Level 3 */ class CDOM_EXPORT DOMLSOutput @@ -112,19 +94,6 @@ public: */ virtual const XMLCh* getEncoding() const = 0; - - /** - * Get the public identifier for this input source. - * - * <p><b>"Experimental - subject to change"</b></p> - * - * @return The public identifier, or null if none was supplied. - * @see #setPublicId - * @since DOM Level 3 - */ - virtual const XMLCh* getPublicId() const = 0; - - /** * Get the system identifier for this input source. * @@ -138,20 +107,6 @@ public: */ virtual const XMLCh* getSystemId() const = 0; - - /** - * Get the base URI to be used for resolving relative URIs to absolute - * URIs. If the baseURI is itself a relative URI, the behavior is - * implementation dependent. - * - * <p><b>"Experimental - subject to change"</b></p> - * - * @return The base URI. - * @see #setBaseURI - * @since DOM Level 3 - */ - virtual const XMLCh* getBaseURI() const = 0; - // ----------------------------------------------------------------------- // Setter methods // ----------------------------------------------------------------------- @@ -171,21 +126,6 @@ public: */ virtual void setEncoding(const XMLCh* const encodingStr) = 0; - - /** - * Set the public identifier for this input source. - * - * <p>The public identifier is always optional: if the application writer - * includes one, it will be provided as part of the location information.</p> - * - * <p><b>"Experimental - subject to change"</b></p> - * - * @param publicId The public identifier as a string. - * @see #getPublicId - * @since DOM Level 3 - */ - virtual void setPublicId(const XMLCh* const publicId) = 0; - /** * Set the system identifier for this input source. * @@ -202,19 +142,6 @@ public: * @since DOM Level 3 */ virtual void setSystemId(const XMLCh* const systemId) = 0; - - /** - * Set the base URI to be used for resolving relative URIs to absolute - * URIs. If the baseURI is itself a relative URI, the behavior is - * implementation dependent. - * - * <p><b>"Experimental - subject to change"</b></p> - * - * @param baseURI The base URI. - * @see #getBaseURI - * @since DOM Level 3 - */ - virtual void setBaseURI(const XMLCh* const baseURI) = 0; //@} // ----------------------------------------------------------------------- @@ -237,32 +164,6 @@ public: */ virtual BinInputStream* makeStream() const = 0; - /** - * Indicates if the parser should issue fatal error if this input source - * is not found. If set to false, the parser issue warning message instead. - * - * <p><b>"Experimental - subject to change"</b></p> - * - * @param flag True if the parser should issue fatal error if this input source is not found. - * If set to false, the parser issue warning message instead. (Default: true) - * - * @see #getIssueFatalErrorIfNotFound - */ - virtual void setIssueFatalErrorIfNotFound(const bool flag) = 0; - - - /** - * Get the flag that indicates if the parser should issue fatal error if this input source - * is not found. - * - * <p><b>"Experimental - subject to change"</b></p> - * - * @return True if the parser should issue fatal error if this input source is not found. - * False if the parser issue warning message instead. - * @see #setIssueFatalErrorIfNotFound - */ - virtual bool getIssueFatalErrorIfNotFound() const = 0; - /** * Called to indicate that this DOMLSOutput is no longer in use * and that the implementation may relinquish any resources associated with it. diff --git a/src/xercesc/dom/DOMLSParser.hpp b/src/xercesc/dom/DOMLSParser.hpp index 308ed82d5..337ecd764 100644 --- a/src/xercesc/dom/DOMLSParser.hpp +++ b/src/xercesc/dom/DOMLSParser.hpp @@ -30,7 +30,6 @@ XERCES_CPP_NAMESPACE_BEGIN class DOMErrorHandler; -class DOMEntityResolver; class DOMLSInput; class DOMLSParserFilter; class DOMNode; diff --git a/src/xercesc/dom/DOMEntityResolver.hpp b/src/xercesc/dom/DOMLSResourceResolver.hpp similarity index 50% rename from src/xercesc/dom/DOMEntityResolver.hpp rename to src/xercesc/dom/DOMLSResourceResolver.hpp index 0e91ab460..177286b89 100644 --- a/src/xercesc/dom/DOMEntityResolver.hpp +++ b/src/xercesc/dom/DOMLSResourceResolver.hpp @@ -30,14 +30,14 @@ XERCES_CPP_NAMESPACE_BEGIN class DOMLSInput; /** - * DOMEntityResolver provides a way for applications to redirect references + * DOMLSResourceResolver provides a way for applications to redirect references * to external entities. * * <p>Applications needing to implement customized handling for external * entities must implement this interface and register their implementation - * by setting the entityResolver attribute of the DOMBuilder.</p> + * by setting the entityResolver attribute of the DOMLSParser.</p> * - * <p>The DOMBuilder will then allow the application to intercept any + * <p>The DOMLSParser will then allow the application to intercept any * external entities (including the external DTD subset and external parameter * entities) before including them.</p> * @@ -46,11 +46,11 @@ class DOMLSInput; * databases or other specialized input sources, or for applications that use * URNs.</p> * - * @see DOMBuilder#setEntityResolver + * @see DOMLSParser#getDomConfig * @see DOMLSInput#DOMLSInput * @since DOM Level 3 */ -class CDOM_EXPORT DOMEntityResolver +class CDOM_EXPORT DOMLSResourceResolver { protected: // ----------------------------------------------------------------------- @@ -58,7 +58,7 @@ protected: // ----------------------------------------------------------------------- /** @name Hidden constructors */ //@{ - DOMEntityResolver() {}; + DOMLSResourceResolver() {}; //@} private: @@ -67,8 +67,8 @@ private: // ----------------------------------------------------------------------- /** @name Unimplemented constructors and operators */ //@{ - DOMEntityResolver(const DOMEntityResolver &); - DOMEntityResolver & operator = (const DOMEntityResolver &); + DOMLSResourceResolver(const DOMLSResourceResolver &); + DOMLSResourceResolver & operator = (const DOMLSResourceResolver &); //@} public: @@ -81,52 +81,54 @@ public: * Destructor * */ - virtual ~DOMEntityResolver() {}; + virtual ~DOMLSResourceResolver() {}; //@} // ----------------------------------------------------------------------- - // Virtual DOMEntityResolver interface + // Virtual DOMLSResourceResolver interface // ----------------------------------------------------------------------- /** @name Functions introduced in DOM Level 3 */ //@{ /** - * Allow the application to resolve external entities. + * Allow the application to resolve external resources. * - * <p>The DOMLSParser will call this method before opening any external - * entity except the top-level document entity (including the - * external DTD subset, external entities referenced within the - * DTD, and external entities referenced within the document - * element): the application may request that the DOMBuilder resolve - * the entity itself, that it use an alternative URI, or that it - * use an entirely different input source.</p> + * The <code>DOMLSParser</code> will call this method before opening any external resource, + * including the external DTD subset, external entities referenced within the DTD, and + * external entities referenced within the document element (however, the top-level + * document entity is not passed to this method). The application may then request that + * the <code>DOMLSParser</code> resolve the external resource itself, that it use an + * alternative URI, or that it use an entirely different input source. * - * <p>Application writers can use this method to redirect external - * system identifiers to secure and/or local URIs, to look up - * public identifiers in a catalogue, or to read an entity from a - * database or other input source (including, for example, a dialog - * box).</p> + * Application writers can use this method to redirect external system identifiers to + * secure and/or local URI, to look up public identifiers in a catalogue, or to read + * an entity from a database or other input source (including, for example, a dialog box). * - * <p>If the system identifier is a URL, the DOMBuilder parser must - * resolve it fully before reporting it to the application.</p> + * The returned DOMLSInput is owned by the DOMLSParser which is + * responsible to clean up the memory. * - * <p> The returned DOMLSInput is owned by the DOMBuilder which is - * responsible to clean up the memory. - * - * @param publicId The public identifier of the external entity - * being referenced, or null if none was supplied. - * @param systemId The system identifier of the external entity - * being referenced. - * @param baseURI The absolute base URI of the resource being parsed, or - * <code>null</code> if there is no base URI. + * @param resourceType The type of the resource being resolved. For XML [XML 1.0] resources + * (i.e. entities), applications must use the value "http://www.w3.org/TR/REC-xml". + * For XML Schema [XML Schema Part 1], applications must use the value + * "http://www.w3.org/2001/XMLSchema". Other types of resources are outside + * the scope of this specification and therefore should recommend an absolute + * URI in order to use this method. + * @param namespaceUri The namespace of the resource being resolved, e.g. the target namespace + * of the XML Schema [XML Schema Part 1] when resolving XML Schema resources. + * @param publicId The public identifier of the external entity being referenced, or <code>null</code> + * if no public identifier was supplied or if the resource is not an entity. + * @param systemId The system identifier, a URI reference [IETF RFC 2396], of the external + * resource being referenced, or <code>null</code> if no system identifier was supplied. + * @param baseURI The absolute base URI of the resource being parsed, or <code>null</code> if + * there is no base URI. * @return A DOMLSInput object describing the new input source, * or <code>null</code> to request that the parser open a regular - * URI connection to the system identifier. - * The returned DOMLSInput is owned by the DOMBuilder which is + * URI connection to the resource. + * The returned DOMLSInput is owned by the DOMLSParser which is * responsible to clean up the memory. * @see DOMLSInput#DOMLSInput * @since DOM Level 3 */ - virtual DOMLSInput* resolveEntity + virtual DOMLSInput* resolveResource ( const XMLCh* const resourceType , const XMLCh* const namespaceUri diff --git a/src/xercesc/parsers/DOMLSParserImpl.cpp b/src/xercesc/parsers/DOMLSParserImpl.cpp index 3d7538f23..4536ed853 100644 --- a/src/xercesc/parsers/DOMLSParserImpl.cpp +++ b/src/xercesc/parsers/DOMLSParserImpl.cpp @@ -30,7 +30,7 @@ // --------------------------------------------------------------------------- #include <xercesc/parsers/DOMLSParserImpl.hpp> #include <xercesc/util/IOException.hpp> -#include <xercesc/dom/DOMEntityResolver.hpp> +#include <xercesc/dom/DOMLSResourceResolver.hpp> #include <xercesc/dom/DOMErrorHandler.hpp> #include <xercesc/dom/DOMLSParserFilter.hpp> #include <xercesc/dom/DOMNodeFilter.hpp> @@ -168,7 +168,7 @@ void DOMLSParserImpl::setParameter(const XMLCh* name, const void* value) { if (XMLString::compareIStringASCII(name, XMLUni::fgDOMResourceResolver) == 0) { - fEntityResolver = (DOMEntityResolver*)value; + fEntityResolver = (DOMLSResourceResolver*)value; if (fEntityResolver) { getScanner()->setEntityHandler(this); fXMLEntityResolver = 0; @@ -802,7 +802,7 @@ DOMLSParserImpl::resolveEntity(const XMLCh* const publicId, // if (fEntityResolver) { - DOMLSInput* is = fEntityResolver->resolveEntity(0, 0, publicId, systemId, baseURI); + DOMLSInput* is = fEntityResolver->resolveResource(0, 0, publicId, systemId, baseURI); if (is) return new (getMemoryManager()) Wrapper4DOMLSInput(is, true, getMemoryManager()); @@ -819,11 +819,11 @@ DOMLSParserImpl::resolveEntity( XMLResourceIdentifier* resourceIdentifier ) // return a null pointer to cause the default resolution. // if (fEntityResolver) { - DOMLSInput* is = fEntityResolver->resolveEntity(resourceIdentifier->getResourceIdentifierType()==XMLResourceIdentifier::ExternalEntity?XMLUni::fgDOMDTDType:XMLUni::fgDOMXMLSchemaType, - resourceIdentifier->getNameSpace(), - resourceIdentifier->getPublicId(), - resourceIdentifier->getSystemId(), - resourceIdentifier->getBaseURI()); + DOMLSInput* is = fEntityResolver->resolveResource(resourceIdentifier->getResourceIdentifierType()==XMLResourceIdentifier::ExternalEntity?XMLUni::fgDOMDTDType:XMLUni::fgDOMXMLSchemaType, + resourceIdentifier->getNameSpace(), + resourceIdentifier->getPublicId(), + resourceIdentifier->getSystemId(), + resourceIdentifier->getBaseURI()); if (is) return new (getMemoryManager()) Wrapper4DOMLSInput(is, true, getMemoryManager()); } diff --git a/src/xercesc/parsers/DOMLSParserImpl.hpp b/src/xercesc/parsers/DOMLSParserImpl.hpp index f075bb39b..fc66268e9 100644 --- a/src/xercesc/parsers/DOMLSParserImpl.hpp +++ b/src/xercesc/parsers/DOMLSParserImpl.hpp @@ -35,6 +35,7 @@ XERCES_CPP_NAMESPACE_BEGIN class XMLEntityResolver; class XMLResourceIdentifier; class DOMStringListImpl; +class DOMLSResourceResolver; /** * Introduced in DOM Level 3 @@ -519,7 +520,7 @@ public : * method or NULL otherwise to indicate no processing was done. * The returned InputSource is owned by the DOMLSParser which is * responsible to clean up the memory. - * @see DOMEntityResolver + * @see DOMLSResourceResolver * @see XMLEntityHandler */ virtual InputSource* resolveEntity @@ -645,7 +646,7 @@ private : //----------------------------------------------------------------------- bool fAutoValidation; bool fValidation; - DOMEntityResolver* fEntityResolver; + DOMLSResourceResolver* fEntityResolver; XMLEntityResolver* fXMLEntityResolver; DOMErrorHandler* fErrorHandler; DOMLSParserFilter* fFilter; diff --git a/src/xercesc/parsers/XercesDOMParser.hpp b/src/xercesc/parsers/XercesDOMParser.hpp index 8b9d8f9ac..f581297b4 100644 --- a/src/xercesc/parsers/XercesDOMParser.hpp +++ b/src/xercesc/parsers/XercesDOMParser.hpp @@ -489,7 +489,7 @@ public : * method or NULL otherwise to indicate no processing was done. * The returned InputSource is owned by the parser which is * responsible to clean up the memory. - * @see DOMEntityResolver + * @see DOMLSResourceResolver * @see XMLEntityHandler */ virtual InputSource* resolveEntity -- GitLab