Add weakSingleton support in XML style.