xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbert...@apache.org
Subject svn commit: r690861 [3/6] - in /xalan/c/trunk: Projects/Win32/VC8/AllInOne/ Projects/Win32/VC9/AllInOne/ Tests/Conf/ samples/ExternalFunction/ src/xalanc/DOMSupport/ src/xalanc/Harness/ src/xalanc/ICUBridge/ src/xalanc/Include/ src/xalanc/NLS/en_US/ sr...
Date Mon, 01 Sep 2008 06:42:13 GMT
Modified: xalan/c/trunk/src/xalanc/XPath/XPathExecutionContextDefault.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XPath/XPathExecutionContextDefault.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XPath/XPathExecutionContextDefault.cpp (original)
+++ xalan/c/trunk/src/xalanc/XPath/XPathExecutionContextDefault.cpp Sun Aug 31 23:42:06 2008
@@ -104,12 +104,14 @@
     m_contextNodeListStack.push_back(theContextNodeList == 0 ? &s_dummyList : theContextNodeList);
 }
 
+
+
 XPathExecutionContextDefault*
 XPathExecutionContextDefault::create(
-                                     MemoryManagerType&      theManager,
-                                     XalanNode*             theCurrentNode,
-                                     const NodeRefListBase* theContextNodeList,
-                                     const PrefixResolver*  thePrefixResolver)
+            MemoryManager&          theManager,
+            XalanNode*             theCurrentNode,
+            const NodeRefListBase* theContextNodeList,
+            const PrefixResolver*  thePrefixResolver)
 {
     typedef XPathExecutionContextDefault ThisType;
 
@@ -127,6 +129,7 @@
 }
 
 
+
 XPathExecutionContextDefault::~XPathExecutionContextDefault()
 {
     reset();
@@ -135,6 +138,40 @@
 
 
 void
+XPathExecutionContextDefault::problem(
+			eSource		            source,
+			eClassification			classification,
+			const XalanDOMString&	msg,
+            const Locator*          locator,
+			const XalanNode*		sourceNode)
+{
+    m_xpathEnvSupport->problem(
+        source,
+        classification,
+        msg,
+        locator,
+        sourceNode);
+}
+
+
+
+void
+XPathExecutionContextDefault::problem(
+            eSource                 source,
+            eClassification         classification,
+			const XalanDOMString&	msg,
+			const XalanNode*		sourceNode)
+{
+    m_xpathEnvSupport->problem(
+        source,
+        classification,
+        msg,
+        sourceNode);
+}
+
+
+
+void
 XPathExecutionContextDefault::reset()
 {
     if (m_xpathEnvSupport != 0)
@@ -334,7 +371,13 @@
 {
     assert(m_xpathEnvSupport != 0);
 
-    return m_xpathEnvSupport->extFunction(*this, theNamespace, functionName, context, argVec, locator);
+    return m_xpathEnvSupport->extFunction(
+                *this,
+                theNamespace,
+                functionName,
+                context,
+                argVec,
+                locator);
 }
 
 
@@ -343,11 +386,16 @@
 XPathExecutionContextDefault::parseXML(
             MemoryManagerType&      theManager,
             const XalanDOMString&   urlString,
-            const XalanDOMString&   base) const
+            const XalanDOMString&   base,
+            ErrorHandler*           theErrorHandler) const
 {
     assert(m_xpathEnvSupport != 0);
 
-    return m_xpathEnvSupport->parseXML(theManager, urlString, base);
+    return m_xpathEnvSupport->parseXML(
+                theManager,
+                urlString,
+                base,
+                theErrorHandler);
 }
 
 
@@ -490,48 +538,23 @@
 {
     assert(m_xpathEnvSupport != 0);
 
-    XalanFileLoc     lineNumber = XalanLocator::getUnknownValue();
-    XalanFileLoc     columnNumber = XalanLocator::getUnknownValue();
-
-    MemoryManagerType& theManager =  const_cast<XPathExecutionContextDefault*>(this)->getMemoryManager();
+    m_xpathEnvSupport->problem(
+           XPathEnvSupport::eXPATH,
+           XPathEnvSupport::eError,
+           msg,
+           locator,
+           sourceNode);
+    
+    MemoryManager&  theManager =  getMemoryManager();
 
     XalanDOMString  uri(theManager);
 
-    if (locator != 0)
-    {
-        lineNumber = locator->getLineNumber();
-        columnNumber = locator->getColumnNumber();
-
-        const XalanDOMChar*     id =
-            locator->getPublicId();
-
-        if (id != 0)
-        {
-            uri = id;
-        }
-        else
-        {
-            id = locator->getSystemId();
-
-            if (id != 0)
-            {
-                uri = id;
-            }
-        }
-    }
+    uri = XalanLocator::getSystemId(locator, uri.c_str());
 
-    if (m_xpathEnvSupport->problem(
-            XPathEnvSupport::eXPATHProcessor, 
-            XPathEnvSupport::eError,
-            m_prefixResolver, 
-            sourceNode,
-            msg,
-            c_wstr(uri),
-            lineNumber,
-            columnNumber) == true)
-    {
-        throw XalanXPathException(msg, uri, lineNumber, columnNumber, theManager);
-    }
+    throw XalanXPathException(
+                msg,
+                theManager,
+                locator);
 }
 
 
@@ -544,48 +567,12 @@
 {
     assert(m_xpathEnvSupport != 0);
 
-    XalanFileLoc    lineNumber = XalanLocator::getUnknownValue();
-    XalanFileLoc    columnNumber = XalanLocator::getUnknownValue();
-
-    MemoryManagerType& theManager =  const_cast<XPathExecutionContextDefault*>(this)->getMemoryManager();
-
-    XalanDOMString  uri(theManager);
-
-    if (locator != 0)
-    {
-        lineNumber = locator->getLineNumber();
-        columnNumber = locator->getColumnNumber();
-
-        const XalanDOMChar*     id =
-            locator->getPublicId();
-
-        if (id != 0)
-        {
-            uri = id;
-        }
-        else
-        {
-            id = locator->getSystemId();
-
-            if (id != 0)
-            {
-                uri = id;
-            }
-        }
-    }
-
-    if (m_xpathEnvSupport->problem(
-            XPathEnvSupport::eXPATHProcessor, 
+    m_xpathEnvSupport->problem(
+            XPathEnvSupport::eXPATH,
             XPathEnvSupport::eWarning,
-            m_prefixResolver, 
-            sourceNode,
             msg,
-            c_wstr(uri),
-            lineNumber,
-            columnNumber) == true)
-    {
-        throw XalanXPathException(msg, uri, lineNumber, columnNumber, theManager);
-    }
+            locator,
+            sourceNode);
 }
 
 
@@ -598,48 +585,12 @@
 {
     assert(m_xpathEnvSupport != 0);
 
-    XalanFileLoc    lineNumber = XalanLocator::getUnknownValue();
-    XalanFileLoc    columnNumber = XalanLocator::getUnknownValue();
-
-   MemoryManagerType& theManager =  const_cast<XPathExecutionContextDefault*>(this)->getMemoryManager();
-
-    XalanDOMString  uri(theManager);
-
-    if (locator != 0)
-    {
-        lineNumber = locator->getLineNumber();
-        columnNumber = locator->getColumnNumber();
-
-        const XalanDOMChar*     id =
-            locator->getPublicId();
-
-        if (id != 0)
-        {
-            uri = id;
-        }
-        else
-        {
-            id = locator->getSystemId();
-
-            if (id != 0)
-            {
-                uri = id;
-            }
-        }
-    }
-
-    if (m_xpathEnvSupport->problem(
-            XPathEnvSupport::eXPATHProcessor, 
-            XPathEnvSupport::eMessage,
-            m_prefixResolver, 
-            sourceNode,
-            msg,
-            c_wstr(uri),
-            lineNumber,
-            columnNumber) == true)
-    {
-        throw XalanXPathException(msg, uri, lineNumber, columnNumber, theManager);
-    }
+    m_xpathEnvSupport->problem(
+        XPathEnvSupport::eXPATH,
+        XPathEnvSupport::eWarning,
+        msg,
+        locator,
+        sourceNode);
 }
 
 
@@ -735,7 +686,7 @@
     }
     else
     {
-        GetAndReleaseCachedString   theGuard(*this);
+        const GetCachedString   theGuard(*this);
 
         warn( 
             XalanMessageLoader::getMessage(

Modified: xalan/c/trunk/src/xalanc/XPath/XPathExecutionContextDefault.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XPath/XPathExecutionContextDefault.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XPath/XPathExecutionContextDefault.hpp (original)
+++ xalan/c/trunk/src/xalanc/XPath/XPathExecutionContextDefault.hpp Sun Aug 31 23:42:06 2008
@@ -238,7 +238,8 @@
 	parseXML(
             MemoryManagerType&      theManager,
 			const XalanDOMString&	urlString,
-			const XalanDOMString&	base) const;
+			const XalanDOMString&	base,
+            ErrorHandler*           theErrorHandler = 0) const;
 
 	virtual MutableNodeRefList*
 	borrowMutableNodeRefList();
@@ -301,8 +302,6 @@
 			const XalanDOMString&	theURI,
 			XalanDocument*			theDocument);
 
-	// These interfaces are inherited from ExecutionContext...
-
 	virtual void formatNumber(
 			double								number,
 			const XalanDOMString&				pattern,
@@ -319,7 +318,24 @@
 			const LocatorType*					locator = 0);
 
 
+	// These interfaces are inherited from ExecutionContext...
+
 	virtual void
+	problem(
+			eSource		            source,
+			eClassification			classification,
+			const XalanDOMString&	msg,
+            const Locator*          locator,
+			const XalanNode*		sourceNode);
+
+	virtual void
+	problem(
+            eSource                 source,
+            eClassification         classification,
+			const XalanDOMString&	msg,
+			const XalanNode*		sourceNode);
+
+    virtual void
 	error(
 			const XalanDOMString&	msg,
 			const XalanNode* 		sourceNode = 0,

Modified: xalan/c/trunk/src/xalanc/XPath/XPathFunctionTable.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XPath/XPathFunctionTable.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XPath/XPathFunctionTable.cpp (original)
+++ xalan/c/trunk/src/xalanc/XPath/XPathFunctionTable.cpp Sun Aug 31 23:42:06 2008
@@ -152,7 +152,10 @@
 	{
         XalanDOMString theResult(*m_memoryManager);
 
-		throw XPathExceptionFunctionNotSupported(theFunctionName, theResult);
+		throw XPathExceptionFunctionNotSupported(
+                theFunctionName,
+                theResult,
+                0);
 	}
 	else
 	{
@@ -187,17 +190,16 @@
 	}
 	else
 	{
-		const Function* const	theFunction = m_functionTable[theFunctionID];
+		Function* const	theFunction =
+            const_cast<Function*>(m_functionTable[theFunctionID]);
 
 		m_functionTable[theFunctionID] = 0;
 
-        if( theFunction!=0 )
-        {
-            const_cast<Function*>(theFunction)->~Function();
-
-             m_memoryManager->deallocate((void*)theFunction);
-        }
-		return true;
+        XalanDestroy(
+            *m_memoryManager,
+            theFunction);
+
+        return true;
 	}
 }
 
@@ -521,30 +523,23 @@
 
 
 XPathExceptionFunctionNotAvailable::XPathExceptionFunctionNotAvailable(
-            const XalanDOMString&    theFunctionNumber,
-            XalanDOMString&          theResult) :
-    XalanXPathException(
-        XalanMessageLoader::getMessage(
+			const XalanDOMString&	theFunctionNumber,
+            XalanDOMString&         theResult,
+            const Locator*          theLocator) :
+	XalanXPathException(
+		XalanMessageLoader::getMessage(
             theResult,
             XalanMessages::FunctionNumberIsNotAvailable_1Param,
             theFunctionNumber),
-        theResult.getMemoryManager())
+        theResult.getMemoryManager(),
+	    theLocator)
 {
 }
 
 
 
-XPathExceptionFunctionNotAvailable::XPathExceptionFunctionNotAvailable(
-			const XalanDOMString&	theFunctionNumber,
-			const LocatorType&	    theLocator,
-            XalanDOMString&         theResult) :
-	XalanXPathException(
-	    theLocator,
-		XalanMessageLoader::getMessage(
-            theResult,
-            XalanMessages::FunctionNumberIsNotAvailable_1Param,
-            theFunctionNumber),
-        theResult.getMemoryManager())
+XPathExceptionFunctionNotAvailable::XPathExceptionFunctionNotAvailable(const XPathExceptionFunctionNotAvailable& other) :
+    XalanXPathException(other)
 {
 }
 
@@ -559,13 +554,22 @@
 
 XPathExceptionFunctionNotSupported::XPathExceptionFunctionNotSupported(
             const XalanDOMChar*     theFunctionName,
-            XalanDOMString&         theResult) :
+            XalanDOMString&         theResult,
+            const Locator*          theLocator) :
     XalanXPathException(
         XalanMessageLoader::getMessage(
             theResult,
             XalanMessages::FunctionIsNotSupported_1Param,
             theFunctionName),
-        theResult.getMemoryManager())
+        theResult.getMemoryManager(),
+        theLocator)
+{
+}
+
+
+
+XPathExceptionFunctionNotSupported::XPathExceptionFunctionNotSupported(const XPathExceptionFunctionNotSupported& other) :
+    XalanXPathException(other)
 {
 }
 

