Hi Wolfgang,

We don't want to implement a counter, because that gives the false
assumption that initialization is thread-safe and applications can do it
willy-nilly with no problem.  I'm not just making this up, this is
happening today with Xerces.  The reference-counting mechanism is required
in XSLTInit due to multiple dependencies, although I'm also regretting that
implementation as well.

Why can't you implement your own counter mechanism, if that's what works
for your application?  Just create a static counter variable and
increment/decrement by doing initialization through two function that you
write yourself.  You could also make your functions thread-safe, if you
need to.  My feeling is that this sort of thing is more appropriate at the
application -level than at the library level.

There aren't any tags in the source files because we've never gotten around
to adding them (personally, I hate them because they muck-up doing diffs).
However, it's no mystery which version you're using.  We tag all of the
files when we do a release, and also leave the CVS directories in the
distribution, so you should have no problem with CVS access using the
source tree in the distribution.  (We use anoncvs to pull down the source
trees for the builds)

Dave



                                                                                
                                                      
                      wolfgang.schell@                                          
                                                      
                      gmx.net                  To:      
[email protected]                                                  
                                               cc:      (bcc: David N 
Bertoni/Cambridge/IBM)                                          
                      03/08/2002 08:44         Subject: Counter for 
XalanTransformer::initialize() and XalanTransformer::terminate()  
                      AM                                                        
                                                      
                                                                                
                                                      
                                                                                
                                                      



Hi!

My program uses several instances of XalanTransformer. So far I have to
make
sure, that XalanTransformer::initialize() and XalanTransformer::terminate()
are called only once. Would it be possible to implement a simple init
counter
mechanism, like the one in XSLTInit.{cpp|h}?

BTW: is there a specific reason, that there are no $Id: $ tags in the
source
files? I wanted to compare my version of XalanTransformer.cpp with the HEAD
version in the CVS repository, but I don't know the version included in my
distribution (Xalan 1.3)...

Cheers,

Wolfgang

--
Wolfgang Schell
[EMAIL PROTECTED]

GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net






Reply via email to