Extension:StyleByHeaderTree

Introduction
StyleBySection does two things to the rendered xhtml pages:


 * it wraps each section according to the nesting hierarchy of their respective headers;
 * it may give a class and/or an id to each wrapping div, depending on the header's content and the set of rules defined for the plugin.

The rules (and thus the class and id given to specific sections) will be applied to:
 * headers which content is an exact match of the 'title=' of the rule, if defined;
 * headers which content is a match of the regular expression 'title-match' of the rule, if defined.

This is useful for anything classes and ids usually are: styling and javascripts. We have used this primarly has a mean to bring stronger semantics to wiki pages, which result was then used to produce XML content with further extensions.

The 'attr' of each rule is an array containing each attribute to be given to the concerned sections. Two placeholders are reckognized in their definitions:
 * ##LEVEL##, which will be replaced by the header level (h3 -> "3") ;
 * ##COUNTER##, which will be replaced by an autoincrementing integer.