List of usage examples for org.apache.commons.jelly XMLOutput endDocument
public void endDocument() throws SAXException
From source file:org.sapia.soto.state.cocoon.view.JellyView.java
protected void execute(Object model, Map viewParams, ContentHandler handler) throws Throwable { if (_jelly == null) { throw new IllegalStateException("Jelly script not set on Jelly view"); }//from ww w . j a v a 2 s . co m if (_lastModified != _res.lastModified()) { reload(); } JellyContext jelly = new JellyContext(); JellyUtils.copyParamsTo(jelly, viewParams); jelly.setCurrentURL(new URL(_res.getURI())); jelly.setVariable(CocoonContext.MODEL_KEY, model); Param p; for (int i = 0; i < _params.size(); i++) { p = (Param) _params.get(i); if (p.getName() != null && p.getValue() != null) { jelly.setVariable(p.getName(), p.getValue()); } } XMLOutput output = new XMLOutput(handler); output.startDocument(); _jelly.run(jelly, output); output.endDocument(); }