Common stuff for use with TagBegin and TagEndGenerators.
author: Anil K. Vijendran author: Hans Bergsten [hans@gefionsoftware.com] (changed all statics to author: regular instance vars and methods to avoid corrupt state and author: multi-threading issues)