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
22 import org.apache.turbine.services.TurbineServices;
23
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 * @version $Id: TurbineXSLT.java,v 1.4.2.2 2004/05/20 03:06:52 seade Exp $
31 */
32 public class TurbineXSLT
33 {
34 /***
35 * Utility method for accessing the service
36 * implementation
37 *
38 * @return a XSLTService implementation instance
39 */
40 protected static XSLTService getService()
41 {
42 return (XSLTService) TurbineServices
43 .getInstance().getService(XSLTService.SERVICE_NAME);
44 }
45
46 public static void transform(String xslName, Reader in, Writer out)
47 throws Exception
48 {
49 getService().transform(xslName, in, out);
50 }
51
52 public static String transform(String xslName, Reader in)
53 throws Exception
54 {
55 return getService().transform(xslName, in);
56 }
57
58 public void transform(String xslName, Node in, Writer out)
59 throws Exception
60 {
61 getService().transform(xslName, in, out);
62 }
63
64 public String transform(String xslName, Node in)
65 throws Exception
66 {
67 return getService().transform(xslName, in);
68 }
69 }