<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
 Copyright (c) 2000-2021 Ericsson Telecom AB
 All rights reserved. This program and the accompanying materials
 are made available under the terms of the Eclipse Public License v2.0
 which accompanies this distribution, and is available at
 https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html

 Contributors:
  Balasko, Jeno
  Raduly, Csaba
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:xtdl="http://ttcn.ericsson.se/protocolModules/xtdp/xtdl"
            xmlns="http://ttcn.ericsson.se/protocolModules/xtdp/xtdp"
            targetNamespace="http://ttcn.ericsson.se/protocolModules/xtdp/xtdp"
>

<xsd:import namespace="http://ttcn.ericsson.se/protocolModules/xtdp/xtdl" schemaLocation="XTDL.xsd" />

<!-- ***********************************************************************
     *                        XTDP ELEMENT TYPES                           *
     ***********************************************************************-->

    <xsd:simpleType name="XTDP-Identifier">
        <xsd:restriction base="xsd:string">
            <!--Corrected by ethgry from: "(\p{L}|\d|_|\-|\.|\/){1,}"/>-->
            <!-- FIXME: IDENTIFIER CONVENSION IS CHANGED! FIRST CHARACTER SHALL NOT BE "_" "-" OR "."; IS IT OK?-->
            <xsd:pattern value="[a-zA-Z0-9]([a-zA-Z0-9]|_|\-|\.|/){1,}"/>
        </xsd:restriction>
    </xsd:simpleType>


 <!--
 ***********************************************************************
 *                        XTDP INFORMATION ELEMENTS                    *
 ***********************************************************************
 -->


    <xsd:complexType name="XTDP-AddRequest">
        <xsd:sequence>
            <xsd:element name="requestId" type="xsd:positiveInteger" minOccurs="1" maxOccurs="1" />
            <xsd:element name="parentWidgetId" type="XTDP-Identifier" minOccurs="0" maxOccurs="1" />
            <xsd:group ref="xtdl:widgets"/>
        </xsd:sequence>
    </xsd:complexType>


<!--
***********************************************************************
*                                   XTDP MESSAGES                     *
***********************************************************************-->


    <xsd:complexType name="XTDP-AddRequests">
        <xsd:sequence>
            <xsd:element name="XTDP-AddRequest" type="XTDP-AddRequest" minOccurs="1" maxOccurs="unbounded" />
        </xsd:sequence>
    </xsd:complexType>


    <xsd:element name="XTDP-Message">
        <xsd:complexType>
            <xsd:choice>
                <xsd:element name="XTDP-AddRequests" type="XTDP-AddRequests" />
                <xsd:element name="XTDP-AuthChallenge" type="xsd:string" />
                <xsd:element name="XTDP-AuthResponse" type="xsd:string" />
                <xsd:element name="XTDP-Bye" type="xsd:string" />
            </xsd:choice>
            <!-- ethgry: "noNamespaceSchemaLocation" is deleted; how to know about this attribute,
            if the schema is not available?  -->
            <!-- ethgry: transactionID is added to allow handling several procedures at the same time -->
            <xsd:attribute name="transactionID" type="xsd:nonNegativeInteger"/>
        </xsd:complexType>
    </xsd:element>
</xsd:schema>
