@Override protected void writeStart(SAXElement element) throws IOException { SAXElement reconstructedElement = reconstructElement(element); super.writeStart(reconstructedElement); element.setCache(this, reconstructedElement.getCache(this)); }
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 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... } }
@Override protected void writeEnd(SAXElement element) throws IOException { SAXElement reconstructedElement = reconstructElement(element); reconstructedElement.setCache(this, element.getCache(this)); super.writeEnd(reconstructedElement); }
public void writeStartElement(SAXElement element) throws IOException { // We set a flag in the cache so as to mark the fact that the start element has been writen if(element.isWriterOwner(writerOwner)) { if(!isStartWritten(element)) { element.setCache(this, true); writeStart(element); } } }
public void writeStartElement(SAXElement element) throws IOException { // We set a flag in the cache so as to mark the fact that the start element has been writen if(element.isWriterOwner(writerOwner)) { if(!isStartWritten(element)) { element.setCache(this, true); writeStart(element); } } }
public void writeStartElement(SAXElement element) throws IOException { // We set a flag in the cache so as to mark the fact that the start element has been writen if(element.isWriterOwner(writerOwner)) { if(!isStartWritten(element)) { element.setCache(this, true); writeStart(element); } } }
@Override protected void writeStart(SAXElement element) throws IOException { SAXElement reconstructedElement = reconstructElement(element); super.writeStart(reconstructedElement); element.setCache(this, reconstructedElement.getCache(this)); }
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 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... } }
@Override protected void writeStart(SAXElement element) throws IOException { SAXElement reconstructedElement = reconstructElement(element); super.writeStart(reconstructedElement); element.setCache(this, reconstructedElement.getCache(this)); }
@Override protected void writeStart(SAXElement element) throws IOException { SAXElement reconstructedElement = reconstructElement(element); super.writeStart(reconstructedElement); element.setCache(this, reconstructedElement.getCache(this)); }
@Override protected void writeEnd(SAXElement element) throws IOException { SAXElement reconstructedElement = reconstructElement(element); reconstructedElement.setCache(this, element.getCache(this)); super.writeEnd(reconstructedElement); }
public void writeStartElement(SAXElement element) throws IOException { // We set a flag in the cache so as to mark the fact that the start element has been writen if(element.isWriterOwner(writerOwner)) { if(!isStartWritten(element)) { element.setCache(this, true); writeStart(element); } } }
private ElementIndex getElementIndex(SAXElement element) { SAXElement parent = element.getParent(); ElementIndex index; if(parent != null) { index = (ElementIndex) parent.getCache(this); if(index == null) { index = new ElementIndex(); parent.setCache(this, index); } return index; } return null; }
@Override protected void writeEnd(SAXElement element) throws IOException { SAXElement reconstructedElement = reconstructElement(element); reconstructedElement.setCache(this, element.getCache(this)); super.writeEnd(reconstructedElement); }
@Override protected void writeEnd(SAXElement element) throws IOException { SAXElement reconstructedElement = reconstructElement(element); reconstructedElement.setCache(this, element.getCache(this)); super.writeEnd(reconstructedElement); }
private ElementIndex getElementIndex(SAXElement element) { SAXElement parent = element.getParent(); ElementIndex index; if(parent != null) { index = (ElementIndex) parent.getCache(this); if(index == null) { index = new ElementIndex(); parent.setCache(this, index); } return index; } return null; }
private ElementIndex getElementIndex(SAXElement element) { SAXElement parent = element.getParent(); ElementIndex index; if(parent != null) { index = (ElementIndex) parent.getCache(this); if(index == null) { index = new ElementIndex(); parent.setCache(this, index); } return index; } return null; }
private ElementIndex getElementIndex(SAXElement element) { SAXElement parent = element.getParent(); ElementIndex index; if(parent != null) { index = (ElementIndex) parent.getCache(this); if(index == null) { index = new ElementIndex(); parent.setCache(this, index); } return index; } return null; }