/******************************************************************************
* Copyright (c) 2000-2025 Ericsson Telecom AB
*
* XSD to TTCN-3 Translator
*
* 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
*   Szabo, Bence Janos
*
******************************************************************************/
//
//  File:          www_example_org_type_substitution_abstract_block.ttcn
//  Description:
//  References:
//  Rev:
//  Prodnr:
//  Updated:       Tue Nov 17 13:25:59 2014
//  Contact:       http://ttcn.ericsson.se
//
////////////////////////////////////////////////////////////////////////////////
//	Generated from file(s):
//	- type_substitution_abstract_block.xsd
//			/* xml version = "1.0" encoding = "UTF-8" */
//			/* targetnamespace = "www.example.org/type/substitution/abstract/block" */
////////////////////////////////////////////////////////////////////////////////
//     Modification header(s):
//-----------------------------------------------------------------------------
//  Modified by:
//  Modification date:
//  Description:
//  Modification contact:
//------------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////


module www_example_org_type_substitution_abstract_block {


import from XSD all;


type ParentType_derivations Head
with {
  variant "name as uncapitalized";
  variant "element";
};


/* SUBSTITUTABLE PARENT TYPE */


/* type substitutiongroup generated, because has elemet declaration */


type record ParentType
{
	record of XSD.String foo_list,
	XSD.String bar
}
with {
  variant "abstract";
  variant (foo_list) "untagged";
  variant (foo_list[-]) "name as 'foo'";
};


type RestrictedType_derivations RestrictedTypeElem
with {
  variant "element";
};


/* type substitutiongroup generated, because has elemet declaration */


type record RestrictedType
{
	record length(1 .. infinity) of XSD.String foo_list,
	XSD.String bar
}
with {
  variant "name as uncapitalized";
  variant (foo_list) "untagged";
  variant (foo_list[-]) "name as 'foo'";
};


/* type substitutiongroup generated, because the parent has elemet declaration */


type record RestrictedType2
{
	record length(2 .. infinity) of XSD.String foo_list,
	XSD.String bar
}
with {
  variant "name as uncapitalized";
  variant (foo_list) "untagged";
  variant (foo_list[-]) "name as 'foo'";
};


/* Added to restrictedtype_derivations */


type record RestrictedType2_1
{
	record length(2 .. 5) of XSD.String foo_list,
	XSD.String bar
}
with {
  variant "name as 'restrictedType2.1'";
  variant (foo_list) "untagged";
  variant (foo_list[-]) "name as 'foo'";
};


/* No type substitutiongroup generated, because the parent lacks elemet declaration */


type record RestrictedType3
{
	record length(3 .. infinity) of XSD.String foo_list,
	XSD.String bar
}
with {
  variant "name as uncapitalized";
  variant (foo_list) "untagged";
  variant (foo_list[-]) "name as 'foo'";
};


type ExtendedType_derivations ExtendedElement
with {
  variant "name as uncapitalized";
  variant "element";
};


type record ExtendedType
{
	XSD.String attr1 optional,
	record of XSD.String foo_list,
	XSD.String bar
}
with {
  variant "name as uncapitalized";
  variant (attr1) "attribute";
  variant (foo_list) "untagged";
  variant (foo_list[-]) "name as 'foo'";
};


type record RestrictedExtendedType
{
	record of XSD.String foo_list,
	XSD.String bar
}
with {
  variant "name as uncapitalized";
  variant (foo_list) "untagged";
  variant (foo_list[-]) "name as 'foo'";
};


type union ParentType_derivations
{
	@default ParentType parentType,
	ExtendedType extendedType,
	RestrictedExtendedType restrictedExtendedType,
	RestrictedType restrictedType,
	RestrictedType2 restrictedType2,
	RestrictedType2_1 restrictedType2_1,
	RestrictedType3 restrictedType3
}
with {
  variant "useType";
  variant (parentType) "name as capitalized";
  variant (parentType) "abstract";
  variant (extendedType) "block";
  variant (restrictedType2_1) "name as 'restrictedType2.1'";
};


type union RestrictedType_derivations
{
	@default RestrictedType restrictedType,
	RestrictedType2 restrictedType2,
	RestrictedType2_1 restrictedType2_1,
	RestrictedType3 restrictedType3
}
with {
  variant "useType";
  variant (restrictedType2_1) "name as 'restrictedType2.1'";
};


type union ExtendedType_derivations
{
	@default ExtendedType extendedType,
	RestrictedExtendedType restrictedExtendedType
}
with {
  variant "useType";
  variant (restrictedExtendedType) "block";
};


}
with {
  encode "XML";
  variant "namespace as 'www.example.org/type/substitution/abstract/block' prefix 'tys'";
  variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'";
}