Modified: xalan/c/trunk/src/xalanc/XPath/XPathFunctionTable.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XPath/XPathFunctionTable.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XPath/XPathFunctionTable.hpp (original)
+++ xalan/c/trunk/src/xalanc/XPath/XPathFunctionTable.hpp Sun Aug 31 23:42:06 2008
@@ -55,13 +55,12 @@
 
     typedef Function::LocatorType   LocatorType;
 
-    XPathExceptionFunctionNotAvailable(const XalanDOMString&    theFunctionNumber,
-                                        XalanDOMString&         theResult);
-
     XPathExceptionFunctionNotAvailable(
-        const XalanDOMString&   theFunctionNumber,
-        const LocatorType&      theLocator,
-        XalanDOMString&         theResult);
+            const XalanDOMString&   theFunctionName,
+            XalanDOMString&         theResult,
+            const Locator*          theLocator);
+
+    XPathExceptionFunctionNotAvailable(const XPathExceptionFunctionNotAvailable& other);
 
     ~XPathExceptionFunctionNotAvailable();
 };
@@ -76,8 +75,12 @@
 {
 public:
 
-    XPathExceptionFunctionNotSupported(const XalanDOMChar*  theFunctionName,
-                                        XalanDOMString&     theResult);
+    XPathExceptionFunctionNotSupported(
+            const XalanDOMChar*     theFunctionName,
+            XalanDOMString&         theResult,
+            const Locator*          theLocator);
+
+    XPathExceptionFunctionNotSupported(const XPathExceptionFunctionNotSupported& other);
 
     ~XPathExceptionFunctionNotSupported();
 };
@@ -124,8 +127,44 @@
     DestroyTable();
 
     /**
-     * Retrieve the function object for a specified function name.
+     * Retrieve the function object for a specified function name.  If
+     * the named Function is not found, an exception is thrown.
      * 
+     * @param theFunctionName The name of function
+     * @param theLocator The Locator instance to use when reporting an error.
+     * @return function named
+     */
+    const Function&
+    get(
+            const XalanDOMString&   theFunctionName,
+            const Locator*          theLocator) const
+    {
+        const int   theFunctionID =
+            getFunctionIndex(theFunctionName);
+
+        if (theFunctionID != InvalidFunctionNumberID)
+        {
+            return *m_functionTable[theFunctionID];
+        }
+        else
+        {
+            MemoryManager* const    theManager = m_memoryManager;
+
+            XalanDOMString   theResult(*theManager);
+
+            throw XPathExceptionFunctionNotAvailable(
+                    theFunctionName,
+                    theResult,
+                    theLocator);
+        }
+    }
+
+private:
+
+    /**
+     * Retrieve the function object for a specified function name.
+     *
+     * @deprecated This operator is deprecated.
      * @param theFunctionName name of function
      * @return function named
      */
@@ -141,14 +180,19 @@
         }
         else
         {
-            MemoryManagerType* theManager = const_cast<MemoryManagerType*>(m_memoryManager);
+            MemoryManager* const    theManager = m_memoryManager;
 
             XalanDOMString   theResult(*theManager);
 
-            throw XPathExceptionFunctionNotAvailable(theFunctionName, theResult);
+            throw XPathExceptionFunctionNotAvailable(
+                    theFunctionName,
+                    theResult,
+                    0);
         }
     }
 
+public:
+
     /**
      * Retrieve the function object for a specified function ID number.
      * 
@@ -458,7 +502,7 @@
             const XalanDOMChar*     theName,
             StringSizeType          theNameLength);
 
-    MemoryManagerType*          m_memoryManager;
+    MemoryManager*              m_memoryManager;
 
     const Function*             m_functionTable[TableSize];
 

Modified: xalan/c/trunk/src/xalanc/XPath/XPathParserException.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XPath/XPathParserException.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XPath/XPathParserException.cpp (original)
+++ xalan/c/trunk/src/xalanc/XPath/XPathParserException.cpp Sun Aug 31 23:42:06 2008
@@ -23,7 +23,45 @@
 XALAN_CPP_NAMESPACE_BEGIN
 
 
-const XalanDOMChar	XPathParserException::m_type[] = 
+
+XPathParserException::XPathParserException(
+			const XalanDOMString&	theMessage,
+            MemoryManager&          theManager,
+            const Locator*		    theLocator) :
+	XalanXPathException(
+        theMessage,
+        theManager,
+        theLocator)
+{
+}
+
+
+
+XPathParserException::XPathParserException(
+			const XalanDOMString&	theMessage,
+            MemoryManager&          theManager) :
+	XalanXPathException(
+        theMessage,
+        theManager)
+{
+}
+
+
+
+XPathParserException::XPathParserException(const XPathParserException&  other) :
+    XalanXPathException(other)
+{
+}
+
+
+
+XPathParserException::~XPathParserException()
+{
+}
+
+
+
+static const XalanDOMChar   s_type[] = 
 {	
 	XalanUnicode::charLetter_X,
 	XalanUnicode::charLetter_P,
@@ -50,49 +88,10 @@
 
 
 
-XPathParserException::XPathParserException(
-			const XalanDOMString&	message,
-			const XalanDOMString&	theURI,
-			XalanFileLoc			theLineNumber,
-			XalanFileLoc			theColumnNumber,
-            MemoryManagerType&      theManager) :
-	XalanXPathException(
-        message,
-        theURI,
-        theLineNumber,
-        theColumnNumber,
-        theManager)
-{
-}
-
-
-
-XPathParserException::XPathParserException(
-			const LocatorType&		theLocator,
-			const XalanDOMString&	theMessage,
-            MemoryManagerType&      theManager) :
-	XalanXPathException(
-        theLocator,
-        theMessage,
-        theManager)
-{
-}
-
-
-
-XPathParserException::XPathParserException(
-			const XalanDOMString&	message,
-            MemoryManagerType&      theManager) :
-	XalanXPathException(
-        message,
-        theManager)
-{
-}
-
-
-
-XPathParserException::~XPathParserException()
+const XalanDOMChar*
+XPathParserException::getType() const
 {
+    return s_type;
 }
 
 

Modified: xalan/c/trunk/src/xalanc/XPath/XPathParserException.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XPath/XPathParserException.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XPath/XPathParserException.hpp (original)
+++ xalan/c/trunk/src/xalanc/XPath/XPathParserException.hpp Sun Aug 31 23:42:06 2008
@@ -40,55 +40,38 @@
 {
 public:
 
-	/**
+    /**
 	 * Constructor
 	 * 
 	 * @param theMessage message to write when exception thrown
-	 * @param theURI the URI of the related document, if known
-	 * @param theLineNumber the line number of the related document, or -1 if not known
-	 * @param theColumnNumber the column number of the related document, or -1 if not known
-	 * @param theType type of exception, default is "XPathParserException"
+	 * @param theManager The MemoryManager instance to use.
+	 * @param theLocator The locator instance for error reporting, if any.
 	 */
 	XPathParserException(
 			const XalanDOMString&	theMessage,
-			const XalanDOMString&	theURI,
-			XalanFileLoc			theLineNumber,
-			XalanFileLoc			theColumnNumber,
-            MemoryManagerType&      theManager);
+            MemoryManager&          theManager,
+            const Locator*		    theLocator);
 
