public function createDocumentation($template = '')
    {
        if ($template == '') {
            $template = $this->docTemplate;
        }
        if ($template == '') {
            throw new WSException('No template file to generate documentation');
        }
        if (!is_file($template)) {
            throw new WSException("Could not find the template file: '$template'");
        }
        $this->class = new IPReflectionClass($this->name);
        $xtpl = new IPXSLTemplate($template);
        $documentation = array();
        $documentation['menu'] = array();
        //loop menu items
        sort($this->classNameArr);//ff sorteren
        foreach ($this->classNameArr as $className) {
            $documentation['menu'][] = new IPReflectionClass($className);
        }

        if ($this->class) {
            $this->class->properties = $this->class->getProperties(false, false);
            $this->class->methods = $this->class->getMethods(false, false);
            foreach ((array) $this->class->methods as $method) {
                $method->params = $method->getParameters();
            }

            $documentation['class'] = $this->class;
        }
        echo $xtpl->execute($documentation);
    }