in freemarker-docgen-core/src/main/java/org/freemarker/docgen/core/DocgenRestrictionsValidator.java [430:462]
public void endElement(String uri, String localName, String name)
throws SAXException {
boolean xmlnsOK = uri.equals(XMLNS_DOCBOOK5);
try {
docbook5Validator.endElement(uri, localName, name);
if (xmlnsOK) {
if (localName.equals(E_SECTION)) {
sectionNestingLevel--;
} else if (localName.equals(E_PARA)) {
paraNestingLevel--;
hadClosedPara.set(hadClosedPara.size() - 2, true);
} else if (localName.equals(E_FOOTNOTE)) {
paraNestingLevel
= paraNestingLevelsHiddenByFootnote.remove();
programlistingNestingLevel
= programlistingNestingLevelsHiddenByFootnote
.remove();
programlistingLineLength
= programlistingLineLengthHiddenByFootnote.remove();
} else if (localName.equals(E_PROGRAMLISTING)) {
programlistingNestingLevel--;
} else if (localName.equals(E_ANCHOR)
|| localName.equals(E_INDEXTERM)) {
invisibleElementNestingLevel--;
}
}
} finally {
if (xmlnsOK) {
elemPath.remove(elemPath.size() - 1);
hadClosedPara.remove(hadClosedPara.size() - 1);
}
}
}