/** Copy end document events. */ public void endDocument() throws TransformerException { rtfEmitter.endDocument(); }
/** Copy processing instructions. */ public void processingInstruction(java.lang.String name, java.lang.String data) throws TransformerException { rtfEmitter.processingInstruction(name, data); }
/** Copy set unparsed entity events. */ public void setUnparsedEntity(java.lang.String name, java.lang.String uri) throws TransformerException { rtfEmitter.setUnparsedEntity(name, uri); }
/** Copy set writer events. */ public void setWriter(java.io.Writer writer) { rtfEmitter.setWriter(writer); }
/** Copy end element events. */ public void endElement(int nameCode) throws TransformerException { rtfEmitter.endElement(nameCode); }
/** Copy start element events. */ public void startElement(int nameCode, org.xml.sax.Attributes attributes, int[] namespaces, int nscount) throws TransformerException { rtfEmitter.startElement(nameCode, attributes, namespaces, nscount); } }
/** Copy characters. */ public void characters(char[] chars, int start, int len) throws TransformerException { rtfEmitter.characters(chars, start, len); }
/** Copy start document events. */ public void startDocument() throws TransformerException { rtfEmitter.startDocument(); }
/** Copy comments. */ public void comment(char[] chars, int start, int length) throws TransformerException { rtfEmitter.comment(chars, start, length); }
/** Copy set escaping events. */ public void setEscaping(boolean escaping) throws TransformerException { rtfEmitter.setEscaping(escaping); }
/** Copy set name pool events. */ public void setNamePool(NamePool namePool) { rtfEmitter.setNamePool(namePool); }
/** Copy set document locator events. */ public void setDocumentLocator(org.xml.sax.Locator locator) { rtfEmitter.setDocumentLocator(locator); }
/** Process end element events. */ public void endElement(int nameCode) throws TransformerException { if (!elementStack.empty()) { // if we didn't push the very first element (an fo:block or // pre or div surrounding the whole block), then the stack will // be empty when we get to the end of the first element... elementStack.pop(); } rtfEmitter.endElement(nameCode); }
/** Process start element events. */ public void startElement(int nameCode, org.xml.sax.Attributes attributes, int[] namespaces, int nscount) throws TransformerException { if (!skipThisElement(nameCode)) { StartElementInfo sei = new StartElementInfo(nameCode, attributes, namespaces, nscount); elementStack.push(sei); } firstElement = false; rtfEmitter.startElement(nameCode, attributes, namespaces, nscount); }
/** * <p>Add blanks to the result tree fragment.</p> * * <p>This method adds <tt>numBlanks</tt> to the result tree fragment. * It's used to pad lines when callouts occur after the last existing * characater in a line.</p> * * @param numBlanks The number of blanks to add. */ protected void formatPad(int numBlanks) { char chars[] = new char[numBlanks]; for (int count = 0; count < numBlanks; count++) { chars[count] = ' '; } try { rtfEmitter.characters(chars, 0, numBlanks); } catch (TransformerException e) { System.out.println("Transformer Exception in formatPad"); } }
/** Process end element events. */ public void endElement(int nameCode) throws TransformerException { if (!elementStack.empty()) { // if we didn't push the very first element (an fo:block or // pre or div surrounding the whole block), then the stack will // be empty when we get to the end of the first element... elementStack.pop(); } rtfEmitter.endElement(nameCode); }
/** Process start element events. */ public void startElement(int nameCode, org.xml.sax.Attributes attributes, int[] namespaces, int nscount) throws TransformerException { if (!skipThisElement(nameCode)) { StartElementInfo sei = new StartElementInfo(nameCode, attributes, namespaces, nscount); elementStack.push(sei); } firstElement = false; rtfEmitter.startElement(nameCode, attributes, namespaces, nscount); }
public void endSpan(Emitter rtf) throws TransformerException { if (!foStylesheet && namePool != null) { if (xhStylesheet) { uri = xhURI; } int spanName = namePool.allocate("", uri, "span"); rtf.endElement(spanName); } }
public void startSpan(Emitter rtf, String id) throws TransformerException { if (!foStylesheet && namePool != null) { if(xhStylesheet) { uri = xhURI; } int spanName = namePool.allocate("", uri, "span"); AttributeCollection spanAttr = new AttributeCollection(namePool); int namespaces[] = new int[1]; spanAttr.addAttribute("", uri, "class", "CDATA", "co"); spanAttr.addAttribute("", uri, "id", "CDATA", id); rtf.startElement(spanName, spanAttr, namespaces, 0); } }
private void closeOpenElements(Emitter rtfEmitter) throws TransformerException { // Close all the open elements... tempStack = new Stack(); while (!elementStack.empty()) { StartElementInfo elem = (StartElementInfo) elementStack.pop(); rtfEmitter.endElement(elem.getNameCode()); tempStack.push(elem); } }