<?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 xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:ns="www.example.org"
targetNamespace="www.example.org">

<annotation>
  <documentation xml:lang="EN">
    It is not allowed to extend groups and complex types with the constructor all and the extending type shall not be all either
  </documentation>
</annotation>

<annotation><documentation xml:lang="EN">base types</documentation></annotation>

<complexType name="e25seq">
	<sequence>
		<element name="titleElemBase" type="string"/>
		<element name="forenameElemBase" type="string"/>
		<element name="surnameElemBase" type="string"/>
	</sequence>
	<attribute name="genderAttrBase" type="integer"/>
	<attributeGroup ref="ns:g25attr2"/>
</complexType>

<complexType name="e25seqRecurrence">
	<sequence minOccurs="0" maxOccurs="unbounded">
		<element name="titleElemBase" type="string"/>
		<element name="forenameElemBase" type="string"/>
		<element name="surnameElemBase" type="string"/>
	</sequence>
	<attribute name="genderAttrBase" type="integer"/>
	<attributeGroup ref="ns:g25attr2"/>
</complexType>

<complexType name="e25empty">
	<sequence>
	</sequence>
</complexType>

<complexType name="e25cho">
	<choice>
		<element name="titleElemBase" type="string"/>
		<element name="forenameElemBase" type="string"/>
		<element name="surnameElemBase" type="string"/>
	</choice>
	<attribute name="genderAttrBase" type="string"/>
</complexType>


<complexType name="e25all">
	<all>
		<element name="titleElemBase" type="string"/>
		<element name="forenameElemBase" type="string"/>
		<element name="surnameElemBase" type="string"/>
	</all>
	<attribute name="genderAttrBase" type="float"/>
</complexType>

<annotation><documentation xml:lang="EN">groups and attributeGroups</documentation></annotation>

<group name="g25seq">
	<sequence>
		<element name="familyStatusElemInGroup" type="string"/>
		<element name="spouseElemInGroup" type="string" minOccurs="0"/>
	</sequence>
</group>

<attributeGroup name="g25attr1">
	<attribute name="birthPlaceAttrGroup" type="string"/>
	<attribute name="birthDateAttrGroup" type="string"/>
</attributeGroup>

<attributeGroup name="g25attr2">
	<attribute name="jobPositionAttrGroup" type="string"/>
</attributeGroup>

<group name="g25cho">
	<choice>
		<element name="birthDateElemInGroup" type="string"/>
		<element name="birthPlaceElemInGroup" type="string"/>
	</choice>
</group>

<annotation><documentation xml:lang="EN">EXTENDING TYPES</documentation></annotation>

<annotation><documentation xml:lang="EN">dummy extension of an empty type</documentation></annotation>
<complexType name="e26nullSeq">
	<complexContent>
		<extension base="ns:e25empty">
			<sequence>
			</sequence>
		</extension>
	</complexContent>
</complexType>

<annotation>
  <documentation xml:lang="EN">base:sequence, extending:sequence, containing attributeGroup and group</documentation></annotation>
<complexType name="e26seq">
	<complexContent>
		<extension base="ns:e25seq">
			<sequence>
				<element name="ageElemExt" type="integer"/>
				<group ref="ns:g25seq"/>
			</sequence>
			<attribute name="unitAttrExt" type="string"/>
			<attributeGroup ref="ns:g25attr1"/>
		</extension>
	</complexContent>
</complexType>

<complexType name="e26seqElemRevOrder">
	<complexContent>
		<extension base="ns:e25seq">
			<sequence>
				<group ref="ns:g25cho"/>
				<element name="ageElemExt" type="integer"/>
			</sequence>
			<attribute name="unitAttrExt" type="string"/>
		</extension>
	</complexContent>
</complexType>

<complexType name="e26seqRecurrence">
	<complexContent>
		<extension base="ns:e25seq">
			<sequence minOccurs="0" maxOccurs="unbounded">
				<group ref="ns:g25cho"/>
				<element name="ageElemExt" type="integer"/>
			</sequence>
			<attribute name="unitAttrExt" type="string"/>
		</extension>
	</complexContent>
</complexType>

<complexType name="e26seqDoubleRecurrence">
	<complexContent>
		<extension base="ns:e25seqRecurrence">
			<sequence minOccurs="0" maxOccurs="unbounded">
				<group ref="ns:g25cho"/>
				<element name="ageElemExt" type="integer"/>
			</sequence>
			<attribute name="unitAttrExt" type="string"/>
		</extension>
	</complexContent>
</complexType>

<annotation><documentation xml:lang="EN">base:choice, extending:choice</documentation></annotation>
<complexType name="e26cho">
	<complexContent>
		<extension base="ns:e25cho">
			<choice>
				<element name="ageElemExt" type="integer"/>
				<element name="birthdayElemExt" type="date"/>
			</choice>
			<attribute name="unitAttrExt" type="string"/>
		</extension>
	</complexContent>
</complexType>



<annotation><documentation xml:lang="EN">base:sequence, extending:choice</documentation></annotation>
<complexType name="e27cho">
	<complexContent>
		<extension base="ns:e25seq">
			<choice>
				<element name="ageElemExt" type="integer"/>
				<element name="birthdayElemExt" type="date"/>
			</choice>
			<attribute name="unitAttrExt" type="string"/>
		</extension>
	</complexContent>
</complexType>

<annotation><documentation xml:lang="EN">base:choice, extending:sequence</documentation></annotation>
<complexType name="e27seq">
	<complexContent>
		<extension base="ns:e25cho">
			<sequence>
				<element name="ageElemExt" type="integer"/>
			</sequence>
			<attribute name="unitAttrExt" type="string"/>
		</extension>
	</complexContent>
</complexType>


<annotation><documentation xml:lang="EN">base:all, extending:sequence --- not allowed!
<complexType name="e26g">
	<complexContent>
		<extension base="ns:e25all">
			<sequence>
				<element name="age" type="integer"/>
			</sequence>
		</extension>
	</complexContent>
</complexType>
</documentation></annotation>

</schema>

