Code example for StreamSource

Methods: setSystemId

0
		File xsl = new File("src/sample/ui/js-generator.xsl");
		File xml = new File("src/sample/ui/OrganizationRegistratonConfiguration.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);
			docSrc.setSystemId(xml);