node = $node; $this->xml = $xml ; } public static function dtd() { return <<xml->parseNode($this->node, True, True, True, array("toc", "id", "href")); $attributes = $parse["attributes_string"]; $anchor = $parse["attributes_array"]["id"]; $content = $parse["content_string"]; $data = $this->xml->getDataItem("headlines"); if (!is_array($data)) { $data = array ( "level" => 1, "anchor" => 0, "anchor-title" => array() ); } $nr = $data["level"]; if ($anchor == "" || isset($data[1][$anchor])) { $anchor = "headline_".++$data["anchor"]; } if ($parse["attributes_array"]["toc"] != "no") { $data["anchor-title"][] = array ( "level" => $nr , "content" => $content, "anchor" => $anchor ); } $content = $this->xml->href($content, "", $parse["attributes_array"], True); $this->xml->setDataItem("headlines", $data); if (method_exists($this, $returntype)) { return call_user_func(array($this, $returntype), $nr, $anchor, $attributes, $content); } return False; } private function xhtml($nr, $anchor, $attributes, $content) { if ($anchor) { $anchor = " id=\"".$anchor."\""; } return "".$content.""; } } ?>