<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <xs:element name="programs">
        <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element name="program" type="program-type"/>
                <xs:element name="program-group" type="program-group-type"/>
            </xs:choice>
            <xs:attribute name="title" type="xs:string" use="required"/>
        </xs:complexType>
    </xs:element>
    
    <xs:complexType name="program-type">
        <xs:all>
            <xs:element name="name" type="xs:string"/>
            <xs:element name="filename" type="xs:string"/>
            <xs:element name="version" type="xs:string" minOccurs="0"/>
            <xs:element name="homepage" type="xs:string" minOccurs="0"/>
            <xs:element name="description" type="xs:string" minOccurs="0"/>
        </xs:all>
    </xs:complexType>
    
    <xs:complexType name="program-group-type">
        <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element name="program" type="program-type"/>
            <xs:element name="program-group" type="program-group-type"/>
        </xs:choice>
        <xs:attribute name="name" type="xs:string" use="required"/>
    </xs:complexType>

</xs:schema>
