/******************************************************************************
* 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
*   Lovassy, Arpad
*   Raduly, Csaba
*   Szabo, Bence Janos
*
******************************************************************************/
//
//  File:          www_XmlTest_org_union.ttcn
//  Description:
//  References:
//  Rev:
//  Prodnr:
//  Updated:       Thu Sep  5 17:35:03 2013
//  Contact:       http://ttcn.ericsson.se
//
////////////////////////////////////////////////////////////////////////////////
//	Generated from file(s):
//	- XmlTest_union.xsd
//			/* xml version = "1.0" */
//			/* targetnamespace = "www.XmlTest.org/union" */
////////////////////////////////////////////////////////////////////////////////
//     Modification header(s):
//-----------------------------------------------------------------------------
//  Modified by:
//  Modification date:
//  Description:
//  Modification contact:
//------------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////


module www_XmlTest_org_union {


import from XSD all;


/* This documentum tests based on
      XML Schema Part 0: Primer Second Edition,
      2.3.2 Union Types
      Appendix B
      XML Schema Part 2: Datatypes Second Edition */


type union MyUnion1
{
	XSD.Float float_,
	XSD.Boolean boolean_
}
with {
  variant "useUnion";
  variant (float_) "name as 'float'";
  variant (boolean_) "name as 'boolean'";
  //variant (boolean_) "text 'true' as '1'";
  //variant (boolean_) "text 'false' as '0'";
};


type union MyUnion2
{
	XSD.String string,
	XSD.Boolean boolean_
}
with {
  variant "useUnion";
  variant (boolean_) "name as 'boolean'";
  //variant (boolean_) "text 'true' as '1'";
  //variant (boolean_) "text 'false' as '0'";
};


type union MyUnion3
{
	XSD.String string,
	XSD.Boolean boolean_,
	XSD.Decimal decimal,
	XSD.Time time,
	XSD.Float float_,
	XSD.Double double
}
with {
  variant "useUnion";
  variant (boolean_) "name as 'boolean'";
  //variant (boolean_) "text 'true' as '1'";
  //variant (boolean_) "text 'false' as '0'";
  variant (float_) "name as 'float'";
};


type XSD.Boolean Result;
//with {
  //variant "text 'true' as '1'";
  //variant "text 'false' as '0'";
//};


type MyUnion1 MyUnion4
with {
  variant "element";
};


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