@Override
    public void startElement(String uri, String localName,
            String qName, Attributes atts)
            throws SAXException {
        if (localName.equals("bibl")) {
            hasBIBL = true;
        }
        if (localName.equals("div")) {
            inDiv = true;
        }
        if (localName.equals("ab")) {
            inAB = true;
            if (!hasBIBL) {
                writeBibl();
            }
        }

        if (localName.equals("w")) {
            inW = true;
        }

        super.startElement(uri, localName, qName, atts);
        inDiv = false;
        inAB = false;
        inW = false;
    }