public function format(Document $document)
    {        
        $this->preFormat($document);
        foreach($this->getChildren() as $child)
        {
            $child->format($document);
        }
        $this->postFormat($document);
    }