Code example for StreamSource

Methods: setSystemId

0
 
 
 
		TransformerFactory tFactory = TransformerFactory.newInstance();
 
		StreamSource source = new StreamSource(xsl);
		source.setSystemId(xsl);
		 
		Transformer tr = null;
		try { 
			tr = tFactory.newTransformer(source);
 
			/*File list = new File(((String)tr.getParameter("baseDirFullPath")).concat(((String)tr.getParameter("baseDirFullPath"))))*/ 
			/*tr.setParameter("helper",  new XSLHelper());*/ 
		} catch (TransformerConfigurationException e1) {
			logger.error("Transformation error:"+e1.getMessage());
		} 
		try { 
			StreamResult result = new StreamResult(out);
			StreamSource docSrc = new StreamSource(xml);
			docSrc.setSystemId(xml);