dbertoni    01/09/05 13:11:34

  Modified:    c/src/XPath XPathEvaluator.cpp XPathEvaluator.hpp
  Log:
  Added new overload.  Added implementation for existing overload.
  
  Revision  Changes    Path
  1.5       +28 -0     xml-xalan/c/src/XPath/XPathEvaluator.cpp
  
  Index: XPathEvaluator.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathEvaluator.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XPathEvaluator.cpp        2001/08/31 21:38:36     1.4
  +++ XPathEvaluator.cpp        2001/09/05 20:11:34     1.5
  @@ -59,6 +59,10 @@
   
   
   
  +#include <DOMSupport/DOMSupportDefault.hpp>
  +
  +
  +
   #include <XPath/ElementPrefixResolverProxy.hpp>
   #include <XPath/XObjectFactoryDefault.hpp>
   #include <XPath/XPathEnvSupportDefault.hpp>
  @@ -346,6 +350,30 @@
                                xpath,
                                prefixResolver,
                                theEnvSupportDefault);
  +}
  +
  +
  +
  +XPath*
  +XPathEvaluator::createXPath(const XalanDOMChar*              xpathString)
  +{
  +     DOMSupportDefault               theDOMSupport;
  +     XPathEnvSupportDefault  theEnvSupportDefault;
  +
  +     return createXPath(xpathString, ElementPrefixResolverProxy(0, 
theEnvSupportDefault, theDOMSupport));
  +}
  +
  +
  +
  +XPath*
  +XPathEvaluator::createXPath(
  +                     const XalanDOMChar*             xpathString,
  +                     DOMSupport&                             domSupport,
  +                     const XalanElement*             namespaceNode)
  +{
  +     XPathEnvSupportDefault  theEnvSupportDefault;
  +
  +     return createXPath(xpathString, ElementPrefixResolverProxy(namespaceNode, 
theEnvSupportDefault, domSupport));
   }
   
   
  
  
  
  1.4       +16 -1     xml-xalan/c/src/XPath/XPathEvaluator.hpp
  
  Index: XPathEvaluator.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathEvaluator.hpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XPathEvaluator.hpp        2001/08/31 21:38:36     1.3
  +++ XPathEvaluator.hpp        2001/09/05 20:11:34     1.4
  @@ -352,16 +352,31 @@
        /**
         * Compile an XPath expression into an object which can be used multiple times.
         * Call destroyXPath() when finished with the instance.  Otherwise, the object
  +      * will be destroyed when the XPathEvaluator instance goes out of scope.  Since
  +      * no PrefixResolver is supplied, the XPath expression may not contain any
  +      * namespace prefixes.
  +      *
  +      * @param xpathString The XPath expression to evaluate
  +      * @return A pointer to an XPath instance.
  +      */
  +     XPath*
  +     createXPath(const XalanDOMChar*         xpathString);
  +
  +     /**
  +      * Compile an XPath expression into an object which can be used multiple times.
  +      * Call destroyXPath() when finished with the instance.  Otherwise, the object
         * will be destroyed when the XPathEvaluator instance goes out of scope.
         *
         * @param xpathString The XPath expression to evaluate
  +      * @param domSupport An instance of the corresponding DOMSupport-derived for 
the DOM implementation being used.
         * @param namespaceNode A node to use for namespace prefix resolution.
         * @return A pointer to an XPath instance.
         */
        XPath*
        createXPath(
                        const XalanDOMChar*             xpathString,
  -                     const XalanElement*             namespaceNode = 0);
  +                     DOMSupport&                             domSupport,
  +                     const XalanElement*             namespaceNode);
   
        /**
         * Compile an XPath expression into an object which can be used multiple times.
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to