private void handleHeaderFooter(Range[] ranges, String type, HWPFDocument document,
                                    PicturesSource pictures, PicturesTable pictureTable,
                                    XHTMLContentHandler xhtml)
            throws SAXException, IOException, TikaException {
        if (countParagraphs(ranges) > 0) {
            xhtml.startElement("div", "class", type);
            ListManager listManager = new ListManager(document);
            for (Range r : ranges) {
                if (r != null) {
                    try {
                        for (int i = 0; i < r.numParagraphs(); i++) {
                            Paragraph p = r.getParagraph(i);

                            i += handleParagraph(p, 0, r, document, FieldsDocumentPart.HEADER, pictures,
                                pictureTable, listManager, xhtml);
                        }
                    } catch (ArrayIndexOutOfBoundsException e) {
                        LOG.warn("TIKA-3841 -- content may be missing from this header/footer");
                    }

                }
            }
            xhtml.endElement("div");
        }
    }
Given a style name, return what tag should be used, and
what style should be applied to it.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/WordExtractor.java