Mercurial > dive4elements > gnv-client
view gnv/src/test/java/de/intevation/gnv/util/XSLTransformerTestCase.java @ 36:ad381cc47217
Format Code to max 80 Chars per Row
gnv/trunk@172 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Fri, 02 Oct 2009 08:54:13 +0000 |
parents | 4405f31bbc30 |
children | 15ac78a91d1b |
line wrap: on
line source
/** * */ package de.intevation.gnv.util; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import junit.framework.TestCase; import org.apache.log4j.BasicConfigurator; import org.apache.log4j.Logger; import org.w3c.dom.Document; import de.intevation.gnv.artifactdatabase.client.DefaultArtifactDatabaseClient; /** * @author Tim Englich <tim.englich@intevation.de> * */ public class XSLTransformerTestCase extends TestCase { /** * the logger, used to log exceptions and additonaly information */ private static Logger log = null; static { BasicConfigurator.configure(); log = Logger.getLogger(DefaultArtifactDatabaseClient.class); } public XSLTransformerTestCase() { super(); } public XSLTransformerTestCase(String name) { super(name); } public void testDescribeUI() { try { // System.setProperty("javax.xml.transform.TransformerFactory","com.icl.saxon.TransformerFactoryImpl"); Document document = new XMLUtils() .readDocument(new FileInputStream(new File( "src/test/ressources/describe-ui-test.xml"))); XSLTransformer transformer = new XSLTransformer(); String value = transformer.transform(document, "UTF-8", "src/main/webapp/WEB-INF/config/templates/describe-ui.xsl"); log.debug(value); } catch (FileNotFoundException e) { log.error(e, e); } } }