Code example for StreamSource

Methods: setSystemId

0
		File xsl = new File("src/main/resources/transform/messagedef/MessageDisplay.xsl");
		File xml = new File("src/main/resources/messageconfig/POLB_IN224200.xml");
 
		TransformerFactory tFactory = TransformerFactory.newInstance();
 
		StreamSource source = new StreamSource(xsl);
		source.setSystemId(xsl);
		 
		Transformer tr = null;
		try { 
			tr = tFactory.newTransformer(source);			
			tr.setParameter("helper", new XSLHelper());
			tr.setParameter("idElementName", "e_id");
			tr.setParameter("idValuePrefix", "id");
			tr.setParameter("labelElementName", "label");
		} catch (TransformerConfigurationException e1) {
			logger.error("Transformation error:"+e1.getMessage());
		} 
		try { 
			StreamResult result = new StreamResult(out);
			StreamSource docSrc = new StreamSource(xml);