comparison gnv/src/main/java/de/intevation/gnv/util/XSLTransformer.java @ 20:2f4ae7d9e058

Logging reduced gnv/trunk@110 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Tue, 22 Sep 2009 13:09:09 +0000
parents 3cb753564552
children 4405f31bbc30
comparison
equal deleted inserted replaced
19:1557bea6cb55 20:2f4ae7d9e058
44 Source templateSource = new StreamSource(new File(templateFileName)); 44 Source templateSource = new StreamSource(new File(templateFileName));
45 TransformerFactory xformFactory = TransformerFactory.newInstance(); 45 TransformerFactory xformFactory = TransformerFactory.newInstance();
46 Transformer transformer = xformFactory.newTransformer(templateSource); 46 Transformer transformer = xformFactory.newTransformer(templateSource);
47 ByteArrayOutputStream baos = new ByteArrayOutputStream(); 47 ByteArrayOutputStream baos = new ByteArrayOutputStream();
48 StreamResult scrResult = new StreamResult(baos); 48 StreamResult scrResult = new StreamResult(baos);
49 log.debug(xmlUtils.writeNode2String(toTransform)); 49 //log.debug(xmlUtils.writeNode2String(toTransform));
50 DOMSource source = new DOMSource(toTransform); 50 DOMSource source = new DOMSource(toTransform);
51 transformer.transform(source, scrResult); 51 transformer.transform(source, scrResult);
52 resultValue = new String(baos.toByteArray(),encoding); 52 resultValue = new String(baos.toByteArray(),encoding);
53 } catch (TransformerConfigurationException e) { 53 } catch (TransformerConfigurationException e) {
54 log.error(e,e); 54 log.error(e,e);

http://dive4elements.wald.intevation.org