Thanks for the reply.. It works great. The problem now, is that i have 2 to choose from.. :) Solution One: DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = factory.newDocumentBuilder(); Document newDoc = docBuilder.newDocument(); newDoc.setDocumentURI(FO_NAMESPACE); Element root = newDoc.createElementNS(FO_NAMESPACE, "block");
And Solution Two: defaultHandler.startElement(FO_NAMESPACE, type, FO_PREFIX + "block", EMPTY_ATTRIBUTES_IMPL); defaultHandler.characters(txt.toCharArray(), 0, txt.length()); defaultHandler.endElement(FO_NAMESPACE, type, FO_PREFIX + block); Any thoughs on performance of One vs. Two. One is elements in elements, while the second can inline elements in text, e.g. One <block>text<leader/></block>, but no text can be placed after the leader tag ends within the block. Two <block>text<leader/>text again</block> is possible since i control defaultHandler.characters.. Am i missing something, or is two also possible in one using createElementsNS... -- View this message in context: http://www.nabble.com/xsl-fo-java-extension-function-tp23745283p23788077.html Sent from the FOP - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
