/****************************************************************************** * Copyright (c) 2000-2016 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 v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Balasko, Jeno * Lovassy, Arpad * Raduly, Csaba * Szabo, Bence Janos * ******************************************************************************/ // // File: ETSI_CR5852_union_e.ttcn // Description: // References: // Rev: // Prodnr: // Updated: Thu Sep 5 17:35:03 2013 // Contact: http://ttcn.ericsson.se // //////////////////////////////////////////////////////////////////////////////// // Generated from file(s): // - ETSI_CR5852_union.xsd // /* xml version = "1.0" encoding = "UTF-8" */ // /* targetnamespace = "ETSI_CR5852_union" */ //////////////////////////////////////////////////////////////////////////////// // Modification header(s): //----------------------------------------------------------------------------- // Modified by: // Modification date: // Description: // Modification contact: //------------------------------------------------------------------------------ //////////////////////////////////////////////////////////////////////////////// module ETSI_CR5852_union_e { import from XSD all; /* EXAMPLE 5: Mapping of children of choice components // Are translated to TTCN-3 as: type record ChoiceChildMinMax { union { record length(1 .. 5) of XSD.String elem0_list, // child of choice with minOccurs different from 0 record length(0 .. 1) of XSD.String elem1_list, // first child of choice with minOccurs 0; // this alternative is to be used create an empty choice element record length(1) of XSD.String elem2_list, // second child of choice with minOccurs 0 record length(1 .. infinity) of XSD.String elem3_list // third child of choice with minOccurs 0 } choice } with { variant "element"; variant (choice) "untagged"; variant (choice.elem0_list) "untagged"; variant (choice.elem0_list[-]) "name as 'elem0'"; variant (choice.elem1_list) "untagged"; variant (choice.elem1_list[-]) "name as 'elem1'"; variant (choice.elem2_list) "untagged"; variant (choice.elem2_list[-]) "name as 'elem2'"; variant (choice.elem3_list) "untagged"; variant (choice.elem3_list[-]) "name as 'elem3'"; }; */ type record ChoiceChildMinMax { union { record length(1 .. 5) of XSD.String elem0_list, record length(0 .. 1) of XSD.String elem1_list, record length(1) of XSD.String elem2_list, record length(1 .. infinity) of XSD.String elem3_list } choice } with { variant "element"; variant (choice) "untagged"; variant (choice.elem0_list) "untagged"; variant (choice.elem0_list[-]) "name as 'elem0'"; variant (choice.elem1_list) "untagged"; variant (choice.elem1_list[-]) "name as 'elem1'"; variant (choice.elem2_list) "untagged"; variant (choice.elem2_list[-]) "name as 'elem2'"; variant (choice.elem3_list) "untagged"; variant (choice.elem3_list[-]) "name as 'elem3'"; }; /* added only to enable showing all cases in one XML instance */ type record MinOccurs_maxOccurs_frame { record of union { ChoiceChildMinMax choiceChildMinMax } choice_list } with { variant "name as uncapitalized"; variant "element"; variant (choice_list) "untagged"; variant (choice_list[-]) "untagged"; variant (choice_list[-].choiceChildMinMax) "name as capitalized"; }; } with { encode "XML"; variant "namespace as 'ETSI_CR5852_union' prefix 'etsiu'"; variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; }