-	/**
-	 * Constructor
+    /**
+	 * Constructor. Use this constructor when the error message has
+     * already been formatted.
 	 * 
-	 * @param theLocator The locator instance for error reporting.
 	 * @param theMessage message to write when exception thrown
-	 * @param theType type of exception, default is "XPathParserException"
+	 * @param theManager The MemoryManager instance to use.
 	 */
 	XPathParserException(
-			const LocatorType&		theLocator,
 			const XalanDOMString&	theMessage,
-            MemoryManagerType&      theManager);
+            MemoryManager&          theManager);
 
-	/**
-	 * Constructor
-	 * 
-	 * @param theMessage message to write when exception thrown
-	 * @param theType type of exception, default is "XPathParserException"
-	 */
-	XPathParserException(
-			const XalanDOMString&	theMessage,
-            MemoryManagerType&      theManager);
+    XPathParserException(const XPathParserException&    other);
 
-	virtual
-		~XPathParserException();
+    virtual
+	~XPathParserException();
 	
 	virtual const XalanDOMChar*
-		getType() const
-	{
-		return m_type;
-	}
+    getType() const;
+
 private:
-	
-	static const XalanDOMChar	m_type[];
 };
 
 

Modified: xalan/c/trunk/src/xalanc/XPath/XPathProcessorImpl.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XPath/XPathProcessorImpl.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XPath/XPathProcessorImpl.cpp (original)
+++ xalan/c/trunk/src/xalanc/XPath/XPathProcessorImpl.cpp Sun Aug 31 23:42:06 2008
@@ -52,7 +52,7 @@
 
 
 
-XPathProcessorImpl::XPathProcessorImpl(MemoryManagerType&   theManager) :
+XPathProcessorImpl::XPathProcessorImpl(MemoryManager&   theManager) :
     m_token(theManager),
     m_tokenChar(0),
     m_xpath(0),
@@ -71,15 +71,14 @@
 
 
 XPathProcessorImpl*
-XPathProcessorImpl::create(MemoryManagerType& theManager)
+XPathProcessorImpl::create(MemoryManager&   theManager)
 {
     typedef XPathProcessorImpl ThisType;
-        
-    XalanMemMgrAutoPtr<ThisType, false> theGuard( theManager , (ThisType*)theManager.allocate(sizeof(ThisType)));
 
-    ThisType* theResult = theGuard.get();
+    XalanAllocationGuard    theGuard(theManager, theManager.allocate(sizeof(ThisType)));
 
-    new (theResult) ThisType(theManager);
+    ThisType* const     theResult =
+        new (theGuard.get()) ThisType(theManager);
 
     theGuard.release();
 
@@ -100,7 +99,7 @@
             XPathConstructionContext&   constructionContext,
             const XalanDOMString&       expression,
             const PrefixResolver&       resolver,
-            const LocatorType*          locator,
+            const Locator*              locator,
             bool                        allowVariableReferences,
             bool                        allowKeyFunction)
 {
@@ -154,7 +153,7 @@
             XPathConstructionContext&   constructionContext,
             const XalanDOMString&       expression,
             const PrefixResolver&       resolver,
-            const LocatorType*          locator,
+            const Locator*              locator,
             bool                        allowVariableReferences,
             bool                        allowKeyFunction)
 {
@@ -219,7 +218,7 @@
     t_size_type     startSubstring = XalanDOMString::npos;
     t_size_type     posOfNSSep = XalanDOMString::npos;
 
-    const XPathConstructionContext::GetAndReleaseCachedString   theGuard(*m_constructionContext);
+    const XPathConstructionContext::GetCachedString     theGuard(*m_constructionContext);
 
     XalanDOMString&     theToken = theGuard.get();
 
@@ -515,7 +514,7 @@
 {
     assert(m_prefixResolver != 0);
 
-    const XPathConstructionContext::GetAndReleaseCachedString   theGuard(*m_constructionContext);
+    const XPathConstructionContext::GetCachedString     theGuard(*m_constructionContext);
 
     XalanDOMString&     scratchString = theGuard.get();
 
@@ -842,33 +841,17 @@
         m_expression->dumpRemainingTokenQueue(thePrintWriter);
     }
 
-    if (m_locator != 0)
-    {
-        const XalanDOMChar* const   theSystemID =
-                    m_locator->getSystemId();
-
-        const GetCachedString   theGuard(*m_constructionContext);
-
-        XalanDOMString& theURI = theGuard.get();
-
-        if (theSystemID != 0)
-        {
-            theURI = theSystemID;
-        }
-
-        throw XPathParserException(
-                    emsg,
-                    theURI,
-                    m_locator->getLineNumber(),
-                    m_locator->getColumnNumber(),
-                    m_constructionContext->getMemoryManager());
-    }
-    else
-    {
-        throw XPathParserException(
-                    emsg, 
-                    m_constructionContext->getMemoryManager());
-    }
+    m_constructionContext->problem(
+        XPathConstructionContext::eXPath,
+        XPathConstructionContext::eError,
+        emsg,
+        m_locator,
+        0);
+
+    throw XPathParserException(
+                emsg, 
+                m_constructionContext->getMemoryManager(),
+                m_locator);
 }
 
 
@@ -2642,7 +2625,7 @@
     {
         const double    num = DoubleSupport::toDouble(m_token, m_constructionContext->getMemoryManager());
 
-        const XPathConstructionContext::GetAndReleaseCachedString   theGuard(*m_constructionContext);
+        const XPathConstructionContext::GetCachedString     theGuard(*m_constructionContext);
  
         XalanDOMString&     theStringValue = theGuard.get();
  

Modified: xalan/c/trunk/src/xalanc/XPath/XPathProcessorImpl.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XPath/XPathProcessorImpl.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XPath/XPathProcessorImpl.hpp (original)
+++ xalan/c/trunk/src/xalanc/XPath/XPathProcessorImpl.hpp Sun Aug 31 23:42:06 2008
@@ -90,7 +90,7 @@
             XPathConstructionContext&   constructionContext,
             const XalanDOMString&       expression,
             const PrefixResolver&       resolver,
-            const LocatorType*          locator = 0,
+            const Locator*              locator = 0,
             bool                        allowVariableReferences = true,
             bool                        allowKeyFunction = true);
 
@@ -100,7 +100,7 @@
             XPathConstructionContext&   constructionContext,
             const XalanDOMString&       expression,
             const PrefixResolver&       resolver,
-            const LocatorType*          locator = 0,
+            const Locator*              locator = 0,
             bool                        allowVariableReferences = true,
             bool                        allowKeyFunction = true);
 
@@ -762,7 +762,7 @@
 
     bool                            m_isMatchPattern;
 
-    const LocatorType*              m_locator;
+    const Locator*                  m_locator;
 
     BoolVectorType                  m_positionPredicateStack;
 

Modified: xalan/c/trunk/src/xalanc/XPath/XStringCached.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XPath/XStringCached.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XPath/XStringCached.cpp (original)
+++ xalan/c/trunk/src/xalanc/XPath/XStringCached.cpp Sun Aug 31 23:42:06 2008
@@ -29,8 +29,8 @@
 
 
 XStringCached::XStringCached(
-            GetAndReleaseCachedString&  val,
-            MemoryManager&              theManager) :
+            GetCachedString&    val,
+            MemoryManager&      theManager) :
     XStringBase(theManager),
     m_value(val)
 {

Modified: xalan/c/trunk/src/xalanc/XPath/XStringCached.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XPath/XStringCached.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XPath/XStringCached.hpp (original)
+++ xalan/c/trunk/src/xalanc/XPath/XStringCached.hpp Sun Aug 31 23:42:06 2008
@@ -44,16 +44,14 @@
 
 	typedef XStringBase		ParentType;
 
-	typedef XPathExecutionContext::GetAndReleaseCachedString	GetAndReleaseCachedString;
-
 	/**
 	 * Create a string XObject from a cached string.
 	 *
 	 * @param theValue	value used to create object 
 	 */
 	XStringCached(
-            GetAndReleaseCachedString&	val,
-            MemoryManager&              theManager);
+            GetCachedString&    val,
+            MemoryManager&      theManager);
 
 	XStringCached(
             const XStringCached&	source,
@@ -105,7 +103,7 @@
 
     XStringCached();
 
-	const GetAndReleaseCachedString		m_value;
+	const GetCachedString   m_value;
 };
 
 

Modified: xalan/c/trunk/src/xalanc/XPath/XStringCachedAllocator.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XPath/XStringCachedAllocator.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XPath/XStringCachedAllocator.cpp (original)
+++ xalan/c/trunk/src/xalanc/XPath/XStringCachedAllocator.cpp Sun Aug 31 23:42:06 2008
@@ -41,7 +41,7 @@
 
 
 XStringCachedAllocator::string_type*
