Sync with 5.4.2
[deliverable/titan.core.git] / regression_test / XML / XmlWorkflow / XmlTest_expectedTtcns / www_example_org_type_substitution_abstract_block_e.ttcn
1 /*******************************************************************************
2 * Copyright (c) 2000-2015 Ericsson Telecom AB
3 *
4 * XSD to TTCN-3 Translator version: CRL 113 200/5 R3A
5 *
6 * All rights reserved. This program and the accompanying materials
7 * are made available under the terms of the Eclipse Public License v1.0
8 * which accompanies this distribution, and is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 *******************************************************************************/
11 //
12 // File: www_example_org_type_substitution_abstract_block_e.ttcn
13 // Description:
14 // References:
15 // Rev:
16 // Prodnr:
17 // Updated: Tue Nov 17 13:25:59 2014
18 // Contact: http://ttcn.ericsson.se
19 //
20 ////////////////////////////////////////////////////////////////////////////////
21 // Generated from file(s):
22 // - type_substitution_abstract_block_e.xsd
23 // /* xml version = "1.0" encoding = "UTF-8" */
24 // /* targetnamespace = "www.example.org/type/substitution/abstract/block/e" */
25 ////////////////////////////////////////////////////////////////////////////////
26 // Modification header(s):
27 //-----------------------------------------------------------------------------
28 // Modified by:
29 // Modification date:
30 // Description:
31 // Modification contact:
32 //------------------------------------------------------------------------------
33 ////////////////////////////////////////////////////////////////////////////////
34
35
36 module www_example_org_type_substitution_abstract_block {
37
38
39 import from XSD all;
40
41
42 type ParentType_derivations Head
43 with {
44 variant "name as uncapitalized";
45 variant "element";
46 };
47
48
49 /* SUBSTITUTABLE PARENT TYPE */
50
51
52 /* type substitutiongroup generated, because has elemet declaration */
53
54
55 type record ParentType
56 {
57 record of XSD.String foo_list,
58 XSD.String bar
59 }
60 with {
61 variant "abstract";
62 variant (foo_list) "untagged";
63 variant (foo_list[-]) "name as 'foo'";
64 };
65
66
67 type RestrictedType_derivations RestrictedTypeElem
68 with {
69 variant "element";
70 };
71
72
73 /* type substitutiongroup generated, because has elemet declaration */
74
75
76 type record RestrictedType
77 {
78 record length(1 .. infinity) of XSD.String foo_list,
79 XSD.String bar
80 }
81 with {
82 variant "name as uncapitalized";
83 variant (foo_list) "untagged";
84 variant (foo_list[-]) "name as 'foo'";
85 };
86
87
88 /* type substitutiongroup generated, because the parent has elemet declaration */
89
90
91 type record RestrictedType2
92 {
93 record length(2 .. infinity) of XSD.String foo_list,
94 XSD.String bar
95 }
96 with {
97 variant "name as uncapitalized";
98 variant (foo_list) "untagged";
99 variant (foo_list[-]) "name as 'foo'";
100 };
101
102
103 /* Added to restrictedtype_derivations */
104
105
106 type record RestrictedType2_1
107 {
108 record length(2 .. 5) of XSD.String foo_list,
109 XSD.String bar
110 }
111 with {
112 variant "name as 'restrictedType2.1'";
113 variant (foo_list) "untagged";
114 variant (foo_list[-]) "name as 'foo'";
115 };
116
117
118 /* No type substitutiongroup generated, because the parent lacks elemet declaration */
119
120
121 type record RestrictedType3
122 {
123 record length(3 .. infinity) of XSD.String foo_list,
124 XSD.String bar
125 }
126 with {
127 variant "name as uncapitalized";
128 variant (foo_list) "untagged";
129 variant (foo_list[-]) "name as 'foo'";
130 };
131
132
133 type ExtendedType_derivations ExtendedElement
134 with {
135 variant "name as uncapitalized";
136 variant "element";
137 };
138
139
140 type record ExtendedType
141 {
142 XSD.String attr1 optional,
143 record of XSD.String foo_list,
144 XSD.String bar
145 }
146 with {
147 variant "name as uncapitalized";
148 variant (attr1) "attribute";
149 variant (foo_list) "untagged";
150 variant (foo_list[-]) "name as 'foo'";
151 };
152
153
154 type record RestrictedExtendedType
155 {
156 record of XSD.String foo_list,
157 XSD.String bar
158 }
159 with {
160 variant "name as uncapitalized";
161 variant (foo_list) "untagged";
162 variant (foo_list[-]) "name as 'foo'";
163 };
164
165
166 type union ParentType_derivations
167 {
168 ParentType parentType,
169 ExtendedType extendedType,
170 RestrictedExtendedType restrictedExtendedType,
171 RestrictedType restrictedType,
172 RestrictedType2 restrictedType2,
173 RestrictedType2_1 restrictedType2_1,
174 RestrictedType3 restrictedType3
175 }
176 with {
177 variant "useType";
178 variant (parentType) "name as capitalized";
179 variant (parentType) "abstract";
180 variant (extendedType) "block";
181 variant (restrictedType2_1) "name as 'restrictedType2.1'";
182 };
183
184
185 type union RestrictedType_derivations
186 {
187 RestrictedType restrictedType,
188 RestrictedType2 restrictedType2,
189 RestrictedType2_1 restrictedType2_1,
190 RestrictedType3 restrictedType3
191 }
192 with {
193 variant "name as uncapitalized";
194 variant "useType";
195 variant (restrictedType2_1) "name as 'restrictedType2.1'";
196 };
197
198
199 type union ExtendedType_derivations
200 {
201 ExtendedType extendedType,
202 RestrictedExtendedType restrictedExtendedType
203 }
204 with {
205 variant "name as uncapitalized";
206 variant "useType";
207 variant (restrictedExtendedType) "block";
208 };
209
210
211 }
212 with {
213 encode "XML";
214 variant "namespace as 'www.example.org/type/substitution/abstract/block' prefix 'tys'";
215 variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'";
216 }
This page took 0.037986 seconds and 5 git commands to generate.