Convert max-headings to XML-driven option