@Override
 public void doEndElement(String uri, String localName, String name) throws SAXException {
   if (DocxUtils.isAbstractNum(uri, localName, name)) {
     this.currentAbstractNumId = null;
   } else if (DocxUtils.isNumbering(uri, localName, name)) {
     generateDynamicAbstractNumIfNeeded();
     IBufferedRegion region = getCurrentElement();
     region.append(generateScriptsForDynamicNumbers());
   }
   super.doEndElement(uri, localName, name);
 }
 private void generateDynamicAbstractNumIfNeeded() {
   if (hasDynamicAbstractNum) {
     return;
   }
   IBufferedRegion region = getCurrentElement();
   DefaultStyle defaultStyle = DocxContextHelper.getDefaultStyle(sharedContext);
   if (defaultStyle.getAbstractNumIdForUnordererList() == null) {
     region.append(
         formatter.getFunctionDirective(
             DocxContextHelper.STYLES_GENERATOR_KEY,
             IDocxStylesGenerator.generateAbstractNumBullet,
             DocxContextHelper.DEFAULT_STYLE_KEY));
   }
   region.append(generateScriptsForDynamicOrderedNumbers());
   hasDynamicAbstractNum = true;
 }