51fa56b9 |
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_mod1_e.ttcn |
13 | // Description: |
14 | // References: |
15 | // Rev: |
16 | // Prodnr: |
17 | // Updated: Tue Nov 17 14:10:37 2014 |
18 | // Contact: http://ttcn.ericsson.se |
19 | // |
20 | //////////////////////////////////////////////////////////////////////////////// |
21 | // Generated from file(s): |
22 | // - type_substitution_mod1_e.xsd |
23 | // /* xml version = "1.0" encoding = "UTF-8" */ |
24 | // /* targetnamespace = "www.example.org/type/substitution/mod1/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_mod1 { |
37 | |
38 | |
39 | import from XSD all; |
40 | |
41 | |
42 | import from www_example_org_type_substitution_mod2 all; |
43 | |
44 | |
45 | /* SUBSTITUTABLE PARENT TYPE */ |
46 | |
47 | |
48 | /* type substitutiongroup generated, because has elemet declaration */ |
49 | |
50 | |
51 | type record ParentType |
52 | { |
53 | record of XSD.String foo_list, |
54 | XSD.String bar |
55 | } |
56 | with { |
3f84031e |
57 | variant "abstract"; |
58 | variant (foo_list) "untagged"; |
59 | variant (foo_list[-]) "name as 'foo'"; |
51fa56b9 |
60 | }; |
61 | |
62 | |
63 | type RestrictedType_derivations RestrictedTypeElem |
64 | with { |
3f84031e |
65 | variant "element"; |
51fa56b9 |
66 | }; |
67 | |
68 | |
69 | /* type substitutiongroup generated, because has elemet declaration */ |
70 | |
71 | |
72 | type record RestrictedType |
73 | { |
74 | record length(1 .. infinity) of XSD.String foo_list, |
75 | XSD.String bar |
76 | } |
77 | with { |
3f84031e |
78 | variant "name as uncapitalized"; |
79 | variant (foo_list) "untagged"; |
80 | variant (foo_list[-]) "name as 'foo'"; |
51fa56b9 |
81 | }; |
82 | |
83 | |
84 | /* type substitutiongroup generated, because the parent has elemet declaration */ |
85 | |
86 | |
87 | type record RestrictedType2 |
88 | { |
89 | record length(2 .. infinity) of XSD.String foo_list, |
90 | XSD.String bar |
91 | } |
92 | with { |
3f84031e |
93 | variant "name as uncapitalized"; |
94 | variant (foo_list) "untagged"; |
95 | variant (foo_list[-]) "name as 'foo'"; |
51fa56b9 |
96 | }; |
97 | |
98 | |
99 | /* Added to restrictedtype_derivations */ |
100 | |
101 | |
102 | type record RestrictedType2_1 |
103 | { |
104 | record length(2 .. 5) of XSD.String foo_list, |
105 | XSD.String bar |
106 | } |
107 | with { |
3f84031e |
108 | variant "name as 'restrictedType2.1'"; |
109 | variant (foo_list) "untagged"; |
110 | variant (foo_list[-]) "name as 'foo'"; |
51fa56b9 |
111 | }; |
112 | |
113 | |
114 | /* No type substitutiongroup generated, because the parent lacks elemet declaration */ |
115 | |
116 | |
117 | type record RestrictedType3 |
118 | { |
119 | record length(3 .. infinity) of XSD.String foo_list, |
120 | XSD.String bar |
121 | } |
122 | with { |
3f84031e |
123 | variant "name as uncapitalized"; |
124 | variant (foo_list) "untagged"; |
125 | variant (foo_list[-]) "name as 'foo'"; |
51fa56b9 |
126 | }; |
127 | |
128 | |
129 | type ExtendedType_derivations ExtendedElement |
130 | with { |
3f84031e |
131 | variant "name as uncapitalized"; |
132 | variant "element"; |
51fa56b9 |
133 | }; |
134 | |
135 | |
136 | type union ParentType_derivations |
137 | { |
138 | ParentType parentType, |
3f84031e |
139 | ExtendedType extendedType, |
140 | RestrictedExtendedType restrictedExtendedType, |
141 | RestrictedType restrictedType, |
142 | RestrictedType2 restrictedType2, |
143 | RestrictedType2_1 restrictedType2_1, |
144 | RestrictedType3 restrictedType3 |
51fa56b9 |
145 | } |
146 | with { |
3f84031e |
147 | variant "useType"; |
148 | variant (parentType) "name as capitalized"; |
149 | variant (parentType) "abstract"; |
150 | variant (extendedType) "block"; |
151 | variant (restrictedType2_1) "name as 'restrictedType2.1'"; |
51fa56b9 |
152 | }; |
153 | |
154 | |
155 | type union RestrictedType_derivations |
156 | { |
157 | RestrictedType restrictedType, |
158 | RestrictedType2 restrictedType2, |
3f84031e |
159 | RestrictedType2_1 restrictedType2_1, |
160 | RestrictedType3 restrictedType3 |
51fa56b9 |
161 | } |
162 | with { |
3f84031e |
163 | variant "name as uncapitalized"; |
164 | variant "useType"; |
165 | variant (restrictedType2_1) "name as 'restrictedType2.1'"; |
51fa56b9 |
166 | }; |
167 | |
168 | |
169 | } |
170 | with { |
3f84031e |
171 | encode "XML"; |
172 | variant "namespace as 'www.example.org/type/substitution/mod1' prefix 'tys'"; |
173 | variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; |
51fa56b9 |
174 | } |