// Path: de.hatoka.common/src/main/java/de/hatoka/common/capi/resource/LocalizationBundle.java
// public class LocalizationBundle
// {
//     private static final Logger LOGGER = LoggerFactory.getLogger(LocalizationBundle.class);
// 
//     private final ResourceBundle resourceBundle;
//     private final Locale locale;
//     private final String resourceBundleName;
//     private final Set<String> unkownKeys = new HashSet<>();
//     private final TimeZone timezone;
// 
//     @Deprecated
//     public LocalizationBundle(String resourceBundleName, Locale locale)
//     {
//         this(resourceBundleName, locale, CountryHelper.UTC);
//     }
// 
//     public LocalizationBundle(String resourceBundleName, Locale locale, TimeZone timeZone)
//     {
//         resourceBundle = PropertyResourceBundle.getBundle(resourceBundleName, locale);
//         this.resourceBundleName = resourceBundleName;
//         this.locale = locale;
//         this.timezone = timeZone;
//     }
// 
//     public Locale getLocal()
//     {
//         return locale;
//     }
// 
//     public TimeZone getTimeZone()
//     {
//         return timezone;
//     }
// 
//     public String getText(String key)
//     {
//         return getText(key, "{" + key + "}");
//     }
// 
//     public String getText(String key, String defaultText)
//     {
//         if (unkownKeys.contains(key))
//         {
//             return defaultText;
//         }
//         try
//         {
//             return resourceBundle.getString(key);
//         }
//         catch(MissingResourceException ex)
//         {
//             if (!unkownKeys.contains(key))
//             {
//                 LOGGER.warn("Can't resolve key '" + key + "' inside of resource '" + resourceBundleName
//                                 + "' and locale '" + locale + "'.", ex);
//                 unkownKeys.add(key);
//             }
//         }
//         return defaultText;
//     }
// 
// }


import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.StringWriter;
import java.io.Writer;
import java.net.URL;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TimeZone;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.util.JAXBSource;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import de.hatoka.common.capi.business.CountryHelper;
import de.hatoka.common.capi.resource.LocalizationBundle;
import de.hatoka.common.capi.resource.ResourceLocalizer;
package de.hatoka.common.capi.app.xslt;




public class XSLTRenderer
{
    private final TransformerFactory transformerFactory = TransformerFactory.newInstance();

    public XSLTRenderer()
    {
        transformerFactory.setURIResolver(new ClassPathURIResolver());
    }

    @Deprecated
    public Map<String, Object> getParameter(String localizationResource, Locale locale)
    {
        return getParameter(localizationResource, locale, CountryHelper.UTC);
    }

    public Map<String, Object> getParameter(String localizationResource, Locale locale, TimeZone timeZone)
    {
        Map<String, Object> result = new HashMap<>();
// Path: de.hatoka.common/src/main/java/de/hatoka/common/capi/resource/LocalizationBundle.java
// public class LocalizationBundle
// {
//     private static final Logger LOGGER = LoggerFactory.getLogger(LocalizationBundle.class);
// 
//     private final ResourceBundle resourceBundle;
//     private final Locale locale;
//     private final String resourceBundleName;
//     private final Set<String> unkownKeys = new HashSet<>();
//     private final TimeZone timezone;
// 
//     @Deprecated
//     public LocalizationBundle(String resourceBundleName, Locale locale)
//     {
//         this(resourceBundleName, locale, CountryHelper.UTC);
//     }
// 
//     public LocalizationBundle(String resourceBundleName, Locale locale, TimeZone timeZone)
//     {
//         resourceBundle = PropertyResourceBundle.getBundle(resourceBundleName, locale);
//         this.resourceBundleName = resourceBundleName;
//         this.locale = locale;
//         this.timezone = timeZone;
//     }
// 
//     public Locale getLocal()
//     {
//         return locale;
//     }
// 
//     public TimeZone getTimeZone()
//     {
//         return timezone;
//     }
// 
//     public String getText(String key)
//     {
//         return getText(key, "{" + key + "}");
//     }
// 
//     public String getText(String key, String defaultText)
//     {
//         if (unkownKeys.contains(key))
//         {
//             return defaultText;
//         }
//         try
//         {
//             return resourceBundle.getString(key);
//         }
//         catch(MissingResourceException ex)
//         {
//             if (!unkownKeys.contains(key))
//             {
//                 LOGGER.warn("Can't resolve key '" + key + "' inside of resource '" + resourceBundleName
//                                 + "' and locale '" + locale + "'.", ex);
//                 unkownKeys.add(key);
//             }
//         }
//         return defaultText;
//     }
// 
// }


// Path: de.hatoka.common/src/main/java/de/hatoka/common/capi/app/xslt/XSLTRenderer.java
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.StringWriter;
import java.io.Writer;
import java.net.URL;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TimeZone;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.util.JAXBSource;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import de.hatoka.common.capi.business.CountryHelper;
import de.hatoka.common.capi.resource.LocalizationBundle;
import de.hatoka.common.capi.resource.ResourceLocalizer;

package de.hatoka.common.capi.app.xslt;




public class XSLTRenderer
{
    private final TransformerFactory transformerFactory = TransformerFactory.newInstance();

    public XSLTRenderer()
    {
        transformerFactory.setURIResolver(new ClassPathURIResolver());
    }

    @Deprecated
    public Map<String, Object> getParameter(String localizationResource, Locale locale)
    {
        return getParameter(localizationResource, locale, CountryHelper.UTC);
    }

    public Map<String, Object> getParameter(String localizationResource, Locale locale, TimeZone timeZone)
    {
        Map<String, Object> result = new HashMap<>();
        result.put(Lib.XSLT_LOCALIZER, new ResourceLocalizer(new LocalizationBundle(localizationResource,