1 package xalanDoc.business; 2 3 import javax.xml.transform.stream.StreamSource ; 4 import javax.xml.transform.dom.DOMResult ; 5 import javax.xml.transform.TransformerFactory ; 6 import javax.xml.transform.Transformer ; 7 8 import xalanDoc.spec.*; 9 10 11 public class ManagerImpl implements Manager{ 12 13 14 public void transform(String dir,DOMResult element)throws Exception { 15 16 17 TransformerFactory tFactory = TransformerFactory.newInstance(); 18 Transformer transformer = tFactory.newTransformer(new StreamSource (dir+"/contact-table.xsl")); 19 transformer.transform(new StreamSource (dir+"/contacts.xml"),element); 20 21 } 22 23 24 } | Popular Tags |