-XStringCachedAllocator::createString(GetAndReleaseCachedString&		theValue) 
+XStringCachedAllocator::createString(GetCachedString&   theValue) 
 {
 	string_type* const	theBlock = m_allocator.allocateBlock();
 	assert(theBlock != 0);

Modified: xalan/c/trunk/src/xalanc/XPath/XStringCachedAllocator.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XPath/XStringCachedAllocator.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XPath/XStringCachedAllocator.hpp (original)
+++ xalan/c/trunk/src/xalanc/XPath/XStringCachedAllocator.hpp Sun Aug 31 23:42:06 2008
@@ -44,7 +44,7 @@
 
 	typedef XStringCached	string_type;
 
-	typedef string_type::GetAndReleaseCachedString	GetAndReleaseCachedString;
+	typedef string_type::GetCachedString    GetCachedString;
 
 	typedef ReusableArenaAllocator<string_type>		ArenaAllocatorType;
 	typedef ArenaAllocatorType::size_type			size_type;
@@ -68,7 +68,7 @@
 	 * @return a pointer to the new XStringCached instance.
 	 */
 	string_type*
-	createString(GetAndReleaseCachedString&		theValue);
+	createString(GetCachedString&   theValue);
 
 
 	/**

Modified: xalan/c/trunk/src/xalanc/XPath/XalanQName.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XPath/XalanQName.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XPath/XalanQName.cpp (original)
+++ xalan/c/trunk/src/xalanc/XPath/XalanQName.cpp Sun Aug 31 23:42:06 2008
@@ -389,104 +389,76 @@
 }
 
 
-const XalanDOMChar  XalanQName::InvalidQNameException::m_type[] = 
-{   
-    XalanUnicode::charLetter_I,
-    XalanUnicode::charLetter_n,
-    XalanUnicode::charLetter_v,
-    XalanUnicode::charLetter_a,
-    XalanUnicode::charLetter_l,
-    XalanUnicode::charLetter_i,
-    XalanUnicode::charLetter_d,
-    XalanUnicode::charLetter_Q,
-    XalanUnicode::charLetter_N,
-    XalanUnicode::charLetter_a,
-    XalanUnicode::charLetter_m,
-    XalanUnicode::charLetter_e,
-    XalanUnicode::charLetter_E,
-    XalanUnicode::charLetter_x,
-    XalanUnicode::charLetter_c,
-    XalanUnicode::charLetter_e,
-    XalanUnicode::charLetter_p,
-    XalanUnicode::charLetter_t,
-    XalanUnicode::charLetter_i,
-    XalanUnicode::charLetter_o,
-    XalanUnicode::charLetter_n,
-    0
-};
-
-
-
 XalanQName::InvalidQNameException::InvalidQNameException(
             const XalanDOMChar*         theQName,
             XalanDOMString::size_type   theQNameLength,
-            const XalanDOMString&       theURI,
-            int                         theLineNumber,
-            int                         theColumnNumber,
-            XalanDOMString&             theResult) :
-    XSLException(
+            XalanDOMString&             theResult,
+            const Locator*              theLocator) :
+    XalanXPathException(
         format(theQName, theQNameLength, theResult),
-        theURI,
-        theLineNumber,
-        theColumnNumber,
-        theResult.getMemoryManager())
+        theResult.getMemoryManager(),
+        theLocator)
 {
 }
 
 
 
 XalanQName::InvalidQNameException::InvalidQNameException(
-            const LocatorType&          theLocator,
-            const XalanDOMChar*         theQName,
-            XalanDOMString::size_type   theQNameLength,
-            XalanDOMString&             theResult) :
-    XSLException(
-        theLocator, 
-        format(theQName, theQNameLength, theResult),
-        theResult.getMemoryManager())
+            const XalanDOMString&   theMessage,
+            MemoryManager&          theManager,
+            const Locator*          theLocator) :
+    XalanXPathException(
+        theMessage,
+        theManager,
+        theLocator)
 {
 }
 
 
 
-XalanQName::InvalidQNameException::InvalidQNameException(
-            const XalanDOMChar*         theQName,
-            XalanDOMString::size_type   theQNameLength,
-            XalanDOMString&             theResult) :
-    XSLException(
-        format(theQName, theQNameLength, theResult),
-        theResult.getMemoryManager())
+XalanQName::InvalidQNameException::InvalidQNameException(const InvalidQNameException& other) :
+    XalanXPathException(other)
 {
 }
 
 
 
-XalanQName::InvalidQNameException::InvalidQNameException(
-            const XalanDOMString&   theMessage,
-            MemoryManager&          theManager) :
-    XSLException(
-        theMessage,
-        theManager)
+XalanQName::InvalidQNameException::~InvalidQNameException()
 {
 }
 
 
 
-XalanQName::InvalidQNameException::InvalidQNameException(
-            const Locator&          theLocator,
-            const XalanDOMString&   theMessage,
-            MemoryManager&          theManager) :
-    XSLException(
-        theLocator,
-        theMessage,
-        theManager)
+const XalanDOMChar*
+XalanQName::InvalidQNameException::getType() const
 {
-}
-
+    static const XalanDOMChar  s_type[] = 
+    {
+        XalanUnicode::charLetter_I,
+        XalanUnicode::charLetter_n,
+        XalanUnicode::charLetter_v,
+        XalanUnicode::charLetter_a,
+        XalanUnicode::charLetter_l,
+        XalanUnicode::charLetter_i,
+        XalanUnicode::charLetter_d,
+        XalanUnicode::charLetter_Q,
+        XalanUnicode::charLetter_N,
+        XalanUnicode::charLetter_a,
+        XalanUnicode::charLetter_m,
+        XalanUnicode::charLetter_e,
+        XalanUnicode::charLetter_E,
+        XalanUnicode::charLetter_x,
+        XalanUnicode::charLetter_c,
+        XalanUnicode::charLetter_e,
+        XalanUnicode::charLetter_p,
+        XalanUnicode::charLetter_t,
+        XalanUnicode::charLetter_i,
+        XalanUnicode::charLetter_o,
+        XalanUnicode::charLetter_n,
+        0
+    };
 
-
-XalanQName::InvalidQNameException::~InvalidQNameException()
-{
+    return s_type;
 }
 
 

Modified: xalan/c/trunk/src/xalanc/XPath/XalanQName.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XPath/XalanQName.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XPath/XalanQName.hpp (original)
+++ xalan/c/trunk/src/xalanc/XPath/XalanQName.hpp Sun Aug 31 23:42:06 2008
@@ -37,11 +37,11 @@
 
 #include <xalanc/PlatformSupport/DOMStringHelper.hpp>
 #include <xalanc/PlatformSupport/PrefixResolver.hpp>
-#include <xalanc/PlatformSupport/XSLException.hpp>
 
 
 
 #include <xalanc/XPath/NameSpace.hpp>
+#include <xalanc/XPath/XalanXPathException.hpp>
 
 
 
@@ -343,7 +343,7 @@
             const XalanDOMChar*         theQName,
             XalanDOMString::size_type   theLength = XalanDOMString::npos);
 
-    class InvalidQNameException : public XSLException
+    class InvalidQNameException : public XalanXPathException
     {
     public:
 
@@ -352,44 +352,13 @@
          * 
          * @param theQName The QName string that is not valid.
          * @param theQNameLength The length of the string.
-         * @param theURI the URI of the related document, if known
-         * @param theLineNumber the line number of the related document.
-         * @param theColumnNumber the column number of the related document.
          * @param theResult A temporary string for loading the error message.
          */
         InvalidQNameException(
                 const XalanDOMChar*         theQName,
                 XalanDOMString::size_type   theQNameLength,
-                const XalanDOMString&       theURI,
-                int                         theLineNumber,
-                int                         theColumnNumber,
-                XalanDOMString&             theResult);
-
-        /**
-         * Constructor
-         * 
-         * @param theLocator The locator instance for error reporting.
-         * @param theQName The QName string that is not valid.
-         * @param theQNameLength The length of the string.
-         * @param theResult A temporary string for loading the error message.
-         */
-        InvalidQNameException(
-                const LocatorType&          theLocator,
-                const XalanDOMChar*         theQName,
-                XalanDOMString::size_type   theQNameLength,
-                XalanDOMString&             theResult);
-
-        /**
-         * Constructor
-         * 
-         * @param theQName The QName string that is not valid.
-         * @param theQNameLength The length of the string.
-         * @param theResult A temporary string for loading the error message.
-         */
-        InvalidQNameException(
-                const XalanDOMChar*         theQName,
-                XalanDOMString::size_type   theQNameLength,
-                XalanDOMString&             theResult);
+                XalanDOMString&             theResult,
+                const Locator*              theLocator);
 
         /**
          * Constructor
@@ -399,33 +368,19 @@
          */
         InvalidQNameException(
                 const XalanDOMString&   theMessage,
-                MemoryManager&          theManager);
+                MemoryManager&          theManager,
+                const Locator*          theLocator);
 
-        /**
-         * Constructor
-         * 
-         * @param theLocator The Locator to use when constructing the exception.
-         * @param theMessage The message for the exception
-         * @param theManager The MemoryManager instance to use when constructing the exception
-         */
-        InvalidQNameException(
-                const Locator&          theLocator,
-                const XalanDOMString&   theMessage,
-                MemoryManager&          theManager);
+        InvalidQNameException(const InvalidQNameException&  other);
 
         virtual
         ~InvalidQNameException();
 
         virtual const XalanDOMChar*
-        getType() const
-        {
-            return m_type;
-        }
+        getType() const;
 
     private:
 
-        static const XalanDOMChar   m_type[];
-
         static const XalanDOMString&
         format(
                 const XalanDOMChar*         theQName,

Modified: xalan/c/trunk/src/xalanc/XPath/XalanQNameByValue.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XPath/XalanQNameByValue.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XPath/XalanQNameByValue.cpp (original)
+++ xalan/c/trunk/src/xalanc/XPath/XalanQNameByValue.cpp Sun Aug 31 23:42:06 2008
@@ -89,14 +89,13 @@
 {
     typedef XalanQNameByValue ThisType;
 
-    XalanMemMgrAutoPtr<ThisType, false> theGuard( theManager , (ThisType*)theManager.allocate(sizeof(ThisType)));
+    XalanAllocationGuard    theGuard(theManager, theManager.allocate(sizeof(ThisType)));
 
-    ThisType* theResult = theGuard.get();
-
-    new (theResult) ThisType(
-                        theNamespace,
-                        theLocalPart,
-                        theManager);
+    ThisType* const     theResult = 
+        new (theGuard.get()) ThisType(
+                                theNamespace,
+                                theLocalPart,
+                                theManager);
 
 
     theGuard.release();
@@ -150,31 +149,9 @@
 
 XalanQNameByValue::XalanQNameByValue(
             const XalanDOMString&   qname,
-            const XalanElement*     namespaceContext,
-            const XPathEnvSupport&  envSupport,
-            const DOMSupport&       domSupport,
-            MemoryManager&          theManager,
-            const Locator*          locator) :
-    XalanQName(),
-    m_namespace(theManager),
-    m_localpart(theManager)
-{
-    ElementPrefixResolverProxy  theProxy( namespaceContext, envSupport, domSupport, theManager);
-
-    resolvePrefix(
-        c_wstr(qname),
-        length(qname),
-        &theProxy,
-        locator);
-}
-
-
-
-XalanQNameByValue::XalanQNameByValue(
-            const XalanDOMString&   qname,
             MemoryManager&          theManager,
             const PrefixResolver*   theResolver,
-            const LocatorType*      locator) :
+            const Locator*          locator) :
     XalanQName(),
     m_namespace(theManager),
     m_localpart(theManager)
@@ -292,19 +269,10 @@
         theCode,
         theParameter);
 
