public static void applyTo(XMLOutput xo) { xo.setContentHandler(new TableNestChecker(xo.getContentHandler())); }
/** * Sets the SAX ContentHandler to feed SAX events into * * @param contentHandler is the ContentHandler to use. * This value cannot be null. */ public void setContentHandler(ContentHandler contentHandler) { this.xmlOutput.setContentHandler(contentHandler); // often classes will implement LexicalHandler as well if (contentHandler instanceof LexicalHandler) { this.xmlOutput.setLexicalHandler((LexicalHandler) contentHandler); } }
/** * Factory method to create a new XMLOutput from an XMLWriter */ protected static XMLOutput createXMLOutput(final XMLWriter xmlWriter) { XMLOutput answer = new XMLOutput() { public void close() throws IOException { xmlWriter.close(); } }; answer.setContentHandler(xmlWriter); answer.setLexicalHandler(xmlWriter); return answer; }
/** * Factory method to create a new XMLOutput from an XMLWriter */ protected static XMLOutput createXMLOutput(final XMLWriter xmlWriter) { XMLOutput answer = new XMLOutput() { public void close() throws IOException { xmlWriter.close(); } }; answer.setContentHandler(xmlWriter); answer.setLexicalHandler(xmlWriter); return answer; }
/** * Factory method to create a new XMLOutput from an XMLWriter */ protected static XMLOutput createXMLOutput(final XMLWriter xmlWriter) { XMLOutput answer = new XMLOutput() { public void close() throws IOException { xmlWriter.close(); } }; answer.setContentHandler(xmlWriter); answer.setLexicalHandler(xmlWriter); return answer; }
/** * Factory method to create a new XMLOutput from an XMLWriter */ protected static XMLOutput createXMLOutput(final XMLWriter xmlWriter) { XMLOutput answer = new XMLOutput() { public void close() throws IOException { xmlWriter.close(); } }; answer.setContentHandler(xmlWriter); answer.setLexicalHandler(xmlWriter); return answer; }
public static void applyTo(XMLOutput xo) { xo.setContentHandler(new TableNestChecker(xo.getContentHandler())); }
public static void applyTo(XMLOutput xo) { xo.setContentHandler(new TableNestChecker(xo.getContentHandler())); }
public static void applyTo(XMLOutput xo) { xo.setContentHandler(new TableNestChecker(xo.getContentHandler())); }
public static void applyTo(XMLOutput xo) { xo.setContentHandler(new TableNestChecker(xo.getContentHandler())); }
public static void applyTo(XMLOutput xo) { xo.setContentHandler(new TableNestChecker(xo.getContentHandler())); }
answer.setContentHandler(xmlWriter); answer.setLexicalHandler(xmlWriter); return answer;
answer.setContentHandler(xmlWriter); answer.setLexicalHandler(xmlWriter); return answer;
answer.setContentHandler(xmlWriter); answer.setLexicalHandler(xmlWriter); return answer;
answer.setContentHandler(xmlWriter); answer.setLexicalHandler(xmlWriter); return answer;
/** * Writes the body fo this tag to the given Writer */ protected void writeBody(Writer writer) throws SAXException, JellyTagException { XMLOutput newOutput = createXMLOutput(writer); try { // we need to avoid multiple start/end document events newOutput.setContentHandler( new SafeContentHandler(newOutput.getContentHandler()) ); newOutput.startDocument(); invokeBody(newOutput); newOutput.endDocument(); } finally { try { newOutput.close(); } catch (IOException e) {} } }
/** * Writes the body fo this tag to the given Writer */ protected void writeBody(Writer writer) throws SAXException, JellyTagException { XMLOutput newOutput = createXMLOutput(writer); try { // we need to avoid multiple start/end document events newOutput.setContentHandler( new SafeContentHandler(newOutput.getContentHandler()) ); newOutput.startDocument(); invokeBody(newOutput); newOutput.endDocument(); } finally { try { newOutput.close(); } catch (IOException e) {} } }
/** * Writes the body fo this tag to the given Writer */ protected void writeBody(Writer writer) throws SAXException, JellyTagException { XMLOutput newOutput = createXMLOutput(writer); try { // we need to avoid multiple start/end document events newOutput.setContentHandler( new SafeContentHandler(newOutput.getContentHandler()) ); newOutput.startDocument(); invokeBody(newOutput); newOutput.endDocument(); } finally { try { newOutput.close(); } catch (IOException e) {} } }
/** * Writes the body fo this tag to the given Writer */ protected void writeBody(Writer writer) throws SAXException, JellyTagException { XMLOutput newOutput = createXMLOutput(writer); try { // we need to avoid multiple start/end document events newOutput.setContentHandler( new SafeContentHandler(newOutput.getContentHandler()) ); newOutput.startDocument(); invokeBody(newOutput); newOutput.endDocument(); } finally { try { newOutput.close(); } catch (IOException e) {} } }