Hi Colin,

Actually, they both can be freely shared -- the ownership issue has to do
with the lifetime of the object.  For example, it's possible to use a
XalanTransformer instance as a factory for XalanParsedSource and
XalanCompiledStylesheet instances and use them in transformations with
other XalanTransformer instances.

See the ThreadTest test program for an example of a XalanTransformer
instance used solely as a factory.

Of course, you can always create instances of the implementation classes of
XalanParsedSource and/or XalanCompiledStylesheet without using a
XalanTransformer as a factory.  That might make more sense if you want a
cache of source trees and/or compiled stylesheets.

Dave



                                                                                
                                         
                      Colin Paul Adams                                          
                                         
                      <[EMAIL PROTECTED]         To:      
[email protected]                                     
                      mon.co.uk>               cc:      (bcc: David N 
Bertoni/Cambridge/IBM)                             
                                               Subject: Portability of 
XalanTransformer::CompiledStylesheet?             
                      03/26/2003 01:26                                          
                                         
                      PM                                                        
                                         
                                                                                
                                         



I notice that XalanTransformer::ParsedSource is owned by the
transformer, and can't be used by another.

Would I be right to assume that this restriction does NOT applied to
CompiledStylesheet, so they could be cached, for instance?
--
Colin Paul Adams
Preston Lancashire


Reply via email to