<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
 Copyright (c) 2000-2025 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:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
	        xmlns="http://ttcn.ericsson.se/protocolModules/xtdp/xtdl"
	        targetNamespace="http://ttcn.ericsson.se/protocolModules/xtdp/xtdl"
	        attributeFormDefault="unqualified"
	        elementFormDefault="qualified"
>

	<xsd:group name="widgets">
		<xsd:choice>
			<xsd:element name="window" type="window" />
 			<xsd:element name="tabbox" type="tabbox" />
		</xsd:choice>
	</xsd:group>

	<xsd:element name="windowelem" type="window" />

	<xsd:group name="embeddedwidget" >
		<!-- not much of a --><xsd:choice>
			<xsd:element name="tabbox" type="tabbox" />
		</xsd:choice>
	</xsd:group>

	<xsd:group name="embeddedwidgets">
		<xsd:sequence>
			<xsd:group ref="embeddedwidget" minOccurs="0" maxOccurs="unbounded" />
		</xsd:sequence>
	</xsd:group>

	<xsd:complexType name="window">
		<xsd:sequence>
			<xsd:element name="image" type="image"  minOccurs="0" maxOccurs="unbounded" />
			<xsd:group ref="embeddedwidgets"/>
		</xsd:sequence>
		<xsd:attribute name="id" type="xsd:string" />
		<xsd:attribute name="title" type="xsd:string" />
		<xsd:attribute name="width" type="xsd:decimal" />
		<xsd:attribute name="height" type="xsd:decimal" />
		<xsd:attribute name="orientation" type="orientation" fixed="vertical" />
	</xsd:complexType>

	<xsd:complexType name="tabbox">
		<xsd:sequence>
			<xsd:element name="tabs" type="tabs" />
			<xsd:element name="tabpanels" type="tabpanels" />
		</xsd:sequence>
		<xsd:attribute name="disabled" type="xsd:boolean" />
		<xsd:attribute name="flex" type="xsd:decimal" />
		<xsd:attribute name="id" type="xsd:string" />
		<xsd:attribute name="layout" type="tablayout" />
	</xsd:complexType>

	<xsd:complexType name="tabs">
		<xsd:sequence>
			<xsd:element name="tab" type="tab" minOccurs="0" maxOccurs="unbounded"  />
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="tab">
		<xsd:attribute name="label" type="xsd:string" use="required" />
		<xsd:attribute name="id" type="xsd:string" />
	</xsd:complexType>

	<xsd:complexType name="tabpanels">
		<xsd:sequence>
			<xsd:element name="tabpanel" type="tabpanel"  minOccurs="0" maxOccurs="unbounded" />
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="tabpanel">
		<xsd:group ref="embeddedwidgets" />
		<xsd:attribute name="id" type="xsd:string" />
		<xsd:attribute name="orientation" type="orientation" />
		<xsd:attribute name="maxheight" type="xsd:decimal" />
	</xsd:complexType>

	<xsd:simpleType name="tablayout">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="WRAP" />
			<xsd:enumeration value="SCROLL" />
			<xsd:enumeration value="CARD" />
			<xsd:enumeration value="LISTCARD" />
		</xsd:restriction>
	</xsd:simpleType>

	<xsd:complexType name="image">
		<xsd:attribute name="imagedata" type="xsd:string" />
		<xsd:attribute name="imageurl" type="xsd:string" />
		<xsd:attribute name="id" type="xsd:string" use="required" />
	</xsd:complexType>



	<xsd:simpleType name="orientation">
		<xsd:restriction base="xsd:string">
			<xsd:enumeration value="vertical" />
			<xsd:enumeration value="horizontal" />
		</xsd:restriction>
	</xsd:simpleType>


</xsd:schema>
