Package org.apache.xalan.xslt

Examples of org.apache.xalan.xslt.XSLTResultTarget


    XSLTInputSource xmlID = new XSLTInputSource("foo.xml");
    XSLTInputSource stylesheetID = new XSLTInputSource("foo.xsl");

    // Create a DOM Document node to attach the result nodes to.
    Document out = new org.apache.xerces.dom.DocumentImpl();
    XSLTResultTarget resultTarget = new XSLTResultTarget(out);

    // Process the source tree and produce the result tree.
    processor.process(xmlID, stylesheetID, resultTarget);

    // Use the FormatterToXML and TreeWalker to print the DOM to System.out
View Full Code Here


    System.out.println("------------------");
    // Have the XSLTProcessor processor object transform "foo.xml" to
    // System.out, using the XSLT instructions found in "foo.xsl".
    processor.process(new XSLTInputSource("foo.xml"),
                      new XSLTInputSource("foo.xsl"),
                      new XSLTResultTarget(System.out));
    System.out.println("\n------------------");
  }
View Full Code Here

            xslprocessor.setQuietConflictWarnings(ourDefaultParameters.isNoCW(request));
            xslprocessor.setProblemListener(listener);
            if (debug)
            {
              ByteArrayOutputStream baos = new ByteArrayOutputStream();
              XSLTResultTarget outBuffer = new XSLTResultTarget(baos);
              setStylesheetParams(xslprocessor, request);
              xslprocessor.process(xmlSource, xslSource, outBuffer);
              baos.writeTo(response.getOutputStream());
              writeLog(listener.getMessage(), response.SC_OK);
            }
            else
            {
              setStylesheetParams(xslprocessor, request);
              xslprocessor.process(xmlSource, xslSource,
                                   new XSLTResultTarget(response.getWriter()));
            }
          }
          catch (Exception exc)
          {
            ApplyXSLException axe = new ApplyXSLException("Exception occurred during Transformation:"
View Full Code Here

    // Have the XSLTProcessor processor object transform "foo.xml" to
    // System.out, using the XSLT instructions found in "foo.xsl".
    processor.process(new XSLTInputSource("foo.xml"),
                      new XSLTInputSource("foo.xsl"),
                      new XSLTResultTarget(System.out));
  }
View Full Code Here

  // Prepare an input source for the stylesheet
  XSLTInputSource style =
      getInputSource(nameXsl, propertyXsl, xsl);

  // Prepare an output source for the results
  XSLTResultTarget result =
      new XSLTResultTarget(pageContext.getOut());

  // Create an XSLT processor and use it to perform the transformation
  XSLTProcessor processor = null;
  try {
      processor = XSLTProcessorFactory.getProcessor();
View Full Code Here

     
      // Have the XSLTProcessor processor object transform "foo.xml" to
      // System.out, using the XSLT instructions found in "foo.xsl".
      processor.process(new XSLTInputSource(url),
            new XSLTInputSource(xsl),
            new XSLTResultTarget(out));
  } catch(SAXException sexp) {
      throw new JspException("SAXParser Exception: " + sexp.getMessage());     
  }
    }
View Full Code Here

     
      // Have the XSLTProcessor processor object transform "foo.xml" to
      // System.out, using the XSLT instructions found in "foo.xsl".
      processor.process(new XSLTInputSource(url),
            new XSLTInputSource(xsl),
            new XSLTResultTarget(out));
  } catch(SAXException sexp) {
      throw new JspException("SAXParser Exception: " + sexp.getMessage());     
  }
    }
View Full Code Here

      XSLTProcessor processor = XSLTProcessorFactory.getProcessor();

      // Create the 3 objects the XSLTProcessor needs to perform the transformation.
      XSLTInputSource xmlSource  = new XSLTInputSource (args[0]);
      XSLTInputSource xslSheet   = new XSLTInputSource (args[1]);
      XSLTResultTarget xmlResult = new XSLTResultTarget (writer);

      // Perform the transformation.
      processor.process(xmlSource, xslSheet, xmlResult);
     
      if (usefile) {
View Full Code Here

      xslSheet = new XSLTInputSource (fileName);
    };

    public void transform(String infile, String outfile) throws Exception {
      processor.process(new XSLTInputSource(infile), xslSheet,
                        new XSLTResultTarget(outfile));
    }
View Full Code Here

            System.err.println("XSL File: " + args[1]);
            System.err.println("URL: " + urlTmp);
            XSLTInputSource xslSheet =
              new XSLTInputSource (urlTmp.toString());

            XSLTResultTarget xmlResult = new XSLTResultTarget (writer);

            // Perform the transformation.
            processor.process(xmlSource, xslSheet, xmlResult);

            if (usefile) {
View Full Code Here

TOP

Related Classes of org.apache.xalan.xslt.XSLTResultTarget

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.