John --
For now, you could cast the ExpressionContext to an
XPathContext.XPathExpressionContext and use the getDTMManager() method,
like this:
public MyExtFunction(ExpressionContext xctxt, ...) {
...
DTMManager manager = ((XPathContext.XPathExpressionContext)
xctxt).getDTMManager();
...
}
I'm not sure if we should add this method to ExpressionContext since
someday it might not be available for all expression contexts, maybe.
Of course, in that case, we could always return null.
Scott, what do you think? I'm in ExpressionContext anyway with the
getVariable(..) support.
Gary
John Gentilin wrote:
>
> You are probably right. I was under the assumption that the DTM Manager was
> not in use at all. What I do is in my derived class I have a constructor that takes
> a ResultSet as its only argument then in the constructor I call super() with all
>null's
> or 0's for manager and identity. I was thinking that was probably incorrect but may
> not have mattered since it is being assigned to a variable.
>
> The DTM Manager does not appear to be a SINGLETON object, so how do I
> get a hold of the Default Manager from an extension ??