tst.setParameter("USER_LANG", locales[0].toString().replace('_', '-'));
}
// initialize a filter to fill in channel attributes for the "theme" (second) transformation.
// attach it downstream of the channel rendering buffer
ThemeAttributesIncorporationFilter taif = new ThemeAttributesIncorporationFilter(
(XMLReader) crb, userPreferences.getThemeStylesheetUserPreferences());
// attach theme transformation downstream of the theme attribute incorporation filter
taif.setAllHandlers(tsth);
// This is a debug statement that will print out XML incoming to the
// theme transformation to a log file serializer to a printstream
StringWriter dbwr2 = null;
if (logXMLBeforeThemeTransformation && log.isDebugEnabled()) {