public void error( String message ) { try { this.out.write( message + "\n" ); } catch ( SAXException e ) { // ignore } } }
public void warn( String message ) { try { this.out.write( message + "\n" ); } catch ( SAXException e ) { // ignore } }
public void info( String message ) { try { this.out.write( message + "\n" ); } catch ( SAXException e ) { // ignore } }
/** * Generates HTML fragment from string. * * <p> * The string representation of the object is assumed to produce proper HTML. * No further escaping is performed. * * @see #text(Object) */ public void raw(Object o) throws SAXException { if (o!=null) output.write(o.toString()); }
/** * Generates an {@code <IMG>} tag to the resource. */ public void img(Object base, String localName) throws SAXException { output.write( "<IMG src='"+res(base,localName)+"'>"); }
/** Evaluates the body of a tag */ public void run(JellyContext context, XMLOutput output) throws JellyTagException { if ( text != null ) { try { output.write(text); } catch (SAXException e) { throw new JellyTagException("could not write to XMLOutput",e); } } } }
public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { try { output.write("\u00A0"); // nbsp } catch (SAXException e) { throw new JellyTagException(e); } } }
public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { try { output.write("\u00A0"); // nbsp } catch (SAXException e) { throw new JellyTagException(e); } } }
/** Evaluates the body of a tag */ public void run(JellyContext context, XMLOutput output) throws JellyTagException { if ( text != null ) { try { output.write(text); } catch (SAXException e) { throw new JellyTagException("could not write to XMLOutput",e); } } } }
/** Evaluates the body of a tag */ public void run(JellyContext context, XMLOutput output) throws JellyTagException { if ( text != null ) { try { output.write(text); } catch (SAXException e) { throw new JellyTagException("could not write to XMLOutput",e); } } } }
/** Evaluates the body of a tag */ public void run(JellyContext context, XMLOutput output) throws JellyTagException { if ( text != null ) { try { output.write(text); } catch (SAXException e) { throw new JellyTagException("could not write to XMLOutput",e); } } } }
/** * Writes PCDATA. * * <p> * Any HTML unsafe characters in the string representation of the given object is * properly escaped. * * @see #raw(Object) */ public void text(Object o) throws SAXException { if (o!=null) output.write(escape(o.toString())); }
public void doTag(XMLOutput output) throws JellyTagException { if (value != null) { String text = value.evaluateAsString(context); if (text != null) { try { output.write(text); } catch (SAXException e) { throw new JellyTagException("could not write the XMLOutput",e); } } } }
public void doTag(XMLOutput output) throws JellyTagException { if (value != null) { String text = value.evaluateAsString(context); if (text != null) { try { output.write(text); } catch (SAXException e) { throw new JellyTagException("could not write the XMLOutput",e); } } } }
public void doTag(XMLOutput output) throws JellyTagException { if (value != null) { String text = value.evaluateAsString(context); if (text != null) { try { output.write(text); } catch (SAXException e) { throw new JellyTagException("could not write the XMLOutput",e); } } } }
public void doTag(XMLOutput output) throws JellyTagException { if (value != null) { String text = value.evaluateAsString(context); if (text != null) { try { output.write(text); } catch (SAXException e) { throw new JellyTagException("could not write the XMLOutput",e); } } } }
public void doTag(XMLOutput output) throws JellyTagException { try { arguments.clear(); invokeBody(output); output.write(rb.format(LocaleProvider.getLocale(), key,arguments.toArray())); } catch (SAXException e) { throw new JellyTagException("could not write the XMLOutput",e); } finally { arguments.clear(); // don't keep heavy objects in memory for too long } }
public void doTag(XMLOutput output) throws JellyTagException { try { arguments.clear(); invokeBody(output); output.write(rb.format(LocaleProvider.getLocale(), key,arguments.toArray())); } catch (SAXException e) { throw new JellyTagException("could not write the XMLOutput",e); } finally { arguments.clear(); // don't keep heavy objects in memory for too long } }
public void write(StaplerRequest req, XMLOutput out) throws SAXException, IOException { if(inclusionFragment!=null) { out.write(inclusionFragment); return; } if (script!=null) try { WebApp.getCurrent().getFacet(JellyFacet.class).scriptInvoker.invokeScript(req, Stapler.getCurrentResponse(), script, this, out); } catch (JellyTagException e) { throw new IOException2("Failed to execute Jelly script for adjunct "+name,e); } if(hasCss) out.write("<link rel='stylesheet' href='" + getBaseName(req)+".css' type='text/css' />"); if(hasJavaScript) out.write("<script src='" + getBaseName(req) +".js' type='text/javascript'></script>"); }
public void testDom4Xmlns() throws SAXException { StringWriter writer = new StringWriter(); OutputFormat format = new OutputFormat(); final XMLWriter xmlWriter = new HTMLWriter(writer, format); xmlWriter.setEscapeText(false); XMLOutput output = new XMLOutput(xmlWriter, xmlWriter); String golden = "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n"; golden += "<html>"; output.startDocument(); output.write(golden); output.endDocument(); assertEquals("output should contain the namespaces", golden, writer.toString()); }