public function generateXsd($viewHelperNamespace, $xsdNamespace)
    {
        if (substr($viewHelperNamespace, -1) !== '\\') {
            $viewHelperNamespace .= '\\';
        }

        $classNames = $this->getClassNamesInNamespace($viewHelperNamespace);
        if (count($classNames) === 0) {
            throw new Exception(sprintf('No ViewHelpers found in namespace "%s"', $viewHelperNamespace), 1330029328);
        }

        $xmlRootNode = new \SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?>
			<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="' . $xsdNamespace . '"></xsd:schema>');

        foreach ($classNames as $className) {
            $this->generateXmlForClassName($className, $viewHelperNamespace, $xmlRootNode);
        }

        return $xmlRootNode->asXML();
    }
public function generateXsd($viewHelperNamespace, $xsdNamespace)
    {
        if (substr($viewHelperNamespace, -1) !== '\\') {
            $viewHelperNamespace .= '\\';
        }

        $classNames = $this->getClassNamesInNamespace($viewHelperNamespace);
        if (count($classNames) === 0) {
            throw new Exception(sprintf('No ViewHelpers found in namespace "%s"', $viewHelperNamespace), 1330029328);
        }

        $xmlRootNode = new \SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?>
			<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="' . $xsdNamespace . '"></xsd:schema>');

        foreach ($classNames as $className) {
            $this->generateXmlForClassName($className, $viewHelperNamespace, $xmlRootNode);
        }

        return $xmlRootNode->asXML();
    }
public function generateXsd ( $ viewHelperNamespace , $ xsdNamespace ) { if ( substr ( $ viewHelperNamespace , - 1 ) !== '\\' ) { $ viewHelperNamespace .= '\\' ; } $ classNames = $ this -> getClassNamesInNamespace ( $ viewHelperNamespace ) ; if ( count ( $ classNames ) === 0 ) { throw new Exception ( sprintf ( 'No ViewHelpers found in namespace "%s"' , $ viewHelperNamespace ) , 1330029328 ) ; } $ xmlRootNode = new \ SimpleXMLElement ( '<?xml version="1.0" encoding="UTF-8"?>
			<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="' . $ xsdNamespace . '"></xsd:schema>' ) ; foreach ( $ classNames as $ className ) { $ this -> generateXmlForClassName ( $ className , $ viewHelperNamespace , $ xmlRootNode ) ; } return $ xmlRootNode -> asXML ( ) ; }
Generate the XML Schema definition for a given namespace.
It will generate an XSD file for all view helpers in this namespace.

@param string $viewHelperNamespace Namespace identifier to generate the XSD for, without leading Backslash.
@param string $xsdNamespace $xsdNamespace unique target namespace used in the XSD schema (for example "http://yourdomain.org/ns/viewhelpers")
@return string XML Schema definition
@throws Exception
Generate the XML Schema definition for a given namespace . It will generate an XSD file for all view helpers in this namespace .