Examples of newTemplates()


Examples of com.caucho.xsl.AbstractStylesheetFactory.newTemplates()

      className += "/" + href;

      factory.setClassName(className);

      // XXX: error here
      return factory.newTemplates(href);
    } finally {
      thread.setContextClassLoader(oldLoader);
    }
  }
View Full Code Here

Examples of com.dotcms.repackage.javax.xml.transform.TransformerFactory.newTemplates()

            // Create transformer factory
            TransformerFactory factory = TransformerFactory.newInstance();

            Logger.debug(this, "factory : " +  factory);
            // Use the factory to create a template containing the xsl file
            Templates template = factory.newTemplates(new StreamSource(
                    getClass().getClassLoader().getResourceAsStream(xslPath)));

           
            System.out.println("template : " +  template);
            // Use the template to create a transformer
View Full Code Here

Examples of javax.xml.transform.TransformerFactory.newTemplates()

      if (DebugFile.trace) DebugFile.writeln("TransformerFactory.newInstance()");
      oFactory = TransformerFactory.newInstance();
      if (DebugFile.trace) DebugFile.writeln("new StreamSource("+sFilePath+")");
      oStreamSrc = new StreamSource(sFilePath);
      if (DebugFile.trace) DebugFile.writeln("TransformerFactory.newTemplates(StreamSource)");
      oTemplates = oFactory.newTemplates(oStreamSrc);
      oSheet = new SheetEntry(lastMod, oTemplates);
      if (DebugFile.trace) DebugFile.writeln("WeakHashMap.put("+sFilePath+", SheetEntry)");
      oCache.put(sFilePath, oSheet);
    } // fi
View Full Code Here

Examples of javax.xml.transform.TransformerFactory.newTemplates()

    ByteArrayOutputStream oOutputStream = new ByteArrayOutputStream();

    TransformerFactory oFactory = TransformerFactory.newInstance();
    StreamSource oStreamSrc = new StreamSource(oStyleSheetStream);
    Templates oTemplates = oFactory.newTemplates(oStreamSrc);
    Transformer oTransformer = oTemplates.newTransformer();

    if (null!=oProps) setParameters(oTransformer, oProps);
    StreamSource oStreamSrcXML = new StreamSource(oXMLInputStream);
    StreamResult oStreamResult = new StreamResult(oOutputStream);
View Full Code Here

Examples of javax.xml.transform.TransformerFactory.newTemplates()

                        + transformTarget.getXslFilename());

        TransformerFactory tf = TransformerFactory.newInstance();

        StreamSource source = new StreamSource(xsl);
        Templates templates = tf.newTemplates(source);

        Transformer trf = templates.newTransformer();

        trf.transform(new StreamSource(input), new StreamResult(output));
    }
View Full Code Here

Examples of javax.xml.transform.TransformerFactory.newTemplates()

    if(uriResolver != null){
      transFact.setURIResolver(uriResolver);
    }

    this.templates = transFact.newTemplates(xsltSource);
    this.file = f;
  }

  @Override
  public String toString() {
View Full Code Here

Examples of javax.xml.transform.TransformerFactory.newTemplates()

  private void cacheStyleSheet(Class<?> resourceClass, String path) throws TransformerConfigurationException{
    InputStream inputStream = resourceClass.getResourceAsStream(path);
    Source xsltSource = new StreamSource(inputStream);
    TransformerFactory transFact = TransformerFactory.newInstance();
    Templates templates = transFact.newTemplates(xsltSource);

    try {inputStream.close();} catch (IOException e) {}

    this.templates = templates;
    this.resourceClass = resourceClass;
View Full Code Here

Examples of javax.xml.transform.TransformerFactory.newTemplates()

    if(uriResolver != null){
      transFact.setURIResolver(uriResolver);
    }

    this.templates = transFact.newTemplates(new StreamSource(uri.toString()));
  }

  @Override
  public String toString() {
View Full Code Here

Examples of javax.xml.transform.TransformerFactory.newTemplates()

                Source xslSource = new StreamSource(is);
                // Note that if we don't do this, relative URLs can not be
                // resolved correctly!
                xslSource.setSystemId(getServletContext().getRealPath(
                        xsltStyleSheet));
                this.templates = tfactory.newTemplates(xslSource);
            } catch (TransformerConfigurationException tce) {
                throw new ServletException("Error parsing XSLT stylesheet: "
                        + xsltStyleSheet, tce);
            }
View Full Code Here

Examples of javax.xml.transform.TransformerFactory.newTemplates()

                // Note that if we don't do this, relative URLs can not be
                // resolved correctly!
                xslSource.setSystemId(getServletContext().getRealPath(
                        xsltStyleSheet));
            }
            this.templates = tfactory.newTemplates(xslSource);
        } catch (TransformerConfigurationException tce) {
            throw new ServletException("Error parsing XSLT stylesheet: "
                    + xsltStyleSheet, tce);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.