<commit_before><?xml version="1.0" encoding="UTF-8"?>

<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://api.irail.be/schema" xmlns:tns="http://api.irail.be/schema" elementFormDefault="qualified">
    
    <!-- List all stations -->
    <element name="RequestListAllStations" type="string"> <!--Wat voor type moeten we hier gebruiken, we vragen enkel een url op?-->
        <annotation>
            <documentation>
              Request element for getting all stations.
            </documentation>
        </annotation>
    </element>

    <element name="ResponseListAllStations" type="tns:stationsType">
        <annotation>
            <documentation>
              Response element containing a list of all stations and their location.
            </documentation>
        </annotation>
    </element>

    <complexType name="stationsType">
        <sequence>
            <element name="station" type="tns:stationType" minOccurs="0" maxOccurs="unbounded" />
        </sequence>
        <attribute name="timestamp" type="integer" use="required" /> <!-- Timestamp is just a random number" -->
    </complexType>

    <complexType name="stationType">
        <simpleContent>
            <extension base="string">
                <attribute name="location" type="double" use="required" /> <!-- Dit zou moeten opgesplitst worden in locationX en locationY, geen 2 waarden in 1 attribuut stoppen! -->
            </extension>
        </simpleContent>
    </complexType>

    <!-- Schedules -->
    <element name="RequestSchedules" type="tns:RequestSchedulesType">
        <annotation>
            <documentation>
              Request for schedules between two stations, with some optional parameters.
            </documentation>
        </annotation>
    </element>

    <complexType name="RequestSchedulesType">
        <sequence>
            <element name="station1" type="string" />
            <element name="station2" type="string" />
            <element name="date"> <!--This will accept invalid dates like 31-02-2010-->
                <simpleType>
                    <restriction base="string">
                        <pattern value="[0-3][0-9][0-9]{2}[10|11]" />
                    </restriction>
                </simpleType>
            </element>
            <element name="time"> <!--This will accept invalid times-->
                <simpleType>
                    <restriction base="string">
                        <pattern value="[0-2][0-9][0-5][0-9]" />
                    </restriction>
                </simpleType>
            </element>
            <element name="lang">
                <simpleType>
                    <restriction base="string">
                        <enumeration value="NL" />
                    </restriction>
                </simpleType>
            </element>
            <element name="timeSel">
                <simpleType>
                    <restriction base="string">
                        <enumeration value="arrive" />
                        <enumeration value="depart" />
                    </restriction>
                </simpleType>
            </element>
            <element name="typeOfTransport">
                <simpleType>
                    <restriction base="string">
                        <pattern value="([bus|taxi|train];)*[bus|taxi|train]" />
                    </restriction>
                </simpleType>
            </element>
        </sequence>
    </complexType>

    <element name="ResponseSchedules" type="tns:connectionsType">
        <annotation>
            <documentation>
              Response for schedules between two stations.
            </documentation>
        </annotation>
    </element>

    <complexType name="connectionsType">
        <sequence maxOccurs="unbounded">
            <element name="connection" type ="tns:connectionType" />
        </sequence>
    </complexType>

    <complexType name="connectionType">
        <sequence maxOccurs="unbounded">
            <element name="departure" type="tns:departureType" />
            <element name="vias" type="tns:viasType" />
            <element name="arrival" type="tns:arrivalType" />
            <element name="duration" type="tns:durationType" />
        </sequence>
        <attribute name="id" type="integer" use="required" />
    </complexType>

    <complexType name="departureType">
        <sequence>
            <element name="station" type="tns:stationType" />
            <element name="time" type="tns:timeType" />
            <element name="vehicle" type="string" />
            <element name="platform" type="tns:platformType" />
        </sequence>
        <attribute name="delay" type="integer" use="required" />
    </complexType>

    <complexType name="timeType">
        <simpleContent>
            <extension base="integer">
                <attribute name="formatted" type="dateTime" /> <!--dateTime = iso 8601-->
            </extension>
        </simpleContent>
    </complexType>

    <complexType name="platformType">
        <simpleContent>
            <extension base="integer">
                <attribute name="normal">
                    <simpleType>
                        <restriction base="string">
                            <enumeration value="yes" />
                            <enumeration value="no" />
                        </restriction>
                    </simpleType>
                </attribute>
            </extension>
        </simpleContent>
    </complexType>

    <complexType name="viasType">
        <sequence>
            <element name="via" type="tns:viaType" />
        </sequence>
        <attribute name="number" type="integer" />
    </complexType>

    <complexType name="viaType">
        <sequence>
            <element name="arrival" type="tns:arrivalViaType" />
            <element name="depart" type="tns:departType" />
            <element name="timeBetween" type="integer" /> <!--Time in seconds-->
            <element name="station" type="tns:stationType" />
            <element name="vehicle" type="string" /> <!--Hier een reguliere expressie van maken zodat het van deze vorm is: Be.NMBS.P1234?-->
        </sequence>
        <attribute name="id" type="integer" />
    </complexType>

    <complexType name="arrivalViaType">
        <sequence>
            <element name="time" type="tns:timeType" />
            <element name="platform" type="tns:platformType" />
        </sequence>
    </complexType>

    <complexType name="departType">
        <sequence>
            <element name="time" type="tns:timeType" />
            <element name="platform" type="tns:platformType" />
        </sequence>
    </complexType>

    <complexType name="arrivalType">
        <sequence>
            <element name="station" type="tns:stationType" />
            <element name="time" type="tns:timeType" />
            <element name="vehicle" type="string" />
            <element name="platform" type="tns:platformType" />
        </sequence>
        <attribute name="delay" type="integer" />
    </complexType>

    <complexType name="durationType">
        <simpleContent>
            <restriction base="integer"> <!--Dit wil nog niet valideren-->
                <pattern value="\d{2}:\d{2}" />
                <attribute name="delay">
                    <simpleType>
                        <restriction base="string">
                            <enumartion value="yes" />
                            <enumartion value="no" />
                        </restriction>
                    </simpleType>
                </attribute>
            </restriction>
        </simpleContent>
    </complexType>

    <!-- Liveboard -->
    <element name="RequestLiveboard" type="tns:RequestLiveboardType">
        <annotation>
            <documentation>
                Request for liveboard information of the specified station.
            </documentation>
        </annotation>
    </element><commit_msg>enumartian bug fix<commit_after><?xml version="1.0" encoding="UTF-8"?>

