List of usage examples for org.jdom2 Attribute Attribute
@Deprecated public Attribute(final String name, final String value, final int type)
Attribute
with the specified (local) name, value and type, and does not place the attribute in a Namespace
. From source file:pt.ist.socialsoftware.edition.visitors.TEIGenerator.java
License:Creative Commons License
private void generateTranscription(Element parentElement, Fragment fragment, Set<FragInter> fragInterSelectedSet) { Element textElement = new Element("text", xmlns); parentElement.addContent(textElement); Element bodyElement = new Element("body", xmlns); textElement.addContent(bodyElement); Element divElement = new Element("div", xmlns); bodyElement.addContent(divElement);/* w ww . ja v a 2 s . c o m*/ Attribute iddiv = new Attribute("id", fragment.getXmlId() + ".TEXT", Namespace.XML_NAMESPACE); divElement.setAttribute(iddiv); writer = new TEITextPortionWriter(divElement, fragInterSelectedSet); // writer.visit((AppText) fragment.getTextPortion()); AppText app = (AppText) fragment.getTextPortion(); RdgText rdg = (RdgText) app.getFirstChildText(); if (rdg.getFirstChildText() instanceof ParagraphText) writer.visit((ParagraphText) rdg.getFirstChildText()); else if (rdg.getFirstChildText() instanceof PbText) writer.visit((PbText) rdg.getFirstChildText()); }