-    if (theLocator == 0)
-    {
-        throw XalanQName::InvalidQNameException(
-                theMessage,
-                theMemoryManager);
-    }
-    else
-    {
-        throw XalanQName::InvalidQNameException(
-                *theLocator,
-                theMessage,
-                theMemoryManager);
-    }
+    throw XalanQName::InvalidQNameException(
+            theMessage,
+            theMemoryManager,
+            theLocator);
 }
 
 
@@ -318,21 +286,11 @@
 {
     XalanDOMString  theBuffer(theMemoryManager);
 
-    if (theLocator == 0)
-    {
-        throw XalanQName::InvalidQNameException(
-                theQName,
-                theLength,
-                theBuffer);
-    }
-    else
-    {
-        throw XalanQName::InvalidQNameException(
-                *theLocator,
-                theQName,
-                theLength,
-                theBuffer);
-    }
+    throw XalanQName::InvalidQNameException(
+            theQName,
+            theLength,
+            theBuffer,
+            theLocator);
 }
 
 
@@ -342,7 +300,7 @@
             const XalanDOMChar*         qname,
             XalanDOMString::size_type   len,
             const NamespacesStackType&  namespaces,
-            const LocatorType*          locator,
+            const Locator*              locator,
             bool                        fUseDefault)
 {
     const XalanDOMString::size_type     indexOfNSSep = indexOf(qname, XalanUnicode::charColon);

Modified: xalan/c/trunk/src/xalanc/XPath/XalanQNameByValue.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XPath/XalanQNameByValue.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XPath/XalanQNameByValue.hpp (original)
+++ xalan/c/trunk/src/xalanc/XPath/XalanQNameByValue.hpp Sun Aug 31 23:42:06 2008
@@ -39,6 +39,7 @@
 
 
 class DOMSupport;
+class ProblemListenerBase;
 
 
 
@@ -52,9 +53,9 @@
      * Construct an empty XalanQNameByValue.
      */
     explicit
-    XalanQNameByValue(MemoryManagerType& theManager);
+    XalanQNameByValue(MemoryManager&    theManager);
 
-    MemoryManagerType&
+    MemoryManager&
     getMemoryManager()
     {
         return m_namespace.getMemoryManager();
@@ -65,8 +66,9 @@
      *
      * @param theSource The source of the copy.
      */
-    XalanQNameByValue(const XalanQNameByValue&  theSource,
-                    MemoryManagerType& theManager);
+    XalanQNameByValue(
+            const XalanQNameByValue&    theSource,
+            MemoryManager&              theManager);
 
     /**
      * Construct an instance from another XalanQName.
@@ -74,8 +76,9 @@
      * @param theSource The source of the copy.
      */
     explicit
-    XalanQNameByValue(const XalanQName& theSource,
-                    MemoryManagerType& theManager);
+    XalanQNameByValue(
+        const XalanQName&   theSource,
+        MemoryManager&      theManager);
 
     /**
      * Construct a XalanQNameByValue, with the supplied namespace and local part.
@@ -86,13 +89,13 @@
     XalanQNameByValue(
             const XalanDOMString&   theNamespace,
             const XalanDOMString&   theLocalPart,
-            MemoryManagerType&      theManager);
+            MemoryManager&          theManager);
 
     static XalanQNameByValue*
     create(
             const XalanDOMString&   theNamespace,
             const XalanDOMString&   theLocalPart,
-            MemoryManagerType&      theManager);
+            MemoryManager&          theManager);
 
     /**
      * Construct a XalanQNameByValue from a string, resolving the prefix using the given
@@ -106,8 +109,8 @@
     XalanQNameByValue(
             const XalanDOMString&       qname,
             const NamespacesStackType&  namespaces,
-            MemoryManagerType&          theManager,
-            const LocatorType*          locator = 0,
+            MemoryManager&              theManager,
+            const Locator*              locator = 0,
             bool                        fUseDefault = false);
 
     /**
@@ -122,30 +125,12 @@
     XalanQNameByValue(
             const XalanDOMChar*         qname,
             const NamespacesStackType&  namespaces,
-            MemoryManagerType&          theManager,
-            const LocatorType*          locator = 0,
+            MemoryManager&              theManager,
+            const Locator*              locator = 0,
             bool                        fUseDefault = false);
 
     /**
      * Construct a XalanQNameByValue from a string, resolving the prefix using the given
-     * namespace context. The default namespace is not resolved.
-     *
-     * @param qname            QName string
-     * @param namespaceContext context object for namespace resolution
-     * @param envSupport       XPathEnvSupport class instance
-     * @param domSupport       DOMSupport class instance
-     * @param locator          The Locator instance for error reporting, if any
-     */
-    XalanQNameByValue(
-            const XalanDOMString&   qname,
-            const XalanElement*     namespaceContext,
-            const XPathEnvSupport&  envSupport,
-            const DOMSupport&       domSupport,
-            MemoryManagerType&      theManager,
-            const LocatorType*      locator = 0);
-
-    /**
-     * Construct a XalanQNameByValue from a string, resolving the prefix using the given
      * prefix resolver. The default namespace is not resolved.
      *
      * @param qname       QName string
@@ -154,9 +139,9 @@
      */
     XalanQNameByValue(
             const XalanDOMString&   qname,
-            MemoryManagerType&      theManager,
+            MemoryManager&          theManager,
             const PrefixResolver*   theResolver = 0,
-            const LocatorType*      locator = 0);
+            const Locator*          locator = 0);
 
     virtual
     ~XalanQNameByValue();

Modified: xalan/c/trunk/src/xalanc/XPath/XalanQNameByValueAllocator.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XPath/XalanQNameByValueAllocator.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XPath/XalanQNameByValueAllocator.cpp (original)
+++ xalan/c/trunk/src/xalanc/XPath/XalanQNameByValueAllocator.cpp Sun Aug 31 23:42:06 2008
@@ -25,7 +25,9 @@
 
 
 
-XalanQNameByValueAllocator::XalanQNameByValueAllocator(MemoryManagerType&      theManager, size_type	theBlockCount) :
+XalanQNameByValueAllocator::XalanQNameByValueAllocator(
+            MemoryManager&  theManager,
+            size_type       theBlockCount) :
 	m_allocator(theManager, theBlockCount)
 {
 }
@@ -76,7 +78,7 @@
 XalanQNameByValueAllocator::create(
 			const XalanDOMString&		qname,
 			const NamespacesStackType&	namespaces,
-			const LocatorType*			locator,
+			const Locator*			    locator,
 			bool						fUseDefault)
 {
 	data_type* const	theBlock = m_allocator.allocateBlock();
@@ -96,7 +98,7 @@
 XalanQNameByValueAllocator::create(
 			const XalanDOMChar*			qname,
 			const NamespacesStackType&	namespaces,
-			const LocatorType*			locator,
+			const Locator*			    locator,
 			bool						fUseDefault)
 {
 	data_type* const	theBlock = m_allocator.allocateBlock();
@@ -115,29 +117,8 @@
 XalanQNameByValueAllocator::data_type*
 XalanQNameByValueAllocator::create(
 			const XalanDOMString&	qname,
-			const XalanElement*		namespaceContext,
-			const XPathEnvSupport&	envSupport,
-			const DOMSupport& 		domSupport,
-			const LocatorType*		locator)
-{
-	data_type* const	theBlock = m_allocator.allocateBlock();
-	assert(theBlock != 0);
-
-	data_type* const	theResult =
-		new(theBlock) data_type(qname, namespaceContext, envSupport, domSupport, m_allocator.getMemoryManager(),locator);
-
-	m_allocator.commitAllocation(theBlock);
-
-	return theResult;
-}
-
-
-
-XalanQNameByValueAllocator::data_type*
-XalanQNameByValueAllocator::create(
-			const XalanDOMString&	qname,
 			const PrefixResolver*	theResolver,
-			const LocatorType*		locator)
+			const Locator*		    locator)
 {
 	data_type* const	theBlock = m_allocator.allocateBlock();
 	assert(theBlock != 0);

Modified: xalan/c/trunk/src/xalanc/XPath/XalanQNameByValueAllocator.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XPath/XalanQNameByValueAllocator.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XPath/XalanQNameByValueAllocator.hpp (original)
+++ xalan/c/trunk/src/xalanc/XPath/XalanQNameByValueAllocator.hpp Sun Aug 31 23:42:06 2008
@@ -125,25 +125,6 @@
 	/**
 	 * Create an instance.
 	 *
-	 * @param qname            QName string
-	 * @param namespaceContext context object for namespace resolution
-	 * @param envSupport       XPathEnvSupport class instance
-	 * @param domSupport       DOMSupport class instance
-	 * @param locator          The Locator instance for error reporting, if any
-	 *
-	 * @return A pointer to the new instance.
-	 */
-	data_type*
-	create(
-			const XalanDOMString&	qname,
-			const XalanElement*		namespaceContext,
-			const XPathEnvSupport&	envSupport,
-			const DOMSupport& 		domSupport,
-			const LocatorType*		locator = 0);
-
-	/**
-	 * Create an instance.
-	 *
 	 * @param qname       QName string
 	 * @param theResolver prefix resolver to use
 	 * @param locator     The Locator instance for error reporting, if any

Modified: xalan/c/trunk/src/xalanc/XPath/XalanXPathException.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XPath/XalanXPathException.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XPath/XalanXPathException.cpp (original)
+++ xalan/c/trunk/src/xalanc/XPath/XalanXPathException.cpp Sun Aug 31 23:42:06 2008
@@ -24,94 +24,73 @@
 
 
 
-
-const XalanDOMString	XalanXPathException::s_emptyString(XalanMemMgrs::getDummyMemMgr());
-
-const XalanDOMChar	XalanXPathException::s_type[] = 
-{
-	XalanUnicode::charLetter_X,
-	XalanUnicode::charLetter_a,
-	XalanUnicode::charLetter_l,
-	XalanUnicode::charLetter_a,
-	XalanUnicode::charLetter_n,
-	XalanUnicode::charLetter_X,
-	XalanUnicode::charLetter_P,
-	XalanUnicode::charLetter_a,
-	XalanUnicode::charLetter_t,
-	XalanUnicode::charLetter_h,
-	XalanUnicode::charLetter_E,
-	XalanUnicode::charLetter_x,
-	XalanUnicode::charLetter_c,
-	XalanUnicode::charLetter_e,
-	XalanUnicode::charLetter_p,
-	XalanUnicode::charLetter_t,
-	XalanUnicode::charLetter_i,
-	XalanUnicode::charLetter_o,
-	XalanUnicode::charLetter_n,
-	0
-};
-
-
-
 XalanXPathException::XalanXPathException(
-			const XalanDOMString&	message,
-			const XalanDOMString&	theURI,
-			XalanFileLoc			theLineNumber,
-			XalanFileLoc			theColumnNumber,
-            MemoryManagerType&      theManager) :
+			const XalanDOMString&	theMessage,
+            MemoryManager&          theManager,
+            const Locator*          theLocator) :
 	XSLException(
-        message,
-        theURI,
-        theLineNumber,
-        theColumnNumber,
-        theManager)
+        theMessage,
+        theManager,
+        theLocator)
 {
 }
 
 
 
 XalanXPathException::XalanXPathException(
-			const XalanDOMString&	message,
-            MemoryManagerType&      theManager) :
+			const XalanDOMString&	theMessage,
+            MemoryManager&          theManager) :
 	XSLException(
-        message,
+        theMessage,
         theManager)
 {
 }
 
 
-
-XalanXPathException::XalanXPathException(
-			const LocatorType&		theLocator,
-			const XalanDOMString&	theMessage,
-            MemoryManagerType&      theManager) :
-	XSLException(
-        theLocator,
-        theMessage,
-        theManager)
+    
+XalanXPathException::XalanXPathException(const XalanXPathException& other) :
+    XSLException(other)
 {
 }
 
 
 
-XalanXPathException::XalanXPathException(MemoryManagerType& theManager) :
-	XSLException(
-        s_emptyString,
-        theManager)
+XalanXPathException::~XalanXPathException()
 {
 }
 
 
-    
-XalanXPathException::XalanXPathException(const XalanXPathException& other) :
-    XSLException(other)
+
+static const XalanDOMChar   s_type[] = 
 {
-}
+	XalanUnicode::charLetter_X,
+	XalanUnicode::charLetter_a,
+	XalanUnicode::charLetter_l,
+	XalanUnicode::charLetter_a,
+	XalanUnicode::charLetter_n,
+	XalanUnicode::charLetter_X,
+	XalanUnicode::charLetter_P,
+	XalanUnicode::charLetter_a,
+	XalanUnicode::charLetter_t,
+	XalanUnicode::charLetter_h,
+	XalanUnicode::charLetter_E,
+	XalanUnicode::charLetter_x,
+	XalanUnicode::charLetter_c,
+	XalanUnicode::charLetter_e,
+	XalanUnicode::charLetter_p,
+	XalanUnicode::charLetter_t,
+	XalanUnicode::charLetter_i,
+	XalanUnicode::charLetter_o,
+	XalanUnicode::charLetter_n,
+	0
+};
 
 
 
-XalanXPathException::~XalanXPathException()
+const XalanDOMChar*
+XalanXPathException::getType() const
 {
+    return s_type;
 }
 
 

Modified: xalan/c/trunk/src/xalanc/XPath/XalanXPathException.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XPath/XalanXPathException.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XPath/XalanXPathException.hpp (original)
+++ xalan/c/trunk/src/xalanc/XPath/XalanXPathException.hpp Sun Aug 31 23:42:06 2008
@@ -50,42 +50,24 @@
 	/**
 	 * Construct an XPath exeption object.
 	 * 
-	 * @param message message explaining the problem. 
-	 * @param theURI the URI of the related document, if known
-	 * @param theLineNumber the line number of the related document.
-	 * @param theColumnNumber the column number of the related document.
-	 * @param styleNode the node in the stylesheet where the problem occurred
-	 * @param theType type of exception, default is "XalanXPathException"
+	 * @param theMessage The message explaining the problem.
+	 * @param theManager The MemoryManager instance to use.
 	 */
 	XalanXPathException(
-			const XalanDOMString&	message,
-			const XalanDOMString&	theURI,
-			XalanFileLoc			theLineNumber,
-			XalanFileLoc			theColumnNumber,
-            MemoryManager&          theManager);
-
-	/**
-	 * Constructor
-	 * 
-	 * @param theLocator The locator instance for error reporting.
-	 * @param theMessage message to write when exception thrown
-	 * @param styleNode the node in the stylesheet where the problem occurred
-	 * @param theType type of exception, default is "XalanXPathException"
-	 */
-	XalanXPathException(
-			const LocatorType&		theLocator,
-			const XalanDOMString&	theMessage,
+            const XalanDOMString&	theMessage,
             MemoryManager&          theManager);
 
 	/**
 	 * Construct an XPath exeption object.
 	 * 
-	 * @param message message explaining the problem. 
-	 * @param theType type of exception, default is "XalanXPathException"
+	 * @param theMessage The message explaining the problem.
+	 * @param theManager The MemoryManager instance to use.
+	 * @param theLocator The locator instance for error reporting, if any.
 	 */
 	XalanXPathException(
-            const XalanDOMString&	message,
-            MemoryManager&          theManager);
+            const XalanDOMString&	theMessage,
+            MemoryManager&          theManager,
+            const Locator*		    theLocator);
 
     XalanXPathException(const XalanXPathException&  other);
 
@@ -93,12 +75,9 @@
 	~XalanXPathException();
 
 	virtual const XalanDOMChar*
-	getType() const
-	{
-		return s_type;
-	}
+	getType() const;
 
-protected:
+private:
 
 	/**
 	 * Construct an XPath exeption object.
@@ -108,12 +87,6 @@
 	XalanXPathException(MemoryManager&  theManager);
 
 private:
-
-	const XalanNode*	m_styleNode;
-
-	static const XalanDOMString		s_emptyString;
-
-    static const XalanDOMChar	    s_type[];
 };
 
 

Modified: xalan/c/trunk/src/xalanc/XSLT/AVT.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/AVT.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/AVT.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/AVT.cpp Sun Aug 31 23:42:06 2008
@@ -201,12 +201,14 @@
                                                 GetCachedString     theGuard(constructionContext);
 
                                                 // What's another brace doing here?
-                                                constructionContext.error(
+                                                constructionContext.problem(
+                                                    StylesheetConstructionContext::eXSLTProcessor,
+                                                    StylesheetConstructionContext::eError,
                                                     XalanMessageLoader::getMessage(
                                                         theGuard.get(),
                                                         XalanMessages::LeftBraceCannotAppearWithinExpression),
-                                                    0,
-                                                    locator);
+                                                    locator,
+                                                    0);
                                                 break;
                                             }
 
@@ -259,12 +261,14 @@
                         {
                             GetCachedString     theGuard(constructionContext);
 
-                            constructionContext.error(
+                            constructionContext.problem(
+                                StylesheetConstructionContext::eXSLTProcessor,
+                                StylesheetConstructionContext::eError,
                                 XalanMessageLoader::getMessage(
                                     theGuard.get(),
                                     XalanMessages::UnmatchedWasFound),
-                                0,
-                                locator);
+                                locator,
+                                0);
 
                         }
                         break;
@@ -352,12 +356,14 @@
     {
         GetCachedString     theGuard(constructionContext);
 
-        constructionContext.error(
+        constructionContext.problem(
+            StylesheetConstructionContext::eXSLTProcessor,
+            StylesheetConstructionContext::eError,
             XalanMessageLoader::getMessage(
                 theGuard.get(),
                 XalanMessages::AttributeValueTemplateHasMissing),
-            0,
-            locator);
+            locator,
+            0);
     }
     else
     {

Modified: xalan/c/trunk/src/xalanc/XSLT/ElemAttribute.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/ElemAttribute.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/ElemAttribute.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/ElemAttribute.cpp Sun Aug 31 23:42:06 2008
@@ -44,6 +44,10 @@
 
 
 
+typedef StylesheetExecutionContext::GetCachedString     GetCachedString;
+
+
+
 ElemAttribute::ElemAttribute(
             StylesheetConstructionContext&  constructionContext,
             Stylesheet&                     stylesheetTree,
@@ -146,7 +150,7 @@
     else
     {
         // save original attribute name
-        StylesheetExecutionContext::GetAndReleaseCachedString   origAttrNameGuard(executionContext);
+        const GetCachedString   origAttrNameGuard(executionContext);
 
         XalanDOMString&     origAttrName = origAttrNameGuard.get();
 
@@ -156,7 +160,7 @@
 
         XalanDOMString::size_type           indexOfNSSep = 0;
 
-        StylesheetExecutionContext::GetAndReleaseCachedString   attrNameSpaceGuard(executionContext);
+        const GetCachedString   attrNameSpaceGuard(executionContext);
 
         XalanDOMString&     attrNameSpace = attrNameSpaceGuard.get();
 
@@ -215,7 +219,7 @@
                 }
                 else
                 {
-                    StylesheetExecutionContext::GetAndReleaseCachedString   newPrefixGuard(executionContext);
+                    const GetCachedString   newPrefixGuard(executionContext);
 
                     XalanDOMString&     newPrefix = newPrefixGuard.get();
 
@@ -271,7 +275,7 @@
                     }
 
                     // OK, now we have to generate a namespace declaration...
-                    StylesheetExecutionContext::GetAndReleaseCachedString   nsDeclGuard(executionContext);
+                    const GetCachedString   nsDeclGuard(executionContext);
 
                     XalanDOMString&     nsDecl = nsDeclGuard.get();
 
@@ -305,7 +309,7 @@
 
                 if(indexOfNSSep < origAttrNameLength)
                 {
-                    StylesheetExecutionContext::GetAndReleaseCachedString   nsprefixGuard(executionContext);
+                    const GetCachedString   nsprefixGuard(executionContext);
 
                     XalanDOMString&     nsprefix = nsprefixGuard.get();
 
@@ -356,7 +360,7 @@
                         if (prefix == 0)
                         {
                             // We need to generate a namespace declaration...
-                            StylesheetExecutionContext::GetAndReleaseCachedString   nsDeclGuard(executionContext);
+                            const GetCachedString   nsDeclGuard(executionContext);
 
                             XalanDOMString&     nsDecl = nsDeclGuard.get();
 
@@ -433,7 +437,7 @@
 
     ElemTemplateElement::execute(executionContext);
 
-    StylesheetExecutionContext::GetAndReleaseCachedString   attrNameGuard(executionContext);
+    const GetCachedString   attrNameGuard(executionContext);
 
     XalanDOMString&     attrName = attrNameGuard.get();
 
@@ -449,7 +453,7 @@
     else
     {
         // save original attribute name
-        StylesheetExecutionContext::GetAndReleaseCachedString   origAttrNameGuard(executionContext);
+        const GetCachedString   origAttrNameGuard(executionContext);
 
         XalanDOMString&     origAttrName = origAttrNameGuard.get();
 
@@ -459,7 +463,7 @@
 
         XalanDOMString::size_type           indexOfNSSep = 0;
 
-        StylesheetExecutionContext::GetAndReleaseCachedString   attrNameSpaceGuard(executionContext);
+        const GetCachedString   attrNameSpaceGuard(executionContext);
 
         XalanDOMString&     attrNameSpace = attrNameSpaceGuard.get();
 
@@ -518,7 +522,7 @@
                 }
                 else
                 {
-                    StylesheetExecutionContext::GetAndReleaseCachedString   newPrefixGuard(executionContext);
+                    const GetCachedString   newPrefixGuard(executionContext);
 
                     XalanDOMString&     newPrefix = newPrefixGuard.get();
 
@@ -574,7 +578,7 @@
                     }
 
                     // OK, now we have to generate a namespace declaration...
-                    StylesheetExecutionContext::GetAndReleaseCachedString   nsDeclGuard(executionContext);
+                    const GetCachedString   nsDeclGuard(executionContext);
 
                     XalanDOMString&     nsDecl = nsDeclGuard.get();
 
@@ -608,7 +612,7 @@
 
                 if(indexOfNSSep < origAttrNameLength)
                 {
-                    StylesheetExecutionContext::GetAndReleaseCachedString   nsprefixGuard(executionContext);
+                    const GetCachedString   nsprefixGuard(executionContext);
 
                     XalanDOMString&     nsprefix = nsprefixGuard.get();
 
@@ -661,7 +665,7 @@
                         if (prefix == 0)
                         {
                             // We need to generate a namespace declaration...
-                            StylesheetExecutionContext::GetAndReleaseCachedString   nsDeclGuard(executionContext);
+                            const GetCachedString   nsDeclGuard(executionContext);
 
                             XalanDOMString&     nsDecl = nsDeclGuard.get();
 

Modified: xalan/c/trunk/src/xalanc/XSLT/ElemElement.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/ElemElement.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/ElemElement.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/ElemElement.cpp Sun Aug 31 23:42:06 2008
@@ -128,6 +128,8 @@
 
 
 
+typedef const StylesheetExecutionContext::GetCachedString   GetCachedString;
+
 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
 const ElemTemplateElement*
 ElemElement::startElement(StylesheetExecutionContext&       executionContext) const
@@ -149,7 +151,7 @@
     }
     else
     {
-        StylesheetExecutionContext::GetAndReleaseCachedString   elemNameSpaceGuard(executionContext);
+        const GetCachedString   elemNameSpaceGuard(executionContext);
 
         XalanDOMString&     elemNameSpace = elemNameSpaceGuard.get();
 
@@ -166,7 +168,7 @@
 
         const bool  havePrefix = indexOfNSSep == len ? false : true;
 
-        StylesheetExecutionContext::GetAndReleaseCachedString   prefixGuard(executionContext);
+        const GetCachedString   prefixGuard(executionContext);
 
         XalanDOMString&     prefix = prefixGuard.get();
 
@@ -325,7 +327,7 @@
 void
 ElemElement::execute(StylesheetExecutionContext&        executionContext) const
 {
-    StylesheetExecutionContext::GetAndReleaseCachedString   elemNameGuard(executionContext);
+    const GetCachedString   elemNameGuard(executionContext);
 
     XalanDOMString&     elemName = elemNameGuard.get();
 
@@ -346,7 +348,7 @@
     }
     else
     {
-        StylesheetExecutionContext::GetAndReleaseCachedString   elemNameSpaceGuard(executionContext);
+        const GetCachedString   elemNameSpaceGuard(executionContext);
 
         XalanDOMString&     elemNameSpace = elemNameSpaceGuard.get();
 
@@ -365,7 +367,7 @@
 
         const bool  havePrefix = indexOfNSSep == len ? false : true;
 
-        StylesheetExecutionContext::GetAndReleaseCachedString   prefixGuard(executionContext);
+        const GetCachedString   prefixGuard(executionContext);
 
         XalanDOMString&     prefix = prefixGuard.get();
 

Modified: xalan/c/trunk/src/xalanc/XSLT/ElemExtensionCall.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/ElemExtensionCall.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/ElemExtensionCall.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/ElemExtensionCall.cpp Sun Aug 31 23:42:06 2008
@@ -63,7 +63,7 @@
 
 ElemExtensionCall*
 ElemExtensionCall::create(
-            MemoryManagerType&              theManager,
+            MemoryManager&                  theManager,
             StylesheetConstructionContext&  constructionContext,
             Stylesheet&                     stylesheetTree,
             const XalanDOMChar*             name,
@@ -74,19 +74,18 @@
 {
     typedef ElemExtensionCall ThisType;
 
-    XalanMemMgrAutoPtr<ThisType, false> theGuard( theManager , (ThisType*)theManager.allocate(sizeof(ThisType)));
+    XalanAllocationGuard    theGuard(theManager, theManager.allocate(sizeof(ThisType)));
 
-    ThisType* theResult = theGuard.get();
+    ThisType* const     theResult =
+        new (theGuard.get()) ThisType(constructionContext,
+                                stylesheetTree,
+                                name,
+                                atts,
+                                lineNumber,
+                                columnNumber,
+                                ns);
 
-    new (theResult) ThisType(constructionContext,
-                            stylesheetTree,
-                            name,
-                            atts,
-                            lineNumber,
-                            columnNumber,
-                            ns);
-
-   theGuard.release();
+    theGuard.release();
 
     return theResult;
 }

Modified: xalan/c/trunk/src/xalanc/XSLT/ElemForEach.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/ElemForEach.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/ElemForEach.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/ElemForEach.cpp Sun Aug 31 23:42:06 2008
@@ -364,11 +364,11 @@
     keys.reserve(m_sortElemsCount);
 
     // Get some temporary strings to use for evaluting the AVTs...
-    StylesheetExecutionContext::GetAndReleaseCachedString   theTemp1(executionContext);
+    const StylesheetExecutionContext::GetCachedString   theTemp1(executionContext);
 
     XalanDOMString&     langString = theTemp1.get();
 
-    StylesheetExecutionContext::GetAndReleaseCachedString   theTemp2(executionContext);
+    const StylesheetExecutionContext::GetCachedString   theTemp2(executionContext);
 
     XalanDOMString&     scratchString = theTemp2.get();
 
@@ -558,11 +558,11 @@
         keys.reserve(m_sortElemsCount);
 
         // Get some temporary strings to use for evaluting the AVTs...
-        StylesheetExecutionContext::GetAndReleaseCachedString   theTemp1(executionContext);
+        StylesheetExecutionContext::GetCachedString     theTemp1(executionContext);
 
         XalanDOMString&     langString = theTemp1.get();
 
-        StylesheetExecutionContext::GetAndReleaseCachedString   theTemp2(executionContext);
+        const StylesheetExecutionContext::GetCachedString   theTemp2(executionContext);
 
         XalanDOMString&     scratchString = theTemp2.get();
 

Modified: xalan/c/trunk/src/xalanc/XSLT/ElemLiteralResult.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/ElemLiteralResult.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/ElemLiteralResult.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/ElemLiteralResult.cpp Sun Aug 31 23:42:06 2008
@@ -105,7 +105,7 @@
     m_avts = constructionContext.allocateAVTPointerVector(nAttrs);
     assert(m_avts != 0);
 
-    const StylesheetConstructionContext::GetAndReleaseCachedString  theGuard(constructionContext);
+    const StylesheetConstructionContext::GetCachedString    theGuard(constructionContext);
 
     XalanDOMString&     theBuffer = theGuard.get();
 
@@ -377,7 +377,7 @@
 {
     if (m_avtsCount > 0)
     {
-        StylesheetExecutionContext::GetAndReleaseCachedString   theGuard(executionContext);
+        const StylesheetExecutionContext::GetCachedString   theGuard(executionContext);
 
         XalanDOMString&     theStringedValue = theGuard.get();
 
@@ -439,7 +439,7 @@
 
     if(m_avtsCount > 0)
     {
-        StylesheetExecutionContext::GetAndReleaseCachedString   theGuard(executionContext);
+        const StylesheetExecutionContext::GetCachedString   theGuard(executionContext);
 
         XalanDOMString&     theStringedValue = theGuard.get();
 
@@ -487,7 +487,7 @@
         }
         else
         {
-            const StylesheetConstructionContext::GetAndReleaseCachedString  theGuard(constructionContext);
+            const StylesheetConstructionContext::GetCachedString    theGuard(constructionContext);
 
             XalanDOMString&     thePrefix = theGuard.get();
 

Modified: xalan/c/trunk/src/xalanc/XSLT/ElemMessage.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/ElemMessage.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/ElemMessage.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/ElemMessage.cpp Sun Aug 31 23:42:06 2008
@@ -127,25 +127,19 @@
 
     XalanDOMString& theResult = executionContext.getAndPopCachedString();
 
-    const LocatorType* const    theLocator = getLocator();
+    const Locator* const    theLocator = getLocator();
 
-    executionContext.message(
+    executionContext.problem(
+            StylesheetExecutionContext::eXSLTProcessor,
+            StylesheetExecutionContext::eMessage,
             theResult,
-            executionContext.getCurrentNode(),
-            theLocator);
+            theLocator,
+            executionContext.getCurrentNode());
 
     if (m_terminate == true)
     {
-        if (theLocator != 0)
-        {
-            throw ElemMessageTerminateException(executionContext.getMemoryManager(), *theLocator, theResult);
-        }
-        else
-        {
-            throw ElemMessageTerminateException(executionContext.getMemoryManager(), theResult);
-        }
+        throw ElemMessageTerminateException(executionContext.getMemoryManager(), theResult, theLocator);
     }
-
 }
 #endif
 
@@ -157,7 +151,7 @@
 {
     ElemTemplateElement::execute(executionContext);
 
-    StylesheetExecutionContext::GetAndReleaseCachedString   theResult(executionContext);
+    const StylesheetExecutionContext::GetCachedString   theResult(executionContext);
 
     const XalanDOMString&   theString =
         childrenToString(
@@ -228,22 +222,13 @@
 
 
 ElemMessage::ElemMessageTerminateException::ElemMessageTerminateException(
-                                    MemoryManagerType&          theManager,
-                                    const XalanDOMString&       theMessage) :
-    XSLTProcessorException(theManager, theMessage)
-{
-}
-
-
-
-ElemMessage::ElemMessageTerminateException::ElemMessageTerminateException(
-            MemoryManagerType&      theManager,
-            const LocatorType&      theLocator,
-            const XalanDOMString&   theMessage) :
+            MemoryManager&          theManager,
+            const XalanDOMString&   theMessage,
+            const Locator*          theLocator) :
     XSLTProcessorException(
             theManager,
-            theLocator,
-            theMessage)
+            theMessage,
+            theLocator)
 {
 }
 

Modified: xalan/c/trunk/src/xalanc/XSLT/ElemMessage.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/ElemMessage.hpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/ElemMessage.hpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/ElemMessage.hpp Sun Aug 31 23:42:06 2008
@@ -79,35 +79,25 @@
 		/**
 		 * Construct an ElemMessageTerminateException object
 		 * 
-		 * @param theMessage message to print when exception thrown
-		 */
-		ElemMessageTerminateException(
-                    MemoryManagerType&          theManager,
-                    const XalanDOMString&		theMessage);
-		
-		/**
-		 * Construct an ElemMessageTerminateException object
-		 * 
 		 * @param theLocator The Locator to use for line number information, etc.
 		 * @param theMessage message to print when exception thrown
 		 */
 		ElemMessageTerminateException(
-                MemoryManagerType&      theManager,
-				const LocatorType&		theLocator,
-				const XalanDOMString&	theMessage);
+                MemoryManager&          theManager,
+				const XalanDOMString&	theMessage,
+				const Locator*		    theLocator);
 
 		virtual
 		~ElemMessageTerminateException();
 
-		
 		virtual const XalanDOMChar*
-			getType() const
+	    getType() const
 		{
 			return m_type;
 		}
-		
+
 	private:
-		
+
 		static const XalanDOMChar	m_type[];
 	};
 

