URL xsl = clazz.getResource(templateName);
                templateCache = TransformerFactory.newInstance().newTemplates(
                        new StreamSource(xsl.toExternalForm()));
                templateLoaded = true;
            } catch (TransformerConfigurationException e) {
                throw new SchemaCompilationException(SchemaCompilerMessages
                        .getMessage("schema.templateLoadException"), e);
            }
        } else {
            throw new SchemaCompilationException(SchemaCompilerMessages
                    .getMessage("schema.templateNotFoundException"));
        }
    }