01: package xalanDoc.business;
02:
03: import javax.xml.transform.stream.StreamSource;
04: import javax.xml.transform.dom.DOMResult;
05: import javax.xml.transform.TransformerFactory;
06: import javax.xml.transform.Transformer;
07:
08: import xalanDoc.spec.*;
09:
10: public class ManagerImpl implements Manager {
11:
12: public void transform(String dir, DOMResult element)
13: throws Exception {
14:
15: TransformerFactory tFactory = TransformerFactory.newInstance();
16: Transformer transformer = tFactory
17: .newTransformer(new StreamSource(dir
18: + "/contact-table.xsl"));
19: transformer.transform(new StreamSource(dir + "/contacts.xml"),
20: element);
21:
22: }
23:
24: }
|