Modified: xalan/c/trunk/src/xalanc/XSLT/ElemNumber.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/ElemNumber.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/ElemNumber.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/ElemNumber.cpp Sun Aug 31 23:42:06 2008
@@ -221,17 +221,17 @@
 
 
 
+typedef XPathExecutionContext::GetCachedString  GetCachedString;
+
 #if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
 const ElemTemplateElement*
 ElemNumber::startElement(StylesheetExecutionContext&        executionContext) const
 {
     ElemTemplateElement::startElement(executionContext);
 
-    typedef XPathExecutionContext::GetAndReleaseCachedString    GetAndReleaseCachedString;
-
-    GetAndReleaseCachedString   theGuard(executionContext);
+    const GetCachedString   theGuard(executionContext);
 
-    XalanDOMString&             countString = theGuard.get();
+    XalanDOMString&         countString = theGuard.get();
 
     getCountString(executionContext, countString);
 
@@ -252,11 +252,9 @@
 {
     ElemTemplateElement::execute(executionContext);
 
-    typedef XPathExecutionContext::GetAndReleaseCachedString    GetAndReleaseCachedString;
-
-    GetAndReleaseCachedString   theGuard(executionContext);
+    const GetCachedString   theGuard(executionContext);
 
-    XalanDOMString&             countString = theGuard.get();
+    XalanDOMString&         countString = theGuard.get();
 
     getCountString(executionContext, countString);
 
@@ -405,11 +403,11 @@
             {
                 // OK, this is ugly.  We have to get a unique prefix and
                 // construct a match pattern with that prefix...
-                StylesheetExecutionContext::GetAndReleaseCachedString   thePrefix(executionContext);
+                const GetCachedString   thePrefix(executionContext);
 
                 executionContext.getUniqueNamespaceValue(thePrefix.get());
 
-                StylesheetExecutionContext::GetAndReleaseCachedString   theMatchPatternString(executionContext);
+                const GetCachedString   theMatchPatternString(executionContext);
 
                 assign(theMatchPatternString.get(), thePrefix.get());
                 append(theMatchPatternString.get(), XalanDOMChar(XalanUnicode::charColon));
@@ -444,7 +442,7 @@
 
             const ElementPrefixResolverProxy    theProxy(theAttribute->getOwnerElement(), executionContext.getMemoryManager());
 
-            StylesheetExecutionContext::GetAndReleaseCachedString   theMatchPatternString(executionContext);
+            const GetCachedString   theMatchPatternString(executionContext);
 
             assign(theMatchPatternString.get(), s_atString);
             append(theMatchPatternString.get(), theNodeName);
@@ -473,7 +471,7 @@
 
     case XalanNode::PROCESSING_INSTRUCTION_NODE:
         {
-            StylesheetExecutionContext::GetAndReleaseCachedString   theMatchPatternString(executionContext);
+            const GetCachedString   theMatchPatternString(executionContext);
 
             theMatchPatternString.get() = s_piString;
             append(theMatchPatternString.get(), contextNode->getNodeName());
@@ -836,11 +834,11 @@
 
     XalanMemMgrAutoPtr<XalanNumberFormat, true>     formatter(executionContext.createXalanNumberFormat());
 
-    typedef XPathExecutionContext::GetAndReleaseCachedString    GetAndReleaseCachedString;
+    typedef XPathExecutionContext::GetCachedString  GetCachedString;
 
-    GetAndReleaseCachedString   theGuard1(executionContext);
+    const GetCachedString   theGuard1(executionContext);
 
-    XalanDOMString&             digitGroupSepValue = theGuard1.get();
+    XalanDOMString&         digitGroupSepValue = theGuard1.get();
 
     if (0 != m_groupingSeparator_avt)
     {
@@ -854,9 +852,9 @@
             XalanMessages::GroupingSeparatorValueMustBeOneCharacterLength);
     }
 
-    GetAndReleaseCachedString   theGuard2(executionContext);
+    GetCachedString     theGuard2(executionContext);
 
-    XalanDOMString&             nDigitsPerGroupValue = theGuard2.get();
+    XalanDOMString&     nDigitsPerGroupValue = theGuard2.get();
 
     if (0 != m_groupingSize_avt)
     {
@@ -902,11 +900,9 @@
     StringVectorType    tokenVector(executionContext. getMemoryManager()) ;
 
     {
-        typedef XPathExecutionContext::GetAndReleaseCachedString    GetAndReleaseCachedString;
+        const GetCachedString   theGuard1(executionContext);
 
-        GetAndReleaseCachedString   theGuard1(executionContext);
-
-        XalanDOMString&             formatValue = theGuard1.get();
+        XalanDOMString&         formatValue = theGuard1.get();
 
         if (m_format_avt != 0)
         {
@@ -976,11 +972,9 @@
         theResult += *leaderStrIt;
     }
 
-    typedef XPathExecutionContext::GetAndReleaseCachedString    GetAndReleaseCachedString;
-
-    GetAndReleaseCachedString   theGuard2(executionContext);
+    const GetCachedString   theGuard2(executionContext);
 
-    XalanDOMString&             theIntermediateResult = theGuard2.get();
+    XalanDOMString&         theIntermediateResult = theGuard2.get();
 
     for( NodeRefListBase::size_type i = 0; i < theListLength; i++)
     {
@@ -1380,7 +1374,7 @@
         // Handle the special case of Greek letters for now
         case elalphaNumberType:
             {
-                StylesheetExecutionContext::GetAndReleaseCachedString   theGuard(executionContext);
+                const GetCachedString   theGuard(executionContext);
 
                 XalanDOMString&     letterVal = theGuard.get();
 
@@ -1417,7 +1411,7 @@
                 {
                     const XalanDOMString::size_type nPadding = numberWidth - lengthNumString;
 
-                    StylesheetExecutionContext::GetAndReleaseCachedString   theGuard(executionContext);
+                    const GetCachedString   theGuard(executionContext);
 
                     XalanDOMString&     padString = theGuard.get();
 

Modified: xalan/c/trunk/src/xalanc/XSLT/ElemPI.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/ElemPI.cpp?rev=690861&r1=690860&r2=690861&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/ElemPI.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/ElemPI.cpp Sun Aug 31 23:42:06 2008
@@ -203,7 +203,7 @@
 {
     ElemTemplateElement::execute(executionContext);
     
-    StylesheetExecutionContext::GetAndReleaseCachedString   theGuard(executionContext);
+    const StylesheetExecutionContext::GetCachedString   theGuard(executionContext);
 
     XalanDOMString&     piName = theGuard.get();
 



---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org


Mime
View raw message