diff --git a/src/xercesc/dom/deprecated/DOMParser.hpp b/src/xercesc/dom/deprecated/DOMParser.hpp index a12c5cfdbb26747cb670e8ed1e5a480e02325788..bd255409b4ca9097b5f5edc53a7956b1d34a9497 100644 --- a/src/xercesc/dom/deprecated/DOMParser.hpp +++ b/src/xercesc/dom/deprecated/DOMParser.hpp @@ -994,6 +994,8 @@ public : * or <code>null</code> if there is no base URI. * @return The value returned by the user installed resolveEntity * 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 EntityResolver * @see XMLEntityHandler */ diff --git a/src/xercesc/framework/XMLEntityHandler.hpp b/src/xercesc/framework/XMLEntityHandler.hpp index 291850fa468198ab955ec0fb2c8a90011bdced1c..7c6f9aeb400084f3ea377562f1ef03b7c05c06d2 100644 --- a/src/xercesc/framework/XMLEntityHandler.hpp +++ b/src/xercesc/framework/XMLEntityHandler.hpp @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.4 2002/06/06 20:41:51 tng + * Regression fix: should assign the returned InputSource from resolveEntity to srcToFill. + * * Revision 1.3 2002/05/31 15:14:07 tng * Fix doxygen documentation. * @@ -185,6 +188,8 @@ public: * or <code>null</code> if there is no base URI. * @return The value returned by the SAX resolveEntity 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. */ virtual InputSource* resolveEntity ( diff --git a/src/xercesc/internal/XMLScanner2.cpp b/src/xercesc/internal/XMLScanner2.cpp index 29553af6ea3ade53d462d8c8bab5cb31925b27b4..d41eb7596c8b6108f2b9f31b9d01d33b83b88ff9 100644 --- a/src/xercesc/internal/XMLScanner2.cpp +++ b/src/xercesc/internal/XMLScanner2.cpp @@ -223,7 +223,7 @@ XMLScanner::buildAttList(const RefVectorOf<KVStringPair>& providedAttrs XMLAttDef* attDefForWildCard = 0; XMLAttDef* attDef = 0; - + if (fGrammarType == Grammar::SchemaGrammarType) { //retrieve the att def @@ -1430,8 +1430,8 @@ void XMLScanner::resolveSchemaGrammar(const XMLCh* const loc, const XMLCh* const if (!fEntityHandler->expandSystemId(loc, expSysId)) expSysId.set(loc); - fEntityHandler->resolveEntity( XMLUni::fgZeroLenString - , expSysId.getRawBuffer()); + srcToFill = fEntityHandler->resolveEntity( XMLUni::fgZeroLenString + , expSysId.getRawBuffer()); } else {