<?xml version="1.0" encoding="UTF-8"?>
<!--
 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
-->
<schema targetNamespace="ETSI_CR5852_union"
            xmlns:etsiu="ETSI_CR5852_union"
                  xmlns="http://www.w3.org/2001/XMLSchema"
>


<!-- EXAMPLE 5:	Mapping of children of choice components
// Are translated to TTCN-3 as:
type record ChoiceChildMinMax {
	union {
		record length(1 .. 5) of XSD.String elem0_list,
			// child of choice with minOccurs different from 0
		record length(0 .. 1) of XSD.String elem1_list,
			// first child of choice with minOccurs 0;
			// this alternative is to be used create an empty choice element
		record length(1) of XSD.String elem2_list,
			// second child of choice with minOccurs 0
		record length(1 .. infinity) of XSD.String elem3_list
			// third child of choice with minOccurs 0
	} choice
}
with {
variant "element";
variant (choice) "untagged";
variant (choice.elem0_list) "untagged";
variant (choice.elem0_list[-]) "name as 'elem0'";
variant (choice.elem1_list) "untagged";
variant (choice.elem1_list[-]) "name as 'elem1'";
variant (choice.elem2_list) "untagged";
variant (choice.elem2_list[-]) "name as 'elem2'";
variant (choice.elem3_list) "untagged";
variant (choice.elem3_list[-]) "name as 'elem3'";
};
-->
<element name="ChoiceChildMinMax">
  <complexType>
	<choice>
		<element name="elem0" type="string" minOccurs="1" maxOccurs="5"/>
		<element name="elem1" type="string" minOccurs="0" />
		<element name="elem2" type="string" minOccurs="0" />
		<element name="elem3" type="string" minOccurs="0" maxOccurs="unbounded"/>
	</choice>
  </complexType>
</element>

<!-- added only to enable showing all cases in one XML instance -->
<element name="minOccurs_maxOccurs_frame">
	<complexType>
		<choice minOccurs="0" maxOccurs="unbounded">
			<element ref="etsiu:ChoiceChildMinMax"/>
		</choice>
	</complexType>
</element>



</schema>

