You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2008/08/16 03:13:41 UTC

svn commit: r686432 [4/4] - in /xalan/c/trunk: Projects/Win32/VC6/AllInOne/ Projects/Win32/VC7.1/AllInOne/ Projects/Win32/VC7/AllInOne/ Projects/Win32/VC8/AllInOne/ Projects/Win32/VC9/AllInOne/ samples/ExternalFunction/ samples/SimpleXPathAPI/ samples/...

Modified: xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.cpp?rev=686432&r1=686431&r2=686432&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.cpp Fri Aug 15 18:13:38 2008
@@ -1804,7 +1804,11 @@
 
     if(generateCDATASection() == true)
     {
-        DOMServices::getNodeData(node, *getFormatterListenerImpl(), &FormatterListener::cdata);
+        DOMServices::getNodeData(
+            node,
+            *m_executionContext,
+            *getFormatterListenerImpl(),
+            &FormatterListener::cdata);
 
         if(getTraceListeners() > 0)
         {
@@ -1813,7 +1817,11 @@
     }
     else
     {
-        DOMServices::getNodeData(node, *getFormatterListenerImpl(), &FormatterListener::characters);
+        DOMServices::getNodeData(
+            node,
+            *m_executionContext,
+            *getFormatterListenerImpl(),
+            &FormatterListener::characters);
 
         if(getTraceListeners() > 0)
         {
@@ -1835,7 +1843,10 @@
 
     if(generateCDATASection() == true)
     {
-        xobject->str(*getFormatterListenerImpl(), &FormatterListener::cdata);
+        xobject->str(
+            *m_executionContext,
+            *getFormatterListenerImpl(),
+            &FormatterListener::cdata);
 
         if(getTraceListeners() > 0)
         {
@@ -1844,7 +1855,10 @@
     }
     else
     {
-        xobject->str(*getFormatterListenerImpl(), &FormatterListener::characters);
+        xobject->str(
+            *m_executionContext,
+            *getFormatterListenerImpl(),
+            &FormatterListener::characters);
 
         if(getTraceListeners() > 0)
         {
@@ -1881,7 +1895,11 @@
 {
     doFlushPending();
 
-    DOMServices::getNodeData(node, *getFormatterListenerImpl(), &FormatterListener::charactersRaw);
+    DOMServices::getNodeData(
+        node,
+        *m_executionContext,
+        *getFormatterListenerImpl(),
+        &FormatterListener::charactersRaw);
 
     if(getTraceListeners() > 0)
     {
@@ -1896,7 +1914,10 @@
 {
     doFlushPending();
 
-    xobject->str(*getFormatterListenerImpl(), &FormatterListener::charactersRaw);
+    xobject->str(
+        *m_executionContext,
+        *getFormatterListenerImpl(),
+        &FormatterListener::charactersRaw);
 
     if(getTraceListeners() > 0)
     {
@@ -2439,7 +2460,7 @@
     case XObject::eTypeNumber:
     case XObject::eTypeString:
         {
-            const XalanDOMString&   s = value.str();
+            const XalanDOMString&   s = value.str(*m_executionContext);
 
             characters(toCharArray(s), 0, length(s));
         }
@@ -3242,7 +3263,7 @@
 {
     XalanDOMString  theBuffer(getMemoryManager());
     
-    DOMServices::getNodeData(theNode, theBuffer);
+    DOMServices::getNodeData(theNode, *m_executionContext, theBuffer);
 
     fireCharacterGenerateEvent(theBuffer, isCDATA);
 }
@@ -3254,7 +3275,9 @@
             const XObjectPtr&   theXObject,
             bool                isCDATA)
 {
-    fireCharacterGenerateEvent(theXObject->str(), isCDATA);
+    fireCharacterGenerateEvent(
+        theXObject->str(*m_executionContext),
+        isCDATA);
 }
 
 

Modified: xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.hpp?rev=686432&r1=686431&r2=686432&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.hpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.hpp Fri Aug 15 18:13:38 2008
@@ -772,7 +772,10 @@
             bool                outputTextNodesOnly,
             const LocatorType*  locator)
     {
-        outputResultTreeFragment(theTree.rtree(), outputTextNodesOnly, locator);
+        outputResultTreeFragment(
+            theTree.rtree(),
+            outputTextNodesOnly,
+            locator);
     }
 
     /**

Modified: xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTMath.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTMath.cpp?rev=686432&r1=686431&r2=686432&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTMath.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTMath.cpp Fri Aug 15 18:13:38 2008
@@ -65,7 +65,7 @@
         XalanNode*          theCurrentNode = theNodeSet.item(0);
         assert(theCurrentNode != 0);
 
-        DOMServices::getNodeData(*theCurrentNode, theStringValue);
+        DOMServices::getNodeData(*theCurrentNode, executionContext, theStringValue);
 
         double  theNumericValue = DOMStringToDouble(theStringValue, executionContext.getMemoryManager());
 
@@ -80,7 +80,7 @@
 
                 theStringValue.clear();
 
-                DOMServices::getNodeData(*theCurrentNode, theStringValue);
+                DOMServices::getNodeData(*theCurrentNode, executionContext, theStringValue);
 
                 const double    theCurrent = DOMStringToDouble(theStringValue, executionContext.getMemoryManager());
 
@@ -139,7 +139,10 @@
 
     assert(args[0].null() == false);
 
-    return findNodes(executionContext, args[0]->nodeset(), DoubleSupport::greaterThan);
+    return findNodes(
+                executionContext,
+                args[0]->nodeset(),
+                DoubleSupport::greaterThan);
 }
 
 
@@ -183,7 +186,10 @@
 
     assert(args[0].null() == false);
 
-    return findNodes(executionContext, args[0]->nodeset(), DoubleSupport::lessThan);
+    return findNodes(
+                executionContext,
+                args[0]->nodeset(),
+                DoubleSupport::lessThan);
 }
 
 
@@ -220,7 +226,7 @@
 
         assert(theNodeSet.item(0) != 0);
 
-        DOMServices::getNodeData(*theNodeSet.item(0), theStringValue);
+        DOMServices::getNodeData(*theNodeSet.item(0), executionContext, theStringValue);
 
         double  theResult = DOMStringToDouble(theStringValue, executionContext.getMemoryManager());
 
@@ -230,7 +236,7 @@
 
             theStringValue.clear();
 
-            DOMServices::getNodeData(*theNodeSet.item(i), theStringValue);
+            DOMServices::getNodeData(*theNodeSet.item(i), executionContext, theStringValue);
 
             const double    theCurrent =
                 DOMStringToDouble(
@@ -281,7 +287,10 @@
 
     assert(args[0].null() == false);
 
-    return findValue(executionContext, args[0]->nodeset(), DoubleSupport::lessThan);
+    return findValue(
+                executionContext,
+                args[0]->nodeset(),
+                DoubleSupport::lessThan);
 }
 
 
@@ -323,7 +332,10 @@
 
     assert(args[0].null() == false);
 
-    return findValue(executionContext, args[0]->nodeset(), DoubleSupport::greaterThan);
+    return findValue(
+                executionContext,
+                args[0]->nodeset(),
+                DoubleSupport::greaterThan);
 }
 
 
@@ -365,7 +377,7 @@
 
     assert(args[0].null() == false);
 
-    return executionContext.getXObjectFactory().createNumber(DoubleSupport::abs(args[0]->num()));
+    return executionContext.getXObjectFactory().createNumber(DoubleSupport::abs(args[0]->num(executionContext)));
 }
 
 
@@ -469,7 +481,7 @@
     using std::acos;
 #endif
 
-    return executionContext.getXObjectFactory().createNumber(acos(args[0]->num()));
+    return executionContext.getXObjectFactory().createNumber(acos(args[0]->num(executionContext)));
 }
 
 
@@ -517,7 +529,7 @@
     using std::asin;
 #endif
 
-    return executionContext.getXObjectFactory().createNumber(asin(args[0]->num()));
+    return executionContext.getXObjectFactory().createNumber(asin(args[0]->num(executionContext)));
 }
 
 
@@ -564,7 +576,7 @@
     using std::atan;
 #endif
 
-    return executionContext.getXObjectFactory().createNumber(atan(args[0]->num()));
+    return executionContext.getXObjectFactory().createNumber(atan(args[0]->num(executionContext)));
 }
 
 
@@ -612,7 +624,8 @@
     using std::atan2;
 #endif
 
-    return executionContext.getXObjectFactory().createNumber(atan2(args[0]->num(), args[1]->num()));
+    return executionContext.getXObjectFactory().createNumber(
+                atan2(args[0]->num(executionContext), args[1]->num(executionContext)));
 }
 
 
@@ -1017,8 +1030,8 @@
 
     assert(args[0].null() == false && args[1].null() == false);
 
-    const XalanDOMString&   theConstant = args[0]->str();
-    const double            thePrecision = DoubleSupport::round(args[1]->num());
+    const XalanDOMString&   theConstant = args[0]->str(executionContext);
+    const double            thePrecision = DoubleSupport::round(args[1]->num(executionContext));
 
     if (thePrecision <= 0.0L)
     {
@@ -1118,7 +1131,7 @@
     using std::cos;
 #endif
 
-    return executionContext.getXObjectFactory().createNumber(cos(args[0]->num()));
+    return executionContext.getXObjectFactory().createNumber(cos(args[0]->num(executionContext)));
 }
 
 
@@ -1164,7 +1177,7 @@
     using std::exp;
 #endif
 
-    return executionContext.getXObjectFactory().createNumber(exp(args[0]->num()));
+    return executionContext.getXObjectFactory().createNumber(exp(args[0]->num(executionContext)));
 }
 
 
@@ -1210,7 +1223,7 @@
     using std::log;
 #endif
 
-    return executionContext.getXObjectFactory().createNumber(log(args[0]->num()));
+    return executionContext.getXObjectFactory().createNumber(log(args[0]->num(executionContext)));
 }
 
 
@@ -1258,7 +1271,10 @@
     using std::pow;
 #endif
 
-    return executionContext.getXObjectFactory().createNumber(pow(args[0]->num(), args[1]->num()));
+    return executionContext.getXObjectFactory().createNumber(
+                pow(
+                    args[0]->num(executionContext),
+                    args[1]->num(executionContext)));
 }
 
 
@@ -1304,7 +1320,7 @@
     using std::sin;
 #endif
 
-    return executionContext.getXObjectFactory().createNumber(sin(args[0]->num()));
+    return executionContext.getXObjectFactory().createNumber(sin(args[0]->num(executionContext)));
 }
 
 
@@ -1352,7 +1368,7 @@
     using std::sqrt;
 #endif
 
-    return executionContext.getXObjectFactory().createNumber(sqrt(args[0]->num()));
+    return executionContext.getXObjectFactory().createNumber(sqrt(args[0]->num(executionContext)));
 }
 
 
@@ -1398,7 +1414,7 @@
     using std::tan;
 #endif
 
-    return executionContext.getXObjectFactory().createNumber(tan(args[0]->num()));
+    return executionContext.getXObjectFactory().createNumber(tan(args[0]->num(executionContext)));
 }
 
 

Modified: xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTString.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTString.cpp?rev=686432&r1=686431&r2=686432&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTString.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanEXSLT/XalanEXSLTString.cpp Fri Aug 15 18:13:38 2008
@@ -87,8 +87,8 @@
         args[1].null() == false &&
         (theSize == 2 || args[2].null() == false));
 
-    const XalanDOMString&   theTargetString = args[0]->str();
-    const XalanDOMString&   thePaddingString = args[1]->str();
+    const XalanDOMString&   theTargetString = args[0]->str(executionContext);
+    const XalanDOMString&   thePaddingString = args[1]->str(executionContext);
 
     const XalanDOMString::size_type     theTargetStringLength = theTargetString.length();
     const XalanDOMString::size_type     thePaddingStringLength = thePaddingString.length();
@@ -117,7 +117,7 @@
 
             if (theSize == 3)
             {
-                const XalanDOMString&   theAlignmentString = args[2]->str();
+                const XalanDOMString&   theAlignmentString = args[2]->str(executionContext);
 
                 if (equals(
                             s_centerString,
@@ -207,7 +207,7 @@
         {
             assert(theNodeSet.item(i) != 0);
 
-            DOMServices::getNodeData(*theNodeSet.item(i), theResult);
+            DOMServices::getNodeData(*theNodeSet.item(i), executionContext, theResult);
         }
 
         return executionContext.getXObjectFactory().createString(theResult);
@@ -248,8 +248,8 @@
         args[0].null() == false &&
         (theSize == 1 || args[1].null() == false));
 
-    const double                        theLength = DoubleSupport::round(args[0]->num());
-    const XalanDOMString&               thePaddingString = theSize == 2 ? args[1]->str() : m_space;
+    const double                        theLength = DoubleSupport::round(args[0]->num(executionContext));
+    const XalanDOMString&               thePaddingString = theSize == 2 ? args[1]->str(executionContext) : m_space;
     const XalanDOMString::size_type     thePaddingStringLength = thePaddingString.length();
 
     if (theLength == 0.0 || thePaddingStringLength == 0)
@@ -357,13 +357,13 @@
         args[1].null() == false &&
         (theSize == 2 || args[2].null() == false));
 
-    const XalanDOMString& theString = args[0]->str();
-    const bool            escapeReserved = args[1]->boolean();
+    const XalanDOMString& theString = args[0]->str(executionContext);
+    const bool            escapeReserved = args[1]->boolean(executionContext);
 
     // We only support UTF-8, which is the default when there are only two arguments.
     const bool  fSupportedEncoding =
                     theSize == 2 ||
-                    XalanTranscodingServices::encodingIsUTF8(args[2]->str());
+                    XalanTranscodingServices::encodingIsUTF8(args[2]->str(executionContext));
 
     if (theString.length() == 0 ||
         !fSupportedEncoding)
@@ -488,12 +488,12 @@
         args[0].null() == false && 
         (theSize == 1 || args[1].null() == false));
 
-    const XalanDOMString& theString = args[0]->str();
+    const XalanDOMString& theString = args[0]->str(executionContext);
 
     // We only support UTF-8, which is the default when there's only one argument.
     const bool  fSupportedEncoding =
         theSize == 1 ||
-        XalanTranscodingServices::encodingIsUTF8(args[1]->str());
+        XalanTranscodingServices::encodingIsUTF8(args[1]->str(executionContext));
 
     if (theString.length() == 0 || !fSupportedEncoding)
     {

Modified: xalan/c/trunk/src/xalanc/XalanExtensions/FunctionDistinct.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanExtensions/FunctionDistinct.cpp?rev=686432&r1=686431&r2=686432&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanExtensions/FunctionDistinct.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanExtensions/FunctionDistinct.cpp Fri Aug 15 18:13:38 2008
@@ -105,7 +105,7 @@
             XalanNode* const    theNode = nodeset.item(i);
             assert(theNode != 0);
 
-            DOMServices::getNodeData(*theNode, theCachedString);
+            DOMServices::getNodeData(*theNode, executionContext, theCachedString);
 
             if (theStrings.find(theCachedString) == theStrings.end())
             {

Modified: xalan/c/trunk/src/xalanc/XalanExtensions/FunctionEvaluate.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanExtensions/FunctionEvaluate.cpp?rev=686432&r1=686431&r2=686432&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanExtensions/FunctionEvaluate.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanExtensions/FunctionEvaluate.cpp Fri Aug 15 18:13:38 2008
@@ -118,7 +118,7 @@
 
     assert(args[0].null() == false);
 
-    const XalanDOMString&   theExpression = args[0]->str();
+    const XalanDOMString&   theExpression = args[0]->str(executionContext);
 
     const PrefixResolver* const theResolver =
         executionContext.getPrefixResolver();

Modified: xalan/c/trunk/src/xalanc/XalanExtensions/FunctionNodeSet.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanExtensions/FunctionNodeSet.cpp?rev=686432&r1=686431&r2=686432&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanExtensions/FunctionNodeSet.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanExtensions/FunctionNodeSet.cpp Fri Aug 15 18:13:38 2008
@@ -38,9 +38,9 @@
 public:
 
     XalanDocumentFragmentXNodeSetBaseProxy(
-                MemoryManagerType&  theManager,
-                const XObjectPtr&   theXObject) :
-        XNodeSetBase(theManager),
+                XPathExecutionContext&  theExecutionContext,
+                const XObjectPtr&       theXObject) :
+        XNodeSetBase(theExecutionContext.getMemoryManager()),
         m_xobject(theXObject),
         m_proxy(theXObject->rtree())
     {
@@ -48,16 +48,20 @@
 
     static XalanDocumentFragmentXNodeSetBaseProxy*
     create(
-            MemoryManagerType&  theManager,
-            const XObjectPtr&   theXObject)
+                XPathExecutionContext&  theExecutionContext,
+                const XObjectPtr&       theXObject)
     {
         XalanDocumentFragmentXNodeSetBaseProxy*     theResult;
 
-        return XalanConstruct(theManager, theResult, theManager, theXObject);
+        return XalanConstruct(
+                    theExecutionContext.getMemoryManager(),
+                    theResult,
+                    theExecutionContext,
+                    theXObject);
     }
 
     XalanDocumentFragmentXNodeSetBaseProxy(
-                MemoryManagerType&                              theManager,
+                MemoryManager&                                  theManager,
                 const XalanDocumentFragmentXNodeSetBaseProxy&   theSource) :
         XNodeSetBase(theSource, theManager),
         m_xobject(theSource.m_xobject),
@@ -70,6 +74,11 @@
     {
     }
 
+    virtual const NodeRefListBase&
+    nodeset(XPathExecutionContext&  /* theExecutionContext */) const
+    {
+        return m_proxy;
+    }
 
     virtual const NodeRefListBase&
     nodeset() const
@@ -140,7 +149,7 @@
     {
         return XObjectPtr(
                     XalanDocumentFragmentXNodeSetBaseProxy::create(
-                        executionContext.getMemoryManager(),
+                        executionContext,
                         args[0]));
     }
     else



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