function doSection ($attrstr) { $attrstr = html_entity_decode($attrstr); $attr = new Attributes($attrstr); $preface = $attr->getAttrib('preface'); if ($preface !== false) { /* flush_section(0); if ($preface == 'start') $ret = "<abstract>"; elseif ($preface == 'end') $ret = "</abstract>"; */ } else { global $current_section; $level = $attr->getAttrib('level'); $ret = flush_section($level) . "<section"; $current_section = $level; $label = trim($attr->getAttrib('label')); if ($label != '') { $ret .= ' id="'.substitute_umlauts($label).'"'; $ret .= ' wikipage="'.substitute_umlauts($label).'"'; } $title = $attr->getAttrib('title'); $ret.= "><title>".xmlencode($attr->getAttrib('title'))."</title>"; } return $ret; }