make/uwproj.xsd

Fri, 06 Oct 2023 21:21:10 +0200

author
Mike Becker <universe@uap-core.de>
date
Fri, 06 Oct 2023 21:21:10 +0200
changeset 0
593b60458157
child 1
e3113d4e2fc0
permissions
-rw-r--r--

initial commit

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns="http://unixwork.de/uwproj"
           targetNamespace="http://unixwork.de/uwproj"
           elementFormDefault="qualified"
           version="0.1"
>
    <xs:element name="project" type="ProjectType"/>

    <xs:complexType name="ProjectType">
        <xs:sequence>
            <xs:element name="config" type="ConfigType" minOccurs="0"/>
            <xs:element name="dependency" type="DependencyType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="target" type="TargetType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ConfigType">
        <xs:sequence>
            <xs:element name="var" type="ConfigVarType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="ConfigVarType">
        <xs:simpleContent>
            <xs:extension base="xs:string">
                <xs:attribute name="name" type="xs:string" use="required"/>
                <xs:attribute name="exec" type="xs:boolean" default="false"/>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>

    <xs:complexType name="PkgConfigType">
        <xs:simpleContent>
            <xs:extension base="xs:string">
                <xs:attribute name="atleast" type="xs:string"/>
                <xs:attribute name="exact" type="xs:string"/>
                <xs:attribute name="max" type="xs:string"/>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>

    <xs:simpleType name="LangType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="c"/>
            <xs:enumeration value="cpp"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="DependencyType">
        <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element name="lang" type="LangType"/>
            <xs:element name="cflags" type="FlagsType"/>
            <xs:element name="cxxflags" type="FlagsType"/>
            <xs:element name="ldflags" type="FlagsType"/>
            <xs:element name="pkgconfig" type="PkgConfigType"/>
            <xs:element name="test" type="xs:string"/>
            <xs:element name="make" type="xs:string"/>
        </xs:choice>
        <xs:attribute name="name" type="xs:string"/>
        <xs:attribute name="platform" type="xs:string"/>
        <xs:attribute name="not" type="xs:string"/>
    </xs:complexType>

    <xs:complexType name="FlagsType">
        <xs:simpleContent>
            <xs:extension base="xs:string">
                <xs:attribute name="exec" type="xs:boolean" default="false"/>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>

    <xs:complexType name="TargetType">
        <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element name="feature" type="FeatureType"/>
            <xs:element name="option" type="OptionType"/>
            <xs:element name="define" type="DefineType"/>
            <xs:element name="dependencies" type="DependenciesType"/>
            <xs:element name="alldependencies">
                <xs:complexType/>
            </xs:element>
        </xs:choice>
        <xs:attribute name="name" type="xs:string"/>
    </xs:complexType>

    <xs:complexType name="FeatureType">
        <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:group ref="TargetDataGroup"/>
        </xs:choice>
        <xs:attribute name="name" type="xs:string" use="required"/>
        <xs:attribute name="arg" type="xs:string"/>
        <xs:attribute name="default" type="xs:boolean" default="false"/>
    </xs:complexType>

    <xs:complexType name="OptionType">
        <xs:sequence>
            <xs:element name="value" type="OptionValueType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="default" type="OptionDefaultType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute name="arg" type="xs:string"/>
    </xs:complexType>

    <xs:complexType name="OptionValueType">
        <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:group ref="TargetDataGroup"/>
        </xs:choice>
        <xs:attribute name="str" type="xs:string" use="required"/>
    </xs:complexType>

    <xs:complexType name="OptionDefaultType">
        <xs:attribute name="value" type="xs:string" use="required"/>
        <xs:attribute name="platform" type="xs:string"/>
    </xs:complexType>

    <xs:group name="TargetDataGroup">
        <xs:choice>
            <xs:element name="define" type="DefineType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="dependencies" type="DependenciesType" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="make" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
        </xs:choice>
    </xs:group>

    <xs:complexType name="DefineType">
        <xs:attribute name="name" type="xs:string" use="required"/>
        <xs:attribute name="value" type="xs:string"/>
    </xs:complexType>

    <xs:simpleType name="DependenciesType">
        <xs:restriction base="xs:string"/>
    </xs:simpleType>
</xs:schema>

mercurial