1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.portals.applications.transform;
18
19 import java.io.OutputStream;
20 import java.io.Writer;
21 import java.util.Map;
22
23 import org.w3c.dom.Document;
24 import org.xml.sax.InputSource;
25
26
27 /***
28 * This interface is a facade for all Transformation related operations.
29 * Transformation service abstracts the XSL Transform manipulation, maintenance,
30 * caching and transformation resolution algorithms.
31 *
32 * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
33 * @version $Id: Transform.java 516448 2007-03-09 16:25:47Z ate $
34 */
35 public interface Transform
36 {
37
38 /***
39 * Performs a transform on an input stream, writing the transformed content to a Writer
40 *
41 * @param xsltPath The path to a local XSLT file
42 * @param inputSource The input stream and description containing content to be transformed.
43 * @param writer The output stream receiving the transformed content.
44 * @param properties Map of XSLT properties passed into transformer
45 */
46 public void transform(String xsltPath, InputSource inputSource, Writer writer, Map properties)
47 throws TransformException;
48
49 /***
50 * Performs a transform on an input stream, writing the transformed content to a Writer
51 *
52 * @param xsltPath The path to a local XSLT file
53 * @param inputSource The input stream and description containing content to be transformed.
54 * @param outputStream The output stream receiving the transformed content.
55 * @param properties Map of XSLT properties passed into transformer
56 */
57 public void transform(String xsltPath, InputSource inputSource, OutputStream os, Map properties)
58 throws TransformException;
59
60
61 /***
62 * Performs a transform on an input stream, writing the transformed content to a Writer
63 *
64 * @param xsltPath The path to a local XSLT file
65 * @param document The W3C document to be transformed.
66 * @param outputStream The output stream receiving the transformed content.
67 * @param properties Map of XSLT properties passed into transformer
68 */
69 public TransformObjectPublisher getPublisher();
70
71 public void transform(String xsltPath, Document document, OutputStream os, Map parameters)
72 throws TransformException;
73
74 }