Package com.spoledge.util.xslt

Examples of com.spoledge.util.xslt.TemplatesCache


    }


    private Transformer getTransformer( String resourceKey ) {
        try {
            TemplatesCache tc = generator.getTemplatesCache();
            Templates templates = tc.getTemplates( resourceKey );

            if (templates == null) {
                InputStream is = getClass().getResourceAsStream( resourceKey );
                templates = tc.getTemplates( resourceKey, new StreamSource( is, resourceKey ));
            }

            Transformer ret = templates.newTransformer();
            ret.setURIResolver( generator.getResourceURIResolver()); // not auto copied from TrFactory
            ret.setErrorListener( this );
View Full Code Here


     */
    public synchronized TemplatesCache getTemplatesCache() {
        if (templatesCache == null) {
            synchronized (Generator.class) {
                if (globalTemplatesCache == null) {
                    globalTemplatesCache = new TemplatesCache();
                    globalTemplatesCache.getTransformerFactory().setURIResolver( resourceURIResolver );
                }
            }

            templatesCache = globalTemplatesCache;
View Full Code Here

TOP

Related Classes of com.spoledge.util.xslt.TemplatesCache

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.