}
protected Element addFootnote(TextNoteElement e, Element dstElem) throws Exception {
TextNoteCitationElement noteCit = (TextNoteCitationElement) getXpath().evaluate(".//text:note-citation", e,
XPathConstants.NODE);
// Element fn=addFootnoteLink(noteCit.getTextContent(),dstElem);
Element fn = getFootnotesResource().getDocument().createElement("div");
fn.setClassName("fnDiv");
getFootnotesResource().getDocument().getBody().add(fn);
HyperlinkElement a = getCurrentResource().getDocument().createHyperlinkElement("a");
a.setClassName("fnLink");
a.setXRef(fn.getSelfRef());
a.add(noteCit.getTextContent());
dstElem.add(a);
Element noteId = getFootnotesResource().getDocument().createHyperlinkElement("p");
noteId.setClassName("Footnote");
noteId.add(noteCit.getTextContent() + ")");
fn.add(noteId);
HyperlinkElement ar = getFootnotesResource().getDocument().createHyperlinkElement("a");
// ar.setClassName("fnLink");
ar.setXRef(a.getSelfRef());