Package net.sf.saxon.s9api

Examples of net.sf.saxon.s9api.Serializer


        this.trans = transformer;
        this.proc = proc;
        this.parameterMap = parameterMap;
        this.listener = listener;
        this.outPath = outPath;
        Serializer serializer = null;
        try {
            serializer = getTempDestination();
        } catch (IOException ex) {
            Logger.getLogger(RenderingTask.class.getName()).log(Level.SEVERE, null, ex);
        }
View Full Code Here


    }
   
    private Serializer getTempDestination() throws IOException {
        File outFile;
        outFile = File.createTempFile("xms-", ".html");
        Serializer localOut = proc.newSerializer(outFile);
        localOut.setOutputProperty(Serializer.Property.METHOD, "html");
        localOut.setOutputProperty(Serializer.Property.INDENT, "yes");
        return localOut;
    }
View Full Code Here

  private static String prettyPrint(XdmValue xdm) throws Exception {
    Activator.logInfo("Pretty printing");

    Writer result = new StringWriter();
    XsltTransformer xsltTransformer = xsltExec.load();
    xsltTransformer.setDestination(new Serializer(result));

    for (XdmItem item: xdm) {
      if (item instanceof XdmNode) {
        xsltTransformer.setInitialContextNode((XdmNode) item);
        xsltTransformer.transform();
View Full Code Here

TOP

Related Classes of net.sf.saxon.s9api.Serializer

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.