1 package org.apache.turbine.services.xslt;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.io.Reader;
23 import java.io.Writer;
24 import java.util.Map;
25
26 import org.apache.turbine.services.TurbineServices;
27 import org.w3c.dom.Node;
28
29 /***
30 * This is a static accesor class for {@link XSLTService}.
31 *
32 * @author <a href="mailto:leon@opticode.co.za">Leon Messerschmidt</a>
33 * @author <a href="thomas.vandahl@tewisoft.de">Thomas Vandahl</a>
34 * @version $Id: TurbineXSLT.java 534527 2007-05-02 16:10:59Z tv $
35 */
36 public class TurbineXSLT
37 {
38 /***
39 * Utility method for accessing the service
40 * implementation
41 *
42 * @return a XSLTService implementation instance
43 */
44 protected static XSLTService getService()
45 {
46 return (XSLTService) TurbineServices
47 .getInstance().getService(XSLTService.SERVICE_NAME);
48 }
49
50 public static void transform(String xslName, Reader in, Writer out)
51 throws Exception
52 {
53 getService().transform(xslName, in, out);
54 }
55
56 public static String transform(String xslName, Reader in)
57 throws Exception
58 {
59 return getService().transform(xslName, in);
60 }
61
62 public void transform(String xslName, Node in, Writer out)
63 throws Exception
64 {
65 getService().transform(xslName, in, out);
66 }
67
68 public String transform(String xslName, Node in)
69 throws Exception
70 {
71 return getService().transform(xslName, in);
72 }
73
74 public static void transform(String xslName, Reader in, Writer out, Map params)
75 throws Exception
76 {
77 getService().transform(xslName, in, out, params);
78 }
79
80 public static String transform(String xslName, Reader in, Map params)
81 throws Exception
82 {
83 return getService().transform(xslName, in, params);
84 }
85
86 public void transform(String xslName, Node in, Writer out, Map params)
87 throws Exception
88 {
89 getService().transform(xslName, in, out, params);
90 }
91
92 public String transform(String xslName, Node in, Map params)
93 throws Exception
94 {
95 return getService().transform(xslName, in, params);
96 }
97 }