Terminology term = getTerminology();
if(term instanceof CompositTerminology){
for(Terminology t : ((CompositTerminology)term).getTerminologies())
root.appendChild(t.toElement(doc));
}else{
root.appendChild(term.toElement(doc));
}
// append template element
return root;
}