> Is there a limit on the number of XPaths that can be created from a
> XPathFactory.

Only limitations based on the amount of available memory.

> I find that after creating a number of XPaths with code of the form:
> 
>   XPath* const  partyPath = theXPathFactory.create();
>   theXPathProcessor.initXPath( *partyPath, theXPathConstructionContext,
>    XalanDOMString( "/fpml:FpML/dswg:party"), thePrefixResolver);

There should be no problem creating multiple XPath instances.

> If I add one more such call, it throws an exception as does every other
> XPath creation attempt after that.

This either a bug in our code, or a bug in your code.  Please post a 
_minimal_ code snippet that reproduces the problem, and give us your 
platform and compiler information.

> Is there any way to increase the number of XPaths that can be created
> from a XPathFactory.  Also what is the way release XPaths after they
> are no longer needed?

Since the only limitation is based on available memory, there is no way to 
increase the capacity.  You can use XPathFactory::returnObject() once 
you've finished using the XPath instance.

> I am using XPathFactoryDefault.  Should I switch to XPathFactoryBlock? 
What
> is a block?

Probably not.  XPathFactoryBlock does block allocation of XPath instances, 
and is only appropriate if you're going to create a large number of XPath 
instances and destroy them all at once.

Dave

Reply via email to