TableOfContentsEntry entry;
if(! ArrayUtils.contains(elementsUsingFirstWords, node.getNodeName()))
entry = new TableOfContentsEntry(node.getNodeName() + (node.getAttribute("type").equals("") ? "" : " (" + node.getAttribute("type") + ")"), Utils.getUniqueXMLID());
else {
String textContent = node.getTextContent();
textContent = new WhiteSpaceRemovalPreprocessing().preprocessInput(textContent);
String[] words = textContent.split(" ");
if(words.length < numberOfFirstWords){
textContent = (textContent.equals("") ? "[Empty Section]" : textContent);
entry = new TableOfContentsEntry(textContent, Utils.getUniqueXMLID());