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