public void setUp() throws Exception { super.setUp(); jelly = new Jelly(); context = new JellyContext(); xmlOutput = XMLOutput.createDummyXMLOutput(); }
public void setUp() throws Exception { super.setUp(); jelly = new Jelly(); context = new JellyContext(); xmlOutput = XMLOutput.createDummyXMLOutput(); }
public void setUp() throws Exception { super.setUp(); jelly = new Jelly(); context = new JellyContext(); xmlOutput = XMLOutput.createDummyXMLOutput(); }
public void setUp() throws Exception { super.setUp(); jelly = new Jelly(); context = new JellyContext(); xmlOutput = XMLOutput.createDummyXMLOutput(); }
public void setUp(String scriptName) throws Exception { this.context = new JellyContext(); this.xmlOutput = XMLOutput.createDummyXMLOutput(); this.jelly = new Jelly(); String script = scriptName; URL url = this.getClass().getResource(script); if ( url == null ) { throw new Exception( "Could not find Jelly script: " + script + " in package of class: " + this.getClass().getName() ); } this.jelly.setUrl(url); }
public void setUp(String scriptName) throws Exception { context = new JellyContext(); xmlOutput = XMLOutput.createXMLOutput(new StringWriter()); jelly = new Jelly(); String script = scriptName; URL url = this.getClass().getResource(script); if ( url == null ) { throw new Exception( "Could not find Jelly script: " + script + " in package of class: " + this.getClass().getName() ); } jelly.setUrl(url); }
public void setUp(String scriptName) throws Exception { context = new JellyContext(); xmlOutput = XMLOutput.createXMLOutput(new StringWriter()); jelly = new Jelly(); String script = scriptName; URL url = this.getClass().getResource(script); if ( url == null ) { throw new Exception( "Could not find Jelly script: " + script + " in package of class: " + this.getClass().getName() ); } jelly.setUrl(url); }
public void setUp() throws Exception { context = new JellyContext(); xmlOutput = XMLOutput.createXMLOutput(new StringWriter()); jelly = new Jelly(); String script = "nsFilterTest.jelly"; URL url = this.getClass().getResource(script); if ( url == null ) { throw new Exception( "Could not find Jelly script: " + script + " in package of class: " + this.getClass().getName() ); } jelly.setUrl(url); }
public void setUp(String scriptName) throws Exception { context = new JellyContext(); xmlOutput = XMLOutput.createDummyXMLOutput(); jelly = new Jelly(); String script = scriptName; URL url = this.getClass().getResource(script); if ( url == null ) { throw new Exception( "Could not find Jelly script: " + script + " in package of class: " + this.getClass().getName() ); } jelly.setUrl(url); }
XMLOutput.createXMLOutput(System.out); Jelly jelly = new Jelly(); jelly.setScript(scriptFile);
XMLOutput.createXMLOutput(System.out); Jelly jelly = new Jelly(); jelly.setScript(scriptFile);
XMLOutput.createXMLOutput(System.out); Jelly jelly = new Jelly(); jelly.setScript(scriptFile);
XMLOutput.createXMLOutput(System.out); Jelly jelly = new Jelly(); jelly.setScript(scriptFile);
public void setUpFromURL(URL url) throws Exception { context = new CoreTaglibOnlyContext(); xmlOutput = XMLOutput.createDummyXMLOutput(); jelly = new Jelly(); jelly.setUrl(url); String exturl = url.toExternalForm(); int lastSlash = exturl.lastIndexOf("/"); String extBase = exturl.substring(0,lastSlash+1); URL baseurl = new URL(extBase); context.setCurrentURL(baseurl); }
/** * CDATA sections should be retained in the output. * * @throws Exception */ public void testCData() throws Exception { Jelly jelly = new Jelly(); jelly.setScript("file:src/test/org/apache/commons/jelly/test/xml/testCData.jelly"); Script script = jelly.compileScript(); JellyContext context = new JellyContext(); script.run(context, XMLOutput.createDummyXMLOutput()); String output = (String) context.getVariable("foo"); assertTrue("'foo' is not null", output != null); String golden = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; golden += "<!DOCTYPE foo [\n"; golden += " <!ELEMENT foo (#PCDATA)>\n"; golden += "]><foo></foo>"; assertEquals("output should contain the CDATA section", golden, output); }