1 52 53 package freemarker.testcase; 54 55 import java.util.HashMap ; 56 import java.util.Map ; 57 58 import org.xml.sax.InputSource ; 59 import freemarker.ext.beans.BeansWrapper; 60 import freemarker.ext.dom.NodeModel; 61 import freemarker.template.SimpleHash; 62 63 67 public class TestXmlns extends AbstractTestCase 68 { 69 public TestXmlns(String name) 70 { 71 super(name); 72 } 73 74 77 public void setUp() 78 throws 79 Exception 80 { 81 setUpFiles( "test-xmlns.html" ); 82 83 Map map = new HashMap (); 84 map.put("doc", NodeModel.parse(new InputSource (getClass().getResourceAsStream("test-xmlns.xml")))); 85 root = new SimpleHash(map, BeansWrapper.getDefaultInstance()); 86 } 87 88 90 public static void main( String [] argc ) throws Exception { 91 AbstractTestCase cTest = new TestXmlns( "test-xmlns.html" ); 92 cTest.run(); 93 } 94 } 95 | Popular Tags |