Commit | Line | Data |
---|---|---|
970ed795 EL |
1 | /******************************************************************************* |
2 | * Copyright Ericsson Telecom AB | |
3 | * | |
4 | * XSD to TTCN-3 Translator | |
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_XmlTest_org_complex_choice_e.ttcn | |
13 | // Description: | |
14 | // References: | |
15 | // Rev: | |
16 | // Prodnr: | |
17 | // Updated: Thu Sep 5 17:35:04 2013 | |
18 | // Contact: http://ttcn.ericsson.se | |
19 | // | |
20 | //////////////////////////////////////////////////////////////////////////////// | |
21 | // Generated from file(s): | |
22 | // - XmlTest_complex_choice.xsd | |
23 | // /* xml version = "1.0" */ | |
24 | // /* targetnamespace = "www.XmlTest.org/complex_choice" */ | |
25 | //////////////////////////////////////////////////////////////////////////////// | |
26 | // Modification header(s): | |
27 | //----------------------------------------------------------------------------- | |
28 | // Modified by: | |
29 | // Modification date: | |
30 | // Description: | |
31 | // Modification contact: | |
32 | //------------------------------------------------------------------------------ | |
33 | //////////////////////////////////////////////////////////////////////////////// | |
34 | ||
35 | ||
36 | module www_XmlTest_org_complex_choice_e { | |
37 | ||
38 | ||
39 | import from XSD all; | |
40 | ||
41 | ||
42 | /* This documentum tests based on | |
43 | XML Schema Part 0: Primer Second Edition | |
44 | 2.7 Building Content models */ | |
45 | ||
46 | ||
47 | type record Lesson | |
48 | { | |
49 | XSD.Time starts optional, | |
50 | union { | |
51 | XSD.String english, | |
52 | XSD.String math, | |
53 | Nature nature, | |
54 | Lab lab | |
55 | } choice | |
56 | } | |
57 | with { | |
3f84031e | 58 | variant (starts) "name as capitalized"; |
59 | variant (starts) "attribute"; | |
60 | variant (choice) "untagged"; | |
61 | variant (choice.english) "name as capitalized"; | |
62 | variant (choice.math) "name as capitalized"; | |
63 | variant (choice.nature) "name as capitalized"; | |
64 | variant (choice.lab) "name as capitalized"; | |
970ed795 EL |
65 | }; |
66 | ||
67 | ||
68 | type union Nature | |
69 | { | |
70 | XSD.String physics, | |
71 | XSD.String chemistry | |
72 | } | |
73 | with { | |
3f84031e | 74 | variant "untagged"; |
75 | variant (physics) "name as capitalized"; | |
76 | variant (chemistry) "name as capitalized"; | |
970ed795 EL |
77 | }; |
78 | ||
79 | ||
80 | type record Lab | |
81 | { | |
82 | XSD.String measurement, | |
83 | XSD.String evaluation | |
84 | } | |
85 | with { | |
3f84031e | 86 | variant "untagged"; |
87 | variant (measurement) "name as capitalized"; | |
88 | variant (evaluation) "name as capitalized"; | |
970ed795 EL |
89 | }; |
90 | ||
91 | ||
92 | type Lesson MyLessonElement | |
93 | with { | |
3f84031e | 94 | variant "element"; |
970ed795 EL |
95 | }; |
96 | ||
97 | ||
98 | type record Lesson2 | |
99 | { | |
100 | XSD.Time starts optional, | |
101 | union { | |
102 | XSD.String english, | |
103 | XSD.String math, | |
104 | union { | |
105 | XSD.String physics, | |
106 | XSD.String chemistry | |
107 | } choice, | |
108 | record { | |
109 | XSD.String measurement, | |
110 | XSD.String evaluation | |
111 | } sequence | |
112 | } choice | |
113 | } | |
114 | with { | |
3f84031e | 115 | variant (starts) "name as capitalized"; |
116 | variant (starts) "attribute"; | |
117 | variant (choice) "untagged"; | |
118 | variant (choice.english) "name as capitalized"; | |
119 | variant (choice.math) "name as capitalized"; | |
120 | variant (choice.choice) "untagged"; | |
121 | variant (choice.choice.physics) "name as capitalized"; | |
122 | variant (choice.choice.chemistry) "name as capitalized"; | |
123 | variant (choice.sequence) "untagged"; | |
124 | variant (choice.sequence.measurement) "name as capitalized"; | |
125 | variant (choice.sequence.evaluation) "name as capitalized"; | |
970ed795 EL |
126 | }; |
127 | ||
128 | ||
129 | type record Lesson3 | |
130 | { | |
131 | XSD.Time starts optional, | |
132 | union { | |
133 | XSD.String english, | |
134 | XSD.String math, | |
135 | record { | |
136 | union { | |
137 | XSD.String physics, | |
138 | XSD.String chemistry | |
139 | } choice | |
140 | } nature, | |
141 | record { | |
142 | XSD.String measurement, | |
143 | XSD.String evaluation | |
144 | } lab | |
145 | } choice | |
146 | } | |
147 | with { | |
3f84031e | 148 | variant (starts) "name as capitalized"; |
149 | variant (starts) "attribute"; | |
150 | variant (choice) "untagged"; | |
151 | variant (choice.english) "name as capitalized"; | |
152 | variant (choice.math) "name as capitalized"; | |
153 | variant (choice.nature) "name as capitalized"; | |
154 | variant (choice.nature.choice) "untagged"; | |
155 | variant (choice.nature.choice.physics) "name as capitalized"; | |
156 | variant (choice.nature.choice.chemistry) "name as capitalized"; | |
157 | variant (choice.lab) "name as capitalized"; | |
158 | variant (choice.lab.measurement) "name as capitalized"; | |
159 | variant (choice.lab.evaluation) "name as capitalized"; | |
970ed795 EL |
160 | }; |
161 | ||
162 | ||
163 | } | |
164 | with { | |
3f84031e | 165 | encode "XML"; |
166 | variant "namespace as 'www.XmlTest.org/complex_choice' prefix 'ns40'"; | |
167 | variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; | |
970ed795 | 168 | } |