<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://api.irail.be/schema" xmlns:tns="http://api.irail.be/schema" elementFormDefault="qualified">
    
    <!-- List all stations -->
    <element name="RequestListAllStations" type="string"> <!--Wat voor type moeten we hier gebruiken, we vragen enkel een url op?-->
        <annotation>
            <documentation>
              Request element for getting all stations.
            </documentation>
        </annotation>
    </element>

    <element name="ResponseListAllStations" type="tns:stationsType">
        <annotation>
            <documentation>
              Response element containing a list of all stations and their location.
            </documentation>
        </annotation>
    </element>

    <complexType name="stationsType">
        <sequence>
            <element name="station" type="tns:stationType" minOccurs="0" maxOccurs="unbounded" />
        </sequence>
        <attribute name="timestamp" type="integer" use="required" /> <!-- Timestamp is just a random number" -->
    </complexType>

    <complexType name="stationType">
        <simpleContent>
            <extension base="string">
                <attribute name="location" type="double" use="required" /> <!-- Dit zou moeten opgesplitst worden in locationX en locationY, geen 2 waarden in 1 attribuut stoppen! -->
            </extension>
        </simpleContent>
    </complexType>

    <!-- Schedules -->
    <element name="RequestSchedules" type="tns:RequestSchedulesType">
        <annotation>
            <documentation>
              Request for schedules between two stations, with some optional parameters.
            </documentation>
        </annotation>
    </element>

    <complexType name="RequestSchedulesType">
        <sequence>
            <element name="station1" type="string" />
            <element name="station2" type="string" />
            <element name="date"> <!--This will accept invalid dates like 31-02-2010-->
                <simpleType>
                    <restriction base="string">
                        <pattern value="[0-3][0-9][0-9]{2}[10|11]" />
                    </restriction>
                </simpleType>
            </element>
            <element name="time"> <!--This will accept invalid times-->
                <simpleType>
                    <restriction base="string">
                        <pattern value="[0-2][0-9][0-5][0-9]" />
                    </restriction>
                </simpleType>
            </element>
            <element name="lang">
                <simpleType>
                    <restriction base="string">
                        <enumeration value="NL" />
                    </restriction>
                </simpleType>
            </element>
            <element name="timeSel">
                <simpleType>
                    <restriction base="string">
                        <enumeration value="arrive" />
                        <enumeration value="depart" />
                    </restriction>
                </simpleType>
            </element>
            <element name="typeOfTransport">
                <simpleType>
                    <restriction base="string">
                        <pattern value="([bus|taxi|train];)*[bus|taxi|train]" />
                    </restriction>
                </simpleType>
            </element>
        </sequence>
    </complexType>

    <element name="ResponseSchedules" type="tns:connectionsType">
        <annotation>
            <documentation>
              Response for schedules between two stations.
            </documentation>
        </annotation>
    </element>

    <complexType name="connectionsType">
        <sequence maxOccurs="unbounded">
            <element name="connection" type ="tns:connectionType" />
        </sequence>
    </complexType>

    <complexType name="connectionType">
        <sequence maxOccurs="unbounded">
            <element name="departure" type="tns:departureType" />
            <element name="vias" type="tns:viasType" />
            <element name="arrival" type="tns:arrivalType" />
            <element name="duration" type="tns:durationType" />
        </sequence>
        <attribute name="id" type="integer" use="required" />
    </complexType>

    <complexType name="departureType">
        <sequence>
            <element name="station" type="tns:stationType" />
            <element name="time" type="tns:timeType" />
            <element name="vehicle" type="string" />
            <element name="platform" type="tns:platformType" />
        </sequence>
        <attribute name="delay" type="integer" use="required" />
    </complexType>

    <complexType name="timeType">
        <simpleContent>
            <extension base="integer">
                <attribute name="formatted" type="dateTime" /> <!--dateTime = iso 8601-->
            </extension>
        </simpleContent>
    </complexType>

    <complexType name="platformType">
        <simpleContent>
            <extension base="integer">
                <attribute name="normal">
                    <simpleType>
                        <restriction base="string">
                            <enumeration value="yes" />
                            <enumeration value="no" />
                        </restriction>
                    </simpleType>
                </attribute>
            </extension>
        </simpleContent>
    </complexType>

    <complexType name="viasType">
        <sequence>
            <element name="via" type="tns:viaType" />
        </sequence>
        <attribute name="number" type="integer" />
    </complexType>

    <complexType name="viaType">
        <sequence>
            <element name="arrival" type="tns:arrivalViaType" />
            <element name="depart" type="tns:departType" />
            <element name="timeBetween" type="integer" /> <!--Time in seconds-->
            <element name="station" type="tns:stationType" />
            <element name="vehicle" type="string" /> <!--Hier een reguliere expressie van maken zodat het van deze vorm is: Be.NMBS.P1234?-->
        </sequence>
        <attribute name="id" type="integer" />
    </complexType>

    <complexType name="arrivalViaType">
        <sequence>
            <element name="time" type="tns:timeType" />
            <element name="platform" type="tns:platformType" />
        </sequence>
    </complexType>

    <complexType name="departType">
        <sequence>
            <element name="time" type="tns:timeType" />
            <element name="platform" type="tns:platformType" />
        </sequence>
    </complexType>

    <complexType name="arrivalType">
        <sequence>
            <element name="station" type="tns:stationType" />
            <element name="time" type="tns:timeType" />
            <element name="vehicle" type="string" />
            <element name="platform" type="tns:platformType" />
        </sequence>
        <attribute name="delay" type="integer" />
    </complexType>

    <complexType name="durationType">
        <simpleContent>
            <restriction base="integer"> <!--Dit wil nog niet valideren-->
                <pattern value="\d{2}:\d{2}" />
                <attribute name="delay">
                    <simpleType>
                        <restriction base="string">
                            <enumeration value="yes" />
                            <enumeration value="no" />
                        </restriction>
                    </simpleType>
                </attribute>
            </restriction>
        </simpleContent>
    </complexType>

    <!-- Liveboard -->
    <element name="RequestLiveboard" type="tns:RequestLiveboardType">
        <annotation>
            <documentation>
                Request for liveboard information of the specified station.
            </documentation>
        </annotation>
    </element>
{'fraction_non_alphanumeric': 0.13585284700860067, 'fraction_numerical': 0.006277857994852157, 'mean_word_length': 1.7913089188715612, 'pattern_counts': {'":': 0, '<': 393, '<?xml version=': 2, '>': 393, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4686997', 'n_tokens_mistral': 4260, 'n_tokens_neox': 3971, 'n_words': 873}