We can avoid the statics altogether, but anyone who programs with the DOM, whether users of the parser or users of Xalan or users of software written with Xalan, etc., will also need to watch out. I don't think all of them will know enough to avoid this trap. Having a static foo("hello world") seems innocuous enough. Any other string class would allow it. Since DOMString is the way strings are exposed by the Xalan API, users of Xalan will be programming with DOMString. How do we prevent them from using static DOMString? Of course, we know why this is bad. But will the average user know this?
In any case, we're going to bypass the whole issue in our code by using static wide-character literal strings instead of DOMString's. This depends on XMLCh being the same as wchar_t, which I understand is in the works. -Rob >If Xalan is depending on Xerces being alive and well at its (Xalan's) static >construction time, we should figure out how to get rid of that dependency.