public void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException { // Do nothing here apart from acquiring ownership of the element writer. // See is there any child text/elements first... element.getWriter(writerOwner); }
public void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException { // Do nothing here apart from acquiring ownership of the element writer. // See is there any child text/elements first... element.getWriter(writerOwner); }
public void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException { // Do nothing here apart from acquiring ownership of the element writer. // See is there any child text/elements first... element.getWriter(writerOwner); }
public void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException { // Do nothing here apart from acquiring ownership of the element writer. // See is there any child text/elements first... element.getWriter(writerOwner); }
/** * Write the element as an empty (closed) element to any {@link StreamResult} instance that may have been supplied to the * {@link Smooks#filterSource(javax.xml.transform.Source, javax.xml.transform.Result) Smooks.filterSource()} * method. * @param element The element. * @throws IOException Exception writing. */ public void writeEmptyElement(SAXElement element) throws IOException { SAXElementWriterUtil.writeEmptyElement(element, element.getWriter(owner), encodeSpecialChars); } }
/** * Write the text content to any {@link StreamResult} instance that may have been supplied to the * {@link Smooks#filterSource(javax.xml.transform.Source, javax.xml.transform.Result) Smooks.filterSource()} * method. * * @param text The text. * @param associatedElement The associated element (fragment) of the text. * @throws IOException Exception writing. */ public void writeText(String text, SAXElement associatedElement) throws IOException { SAXElementWriterUtil.writeText(text, TextType.TEXT, associatedElement.getWriter(owner)); }
/** * Write the text content to any {@link StreamResult} instance that may have been supplied to the * {@link Smooks#filterSource(javax.xml.transform.Source, javax.xml.transform.Result) Smooks.filterSource()} * method. * * @param text The text. * @param associatedElement The associated element (fragment) of the text. * @throws IOException Exception writing. */ public void writeText(String text, SAXElement associatedElement) throws IOException { SAXElementWriterUtil.writeText(text, TextType.TEXT, associatedElement.getWriter(owner)); }
/** * Write the element end to any {@link StreamResult} instance that may have been supplied to the * {@link Smooks#filterSource(javax.xml.transform.Source, javax.xml.transform.Result) Smooks.filterSource()} * method. * @param element The element. * @throws IOException Exception writing. */ public void writeEndElement(SAXElement element) throws IOException { SAXElementWriterUtil.writeEndElement(element, element.getWriter(owner)); }
/** * Write the element as an empty (closed) element to any {@link StreamResult} instance that may have been supplied to the * {@link Smooks#filterSource(javax.xml.transform.Source, javax.xml.transform.Result) Smooks.filterSource()} * method. * @param element The element. * @throws IOException Exception writing. */ public void writeEmptyElement(SAXElement element) throws IOException { SAXElementWriterUtil.writeEmptyElement(element, element.getWriter(owner), encodeSpecialChars); } }
/** * Write the element start to any {@link StreamResult} instance that may have been supplied to the * {@link Smooks#filterSource(javax.xml.transform.Source, javax.xml.transform.Result) Smooks.filterSource()} * method. * @param element The element. * @throws IOException Exception writing. */ public void writeStartElement(SAXElement element) throws IOException { SAXElementWriterUtil.writeStartElement(element, element.getWriter(owner), encodeSpecialChars); }
/** * Write the text content to any {@link StreamResult} instance that may have been supplied to the * {@link Smooks#filterSource(javax.xml.transform.Source, javax.xml.transform.Result) Smooks.filterSource()} * method. * * @param text The text. * @param associatedElement The associated element (fragment) of the text. * @throws IOException Exception writing. */ public void writeText(String text, SAXElement associatedElement) throws IOException { SAXElementWriterUtil.writeText(text, TextType.TEXT, associatedElement.getWriter(owner)); }
/** * Write the text event content to any {@link StreamResult} instance that may have been supplied to the * {@link Smooks#filterSource(javax.xml.transform.Source, javax.xml.transform.Result) Smooks.filterSource()} * method. * * @param text The SAXText event. * @param associatedElement The associated element (fragment) of the SAXText event. * @throws IOException Exception writing. */ public void writeText(SAXText text, SAXElement associatedElement) throws IOException { SAXElementWriterUtil.writeText(text, associatedElement.getWriter(owner)); }
protected void writeEnd(SAXElement element) throws IOException { if(!isStartWritten(element)) { // It's an empty element... SAXElementWriterUtil.writeEmptyElement(element, element.getWriter(writerOwner), rewriteEntities); } else { SAXElementWriterUtil.writeEndElement(element, element.getWriter(writerOwner)); } }
protected void writeEnd(SAXElement element) throws IOException { if(!isStartWritten(element)) { // It's an empty element... SAXElementWriterUtil.writeEmptyElement(element, element.getWriter(writerOwner), rewriteEntities); } else { SAXElementWriterUtil.writeEndElement(element, element.getWriter(writerOwner)); } }
public void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException { // Claim ownership of the writer for this fragment element... Writer writer = element.getWriter(this); if(!keepChildren) { // Swap in a NullWriter instance for the whole fragment... element.setWriter(new NullWriter(), this); // Stash the real writer instance on the element so we can reset it at the end... element.setCache(this, writer); } else { // Just don't write this element, but write the child elements... } }
public void onChildText(SAXElement element, SAXText text, ExecutionContext executionContext) throws SmooksException, IOException { writeStartElement(element); if(element.isWriterOwner(writerOwner)) { text.toWriter(element.getWriter(writerOwner), rewriteEntities); } }
public void onChildText(SAXElement element, SAXText text, ExecutionContext executionContext) throws SmooksException, IOException { writeStartElement(element); if(element.isWriterOwner(writerOwner)) { text.toWriter(element.getWriter(writerOwner), rewriteEntities); } }
public void onChildText(SAXElement element, SAXText text, ExecutionContext executionContext) throws SmooksException, IOException { writeStartElement(element); if(element.isWriterOwner(writerOwner)) { text.toWriter(element.getWriter(writerOwner), rewriteEntities); } }
public void visitBefore(SAXElement element, ExecutionContext executionContext) throws SmooksException, IOException { // Claim ownership of the writer for this fragment element... Writer writer = element.getWriter(this); if(!keepChildren) { // Swap in a NullWriter instance for the whole fragment... element.setWriter(new NullWriter(), this); // Stash the real writer instance on the element so we can reset it at the end... element.setCache(this, writer); } else { // Just don't write this element, but write the child elements... } }