/*******************************************************************************
* 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:
*   Szabo, Bence Janos
*
*******************************************************************************/
//
//  File:          www_example_org_defaultforempty.ttcn
//  Description:
//  References:
//  Rev:
//  Prodnr:
//  Updated:       Thu Jan 19 13:08:35 2017
//  Contact:       http://ttcn.ericsson.se
//
////////////////////////////////////////////////////////////////////////////////
//	Generated from file(s):
//	- defaultforempty.xsd
//			/* xml version = "1.0" encoding = "UTF-8" */
//			/* targetnamespace = "www.example.org/defaultforempty" */
////////////////////////////////////////////////////////////////////////////////
//     Modification header(s):
//-----------------------------------------------------------------------------
//  Modified by:
//  Modification date:
//  Description:
//  Modification contact:
//------------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////


module www_example_org_defaultforempty {


import from XSD all;


const XSD.String c_defaultForEmpty_1 := "defaultValue";


const XSD.String c_defaultForEmpty_2 := "fixedValue";


const XSD.Date c_defaultForEmpty_3 := "1999-11-11";


const XSD.Integer c_defaultForEmpty_4 := 3;


const XSD.Float c_defaultForEmpty_5 := 3.0;


const XSD.Float c_defaultForEmpty_6 := infinity;


const XSD.Float c_defaultForEmpty_7 := -infinity;


const XSD.Float c_defaultForEmpty_8 := not_a_number;


const XSD.Boolean c_defaultForEmpty_9 := true;


const XSD.Boolean c_defaultForEmpty_10 := false;


const XSD.AnySimpleType c_defaultForEmpty_11 := "1.0.0";


const MyString_1 c_defaultForEmpty_12 := "fix";


const MyString2_1 c_defaultForEmpty_13 := "fix";


const EnumString c_defaultForEmpty_14 := a;


const EnumDate c_defaultForEmpty_15 := x1888_01_01;


const EnumFloat c_defaultForEmpty_16 := infinity;


const EnumFloat c_defaultForEmpty_17 := not_a_number;


const EnumFloat c_defaultForEmpty_18 := 1.0;


const EnumInteger c_defaultForEmpty_19 := int3;


const EnumInteger c_defaultForEmpty_20 := int_3;


const LocalEnumAttributeDefault1 c_defaultForEmpty_21 := false_;


const LocalEnumAttributeFixed1 c_defaultForEmpty_22 := false_;


const LocalEnumAttributeDefault2 c_defaultForEmpty_23 := false_;


const LocalEnumAttributeFixed2 c_defaultForEmpty_24 := false_;


const LocalEnumElementDefault1 c_defaultForEmpty_25 := false_;


const LocalEnumElementFixed1 c_defaultForEmpty_26 := false_;


const LocalEnumElementDefault2 c_defaultForEmpty_27 := false_;


const LocalEnumElementFixed2 c_defaultForEmpty_28 := false_;


const Element.sequence_list[-].localEnumElementDefault1 c_defaultForEmpty_29 := false_;


const Element.sequence_list[-].localEnumElementDefault2 c_defaultForEmpty_30 := false_;


const Element.progress_notes_requested c_defaultForEmpty_31 := false_;


const Element.progress_notes_requested2 c_defaultForEmpty_32 := false_;


/* Basic defaultForEmpty */


type XSD.String StringDefault
with {
  variant "defaultForEmpty as c_defaultForEmpty_1";
  variant "element";
};


type XSD.String StringFixed (c_defaultForEmpty_2)
with {
  variant "defaultForEmpty as c_defaultForEmpty_2";
  variant "element";
};


type XSD.Date DateDefault
with {
  variant "defaultForEmpty as c_defaultForEmpty_3";
  variant "element";
};


type XSD.Date DateFixed (c_defaultForEmpty_3)
with {
  variant "defaultForEmpty as c_defaultForEmpty_3";
  variant "element";
};


type XSD.Integer IntegerDefault
with {
  variant "defaultForEmpty as c_defaultForEmpty_4";
  variant "element";
};


type XSD.Integer IntegerFixed (c_defaultForEmpty_4)
with {
  variant "defaultForEmpty as c_defaultForEmpty_4";
  variant "element";
};


type XSD.Float FloatDefault
with {
  variant "defaultForEmpty as c_defaultForEmpty_5";
  variant "element";
};


type XSD.Float FloatFixed (c_defaultForEmpty_5)
with {
  variant "defaultForEmpty as c_defaultForEmpty_5";
  variant "element";
};


type XSD.Float FloatDefault2
with {
  variant "defaultForEmpty as c_defaultForEmpty_5";
  variant "element";
};


type XSD.Float FloatFixed2 (c_defaultForEmpty_5)
with {
  variant "defaultForEmpty as c_defaultForEmpty_5";
  variant "element";
};


type XSD.Float FloatDefault3
with {
  variant "defaultForEmpty as c_defaultForEmpty_6";
  variant "element";
};


type XSD.Float FloatFixed3 (c_defaultForEmpty_6)
with {
  variant "defaultForEmpty as c_defaultForEmpty_6";
  variant "element";
};


type XSD.Float FloatDefault4
with {
  variant "defaultForEmpty as c_defaultForEmpty_7";
  variant "element";
};


type XSD.Float FloatFixed4 (c_defaultForEmpty_7)
with {
  variant "defaultForEmpty as c_defaultForEmpty_7";
  variant "element";
};


type XSD.Float FloatDefault5
with {
  variant "defaultForEmpty as c_defaultForEmpty_8";
  variant "element";
};


type XSD.Float FloatFixed5 (c_defaultForEmpty_8)
with {
  variant "defaultForEmpty as c_defaultForEmpty_8";
  variant "element";
};


type XSD.Boolean BooleanDefault
with {
  variant "defaultForEmpty as c_defaultForEmpty_9";
  variant "element";
  //variant "text 'true' as '1'";
  //variant "text 'false' as '0'";
};


type XSD.Boolean BooleanFixed (c_defaultForEmpty_9)
with {
  variant "defaultForEmpty as c_defaultForEmpty_9";
  variant "element";
  //variant "text 'true' as '1'";
  //variant "text 'false' as '0'";
};


type XSD.Boolean BooleanDefault2
with {
  variant "defaultForEmpty as c_defaultForEmpty_9";
  variant "element";
  //variant "text 'true' as '1'";
  //variant "text 'false' as '0'";
};


type XSD.Boolean BooleanFixed2 (c_defaultForEmpty_9)
with {
  variant "defaultForEmpty as c_defaultForEmpty_9";
  variant "element";
  //variant "text 'true' as '1'";
  //variant "text 'false' as '0'";
};


type XSD.Boolean BooleanDefault3
with {
  variant "defaultForEmpty as c_defaultForEmpty_10";
  variant "element";
  //variant "text 'true' as '1'";
  //variant "text 'false' as '0'";
};


type XSD.Boolean BooleanFixed3 (c_defaultForEmpty_10)
with {
  variant "defaultForEmpty as c_defaultForEmpty_10";
  variant "element";
  //variant "text 'true' as '1'";
  //variant "text 'false' as '0'";
};


type XSD.AnySimpleType AnySimpleTypeDefault
with {
  variant "defaultForEmpty as c_defaultForEmpty_11";
  variant "element";
};


type XSD.AnySimpleType AnySimpleTypeFixed (c_defaultForEmpty_11)
with {
  variant "defaultForEmpty as c_defaultForEmpty_11";
  variant "element";
};


/* Unsupported anytype and QName and IDREFS and ENTITIES and NMTOKENS */


type XSD.AnyType AnyTypeDefault
with {
  variant "element";
};


type XSD.AnyType AnyTypeFixed
with {
  variant "element";
};


type XSD.AnyType AnyTypeDefault2
with {
  variant "element";
};


type XSD.AnyType AnyTypeFixed2
with {
  variant "element";
};


type XSD.QName QNameDefault
with {
  variant "element";
};


type XSD.QName QNameFixed
with {
  variant "element";
};


type XSD.IDREFS IDREFSDefault
with {
  variant "element";
};


type XSD.IDREFS IDREFSFixed
with {
  variant "element";
};


type XSD.NMTOKENS NMTOKENSDefault
with {
  variant "element";
};


type XSD.NMTOKENS NMTOKENSFixed
with {
  variant "element";
};


/* Check if the name conversion follows to the constants too */


type XSD.AnyType AttrfixedMyString3
with {
  variant "name as 'AttrfixedMyString3_'";
  variant "element";
};


type XSD.AnyType MyString
with {
  variant "name as 'MyString_'";
  variant "element";
};


type XSD.AnyType MyString2
with {
  variant "name as 'MyString2_'";
  variant "element";
};


type XSD.String MyString_1 (pattern "fix")
with {
  variant "name as 'MyString'";
};


type MyString_1 MyStringFixed (c_defaultForEmpty_12)
with {
  variant "defaultForEmpty as c_defaultForEmpty_12";
  variant "element";
};


type XSD.String MyString2_1
with {
  variant "name as 'MyString2'";
};


type MyString2_1 MyStringFixed2 (c_defaultForEmpty_13)
with {
  variant "defaultForEmpty as c_defaultForEmpty_13";
  variant "element";
};


type MyString_1 AttrfixedMyString3_1 (c_defaultForEmpty_12)
with {
  variant "defaultForEmpty as c_defaultForEmpty_12";
  variant "name as 'AttrfixedMyString3'";
  variant "attribute";
};


type record Complex
{
	XSD.Integer attrfixedInteger (c_defaultForEmpty_4) optional,
	MyString2_1 attrfixedMyString2 (c_defaultForEmpty_13) optional,
	AttrfixedMyString3_1 attrfixedMyString3 optional,
	MyString_1 birthPlaceAttrGroup optional,
	MyString_1 myStringFixed (c_defaultForEmpty_12),
	MyString2_1 myStringFixed2 (c_defaultForEmpty_13)
}
with {
  variant (attrfixedInteger) "defaultForEmpty as c_defaultForEmpty_4";
  variant (attrfixedInteger) "name as capitalized";
  variant (attrfixedInteger) "attribute";
  variant (attrfixedMyString2) "defaultForEmpty as c_defaultForEmpty_13";
  variant (attrfixedMyString2) "name as capitalized";
  variant (attrfixedMyString2) "attribute";
  variant (attrfixedMyString3) "name as capitalized";
  variant (attrfixedMyString3) "attribute";
  variant (birthPlaceAttrGroup) "attribute";
  variant (myStringFixed) "defaultForEmpty as c_defaultForEmpty_12";
  variant (myStringFixed) "name as capitalized";
  variant (myStringFixed2) "defaultForEmpty as c_defaultForEmpty_13";
  variant (myStringFixed2) "name as capitalized";
};


/* Enumerations */


type EnumString EnumStringFixed (c_defaultForEmpty_14)
with {
  variant "defaultForEmpty as c_defaultForEmpty_14";
  variant "element";
};


type enumerated EnumString
{
	a,
	b
}
with {
  variant "text 'a' as capitalized";
  variant "text 'b' as capitalized";
};


type EnumDate EnumDateFixed (c_defaultForEmpty_15)
with {
  variant "defaultForEmpty as c_defaultForEmpty_15";
  variant "element";
};


type enumerated EnumDate
{
	x1888_01_01,
	x1999_11_11
}
with {
  variant "text 'x1888_01_01' as '1888-01-01'";
  variant "text 'x1999_11_11' as '1999-11-11'";
};


type EnumFloat EnumFloatFixed (c_defaultForEmpty_16)
with {
  variant "defaultForEmpty as c_defaultForEmpty_16";
  variant "element";
};


type EnumFloat EnumFloatFixed2 (c_defaultForEmpty_17)
with {
  variant "defaultForEmpty as c_defaultForEmpty_17";
  variant "element";
};


type EnumFloat EnumFloatFixed3 (c_defaultForEmpty_18)
with {
  variant "defaultForEmpty as c_defaultForEmpty_18";
  variant "element";
};


type EnumFloat EnumFloatFixed4 (c_defaultForEmpty_18)
with {
  variant "defaultForEmpty as c_defaultForEmpty_18";
  variant "element";
};


type XSD.Float EnumFloat (1.0, infinity, not_a_number);


type EnumInteger EnumIntegerFixed (c_defaultForEmpty_19)
with {
  variant "defaultForEmpty as c_defaultForEmpty_19";
  variant "element";
};


type EnumInteger EnumIntegerFixed2 (c_defaultForEmpty_20)
with {
  variant "defaultForEmpty as c_defaultForEmpty_20";
  variant "element";
};


type enumerated EnumInteger
{
	int_3(-3),
	int3(3)
}
with {
  variant "useNumber";
};


type enumerated LocalEnumAttributeDefault1
{
	false_,
	true_
}
with {
  variant "text 'false_' as 'false'";
  variant "text 'true_' as 'true'";
  variant "defaultForEmpty as c_defaultForEmpty_21";
  variant "attribute";
};


type enumerated LocalEnumAttributeFixed1
{
	false_,
	true_
}
with {
  variant "text 'false_' as 'false'";
  variant "text 'true_' as 'true'";
  variant "defaultForEmpty as c_defaultForEmpty_22";
  variant "attribute";
};


type XSD.String Mystring
with {
  variant "name as uncapitalized";
};


type enumerated LocalEnumAttributeDefault2
{
	false_,
	true_
}
with {
  variant "text 'false_' as 'false'";
  variant "text 'true_' as 'true'";
  variant "defaultForEmpty as c_defaultForEmpty_23";
  variant "attribute";
};


type enumerated LocalEnumAttributeFixed2
{
	false_,
	true_
}
with {
  variant "text 'false_' as 'false'";
  variant "text 'true_' as 'true'";
  variant "defaultForEmpty as c_defaultForEmpty_24";
  variant "attribute";
};


type enumerated LocalEnumElementDefault1
{
	false_,
	true_
}
with {
  variant "text 'false_' as 'false'";
  variant "text 'true_' as 'true'";
  variant "defaultForEmpty as c_defaultForEmpty_25";
  variant "attribute";
};


type enumerated LocalEnumElementFixed1
{
	false_,
	true_
}
with {
  variant "text 'false_' as 'false'";
  variant "text 'true_' as 'true'";
  variant "defaultForEmpty as c_defaultForEmpty_26";
  variant "attribute";
};


type enumerated LocalEnumElementDefault2
{
	false_,
	true_
}
with {
  variant "text 'false_' as 'false'";
  variant "text 'true_' as 'true'";
  variant "defaultForEmpty as c_defaultForEmpty_27";
  variant "attribute";
};


type enumerated LocalEnumElementFixed2
{
	false_,
	true_
}
with {
  variant "text 'false_' as 'false'";
  variant "text 'true_' as 'true'";
  variant "defaultForEmpty as c_defaultForEmpty_28";
  variant "attribute";
};


type record Element
{
	enumerated {
		false_,
		true_
	} progress_notes_requested optional,
	enumerated {
		false_,
		true_
	} progress_notes_requested2 optional,
	record length(1 .. 5) of record {
		enumerated {
			true_,
			false_
		} localEnumElementDefault1,
		enumerated {
			true_,
			false_
		} localEnumElementDefault2
	} sequence_list
}
with {
  variant "element";
  variant (progress_notes_requested) "text 'false_' as 'false'";
  variant (progress_notes_requested) "text 'true_' as 'true'";
  variant (progress_notes_requested) "defaultForEmpty as c_defaultForEmpty_31";
  variant (progress_notes_requested) "name as 'progress-notes-requested'";
  variant (progress_notes_requested) "attribute";
  variant (progress_notes_requested2) "text 'false_' as 'false'";
  variant (progress_notes_requested2) "text 'true_' as 'true'";
  variant (progress_notes_requested2) "defaultForEmpty as c_defaultForEmpty_32";
  variant (progress_notes_requested2) "name as 'progress-notes-requested2'";
  variant (progress_notes_requested2) "attribute";
  variant (sequence_list) "untagged";
  variant (sequence_list[-]) "untagged";
  variant (sequence_list[-].localEnumElementDefault1) "defaultForEmpty as c_defaultForEmpty_29";
  variant (sequence_list[-].localEnumElementDefault1) "name as capitalized";
  variant (sequence_list[-].localEnumElementDefault1) "text 'false_' as 'false'";
  variant (sequence_list[-].localEnumElementDefault1) "text 'true_' as 'true'";
  variant (sequence_list[-].localEnumElementDefault2) "defaultForEmpty as c_defaultForEmpty_30";
  variant (sequence_list[-].localEnumElementDefault2) "name as capitalized";
  variant (sequence_list[-].localEnumElementDefault2) "text 'false_' as 'false'";
  variant (sequence_list[-].localEnumElementDefault2) "text 'true_' as 'true'";
};


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