> Scott, what do you think?  I'm in ExpressionContext anyway with the
> getVariable(..) support.

Hmm... I think ExpressionContext was intended to eventually be replaced by
a standard W3C defined interface.  For now at least I think we want to
discourage access of proprietary mechanisms such as the DTMManager in
extensions.  The SQL extension is a special case.  And there are, of
course, other extensions that need to go deeper into Xalan's APIs.  But I
guess I would rather the ExpressionContext interface itself remain
relatively pure.  So probably the cast to XPathExpressionContext is a
better mechanism right now.

-scott




                                                                                       
                            
                    Gary L Peskin                                                      
                            
                    <garyp@firste        To:     [EMAIL PROTECTED]              
                            
                    ch.com>              cc:     (bcc: Scott Boag/CAM/Lotus)           
                            
                                         Subject:     Re: Extension Function returns   
                            
                    07/07/2001                                                         
                            
                    09:21 PM                                                           
                            
                    Please                                                             
                            
                    respond to                                                         
                            
                    xalan-dev                                                          
                            
                                                                                       
                            
                                                                                       
                            




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 ??




Reply via email to