@classmethod
def write_xsd(cls) ->None:
    """Write the complete schema file based on the template file
        `config.xsdt`, including the input, flux, and state sequences
        of all application models available at the moment.

        The following example shows that after writing a new schema file,
        method |XMLInterface.validate_xml| does not raise an error when
        applied on the XML configuration file of the `LahnH` example
        project:

        >>> from hydpy.auxs.xmltools import XSDWriter, XMLInterface
        >>> from hydpy import data
        >>> xmlpath = data.get_path('LahnH', 'config.xml')

        >>> import os
        >>> if os.path.exists(XSDWriter.filepath_target):
        ...     os.remove(XSDWriter.filepath_target)

        >>> XMLInterface(xmlpath).validate_xml()    # doctest: +ELLIPSIS
        Traceback (most recent call last):
        ...
        lxml.etree.XMLSchemaParseError: Failed to locate the main schema resource at '...config.xsd'.

        >>> XSDWriter.write_xsd()
        >>> XMLInterface(xmlpath).validate_xml()
        """
    with open(cls.filepath_source) as file_:
        template = file_.read()
    template = template.replace('<!--include model sequence groups-->', cls
        .get_insertion())
    with open(cls.filepath_target, 'w') as file_:
        file_.write(template)
