Classes/Console/Service/XsdGenerator.php
protected function generateXsdFromClassNames(array $classNames, $xsdNamespace)
    {
        if (count($classNames) === 0) {
            throw new Exception(sprintf('No ViewHelper classes given'), 1464984856);
        }
        $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, $xmlRootNode);
        }

        return $xmlRootNode->asXML();
    }
protected function generateXsdFromClassNames(array $classNames, $xsdNamespace)
    {
        if (count($classNames) === 0) {
            throw new Exception(sprintf('No ViewHelper classes given'), 1464984856);
        }
        $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, $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 array $classNames One or more view helper class names
@param string $xsdNamespace $xsdNamespace unique target namespace used in the XSD schema (for example "http://yourdomain.org/ns/viewhelpers")
@throws Exception
@return string XML Schema definition