<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied.  See the License for the
  specific language governing permissions and limitations
  under the License.
  -->
<xs:schema targetNamespace="https://plc4x.apache.org/schemas/testsuite.xsd"
           xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <xs:element name="testsuite">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="name" type="xs:string"/>
                <!--
                    Each testcase is a set of hexadecimal input and expected output.
                    A test will parse the binary input and compare the parsed result
                    with the expected output. If that matches, it serializes the model
                    back to it's binary representation and then compares the binary
                    output with the original.
                -->
                <xs:element name="testcase" maxOccurs="unbounded">
                    <xs:complexType>
                        <xs:sequence>
                            <!-- The name of the test, as it is output by the test-runner -->
                            <xs:element name="name" type="xs:string"/>
                            <!-- Some optional description of what the test should do -->
                            <xs:element name="description" type="xs:string" minOccurs="0"/>
                            <!-- A hexadecimal representation of the input to the parser -->
                            <xs:element name="raw" type="xs:hexBinary"/>
                            <!-- The root type we should use for serializing and parsing -->
                            <xs:element name="root-type" type="xs:string"/>
                            <!-- An Xml serialized representation of the expected model -->
                            <xs:element name="xml" type="xs:anyType"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
            <xs:attribute name="bigEndian" type="xs:boolean"/>
        </xs:complexType>
    </xs:element>

</xs:schema>