/******************************************************************************
* 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_enumeration_restriction.ttcn
//  Description:
//  References:
//  Rev:
//  Prodnr:
//  Updated:       Mon Jun 29 12:26:00 2014
//  Contact:       http://ttcn.ericsson.se
//
////////////////////////////////////////////////////////////////////////////////
//	Generated from file(s):
//	- enumeration_restriction.xsd
//			/* xml version = "1.0" encoding = "UTF-8" */
//			/* targetnamespace = "www.example.org/enumeration/restriction" */
////////////////////////////////////////////////////////////////////////////////
//     Modification header(s):
//-----------------------------------------------------------------------------
//  Modified by:
//  Modification date:
//  Description:
//  Modification contact:
//------------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////


module www_example_org_enumeration_restriction {


import from XSD all;


const NMTOKENSEnumeration c_defaultForEmpty_1 := false_;


const IDREFSEnumeration c_defaultForEmpty_2 := false_;


const NMTOKENSEnumType c_defaultForEmpty_3 := false_;


const IDREFSEnumType c_defaultForEmpty_4 := false_;


type E21unnamed_type E21unnamed
with {
  variant "name as uncapitalized";
  variant "element";
};


type union E21unnamed_type
{
	XSD.Integer alt_,
	XSD.Float alt_1,
	XSD.String alt_2
}
with {
  variant "name as uncapitalized";
  variant "useUnion";
  variant (alt_) "name as ''";
  variant (alt_1) "name as ''";
  variant (alt_2) "name as ''";
};


type E21unnamed_type E22 (
	{alt_1:=20.400000},
	{alt_2:="small"},
	{alt_:=50}
)
with {
  variant "name as uncapitalized";
};


type String_int_type String_int
with {
  variant "element";
};


type union String_int_type
{
	XSD.String alt_,
	XSD.Integer alt_1
}
with {
  variant "useUnion";
  variant (alt_) "name as ''";
  variant (alt_1) "name as ''";
};


type String_int_type Everything_is_string (
	{alt_:="20.4"},
	{alt_:="50"},
	{alt_:="small"}
);


type Mixed_Types_type Mixed_Types
with {
  variant "element";
};


type union Mixed_Types_type
{
	XSD.GDay alt_,
	XSD.GYear alt_1,
	XSD.GMonth alt_2,
	XSD.Float alt_3,
	XSD.Date alt_4,
	XSD.Time alt_5,
	XSD.DateTime alt_6,
	XSD.GMonthDay alt_7,
	XSD.Duration alt_8,
	XSD.GYearMonth alt_9,
	XSD.String alt_10
}
with {
  variant "useUnion";
  variant (alt_) "name as ''";
  variant (alt_1) "name as ''";
  variant (alt_2) "name as ''";
  variant (alt_3) "name as ''";
  variant (alt_4) "name as ''";
  variant (alt_5) "name as ''";
  variant (alt_6) "name as ''";
  variant (alt_7) "name as ''";
  variant (alt_8) "name as ''";
  variant (alt_9) "name as ''";
  variant (alt_10) "name as ''";
};


type Mixed_Types_type Mixed_Enum (
	{alt_10:="small"},
	{alt_10:="somestring"},
	{alt_1:="0085"},
	{alt_2:="--05"},
	{alt_3:=20.400000},
	{alt_3:=3.140000},
	{alt_4:="2014-01-01"},
	{alt_5:="05:05:00"},
	{alt_6:="2013-11-23T17:45:56"},
	{alt_7:="--01-03"},
	{alt_8:="P5Y2M10DT15H"},
	{alt_9:="1999-08"},
	{alt_:="---30"}
);


type Only_int_type Only_int
with {
  variant "element";
};


type union Only_int_type
{
	XSD.Integer alt_
}
with {
  variant "useUnion";
  variant (alt_) "name as ''";
};


type Only_int_type Ints (
	{alt_:=14}
);


type union UnionWithEnumField
{
	enumerated {
		x,
		none_,
		type_
	} alt_,
	XSD.PositiveInteger alt_1 (1 .. !1000000)
}
with {
  variant "useUnion";
  variant "element";
  variant (alt_) "name as ''";
  variant (alt_) "text 'none_' as 'none'";
  variant (alt_) "text 'type_' as 'type'";
  variant (alt_) "text 'x' as ''";
  variant (alt_1) "name as ''";
};


type enumerated NMTOKENSEnumeration
{
	false_,
	true_
}
with {
  variant "text 'false_' as 'false'";
  variant "text 'true_' as 'true'";
};


type enumerated IDREFSEnumeration
{
	false_,
	true_
}
with {
  variant "text 'false_' as 'false'";
  variant "text 'true_' as 'true'";
};


type record Element
{
	NMTOKENSEnumeration modal optional,
	IDREFSEnumeration modal2 optional
}
with {
  variant "element";
  variant (modal) "defaultForEmpty as c_defaultForEmpty_1";
  variant (modal) "attribute";
  variant (modal2) "defaultForEmpty as c_defaultForEmpty_2";
  variant (modal2) "attribute";
};


type NMTOKENSEnumType NMTOKENSEnumElem
with {
  variant "defaultForEmpty as c_defaultForEmpty_3";
  variant "element";
};


type enumerated NMTOKENSEnumType
{
	false_,
	true_
}
with {
  variant "text 'false_' as 'false'";
  variant "text 'true_' as 'true'";
};


type NMTOKENSType NMTOKENSElem
with {
  variant "element";
};


type XSD.NMTOKENS NMTOKENSType;


type IDREFSEnumType IDREFSEnumElem
with {
  variant "defaultForEmpty as c_defaultForEmpty_4";
  variant "element";
};


type enumerated IDREFSEnumType
{
	false_,
	true_
}
with {
  variant "text 'false_' as 'false'";
  variant "text 'true_' as 'true'";
};


type IDREFSType IDREFSElem
with {
  variant "element";
};


type XSD.IDREFS IDREFSType;


}
with {
  encode "XML";
  variant "namespace as 'www.example.org/enumeration/restriction' prefix 'this'";
  variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'";
}
