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_string_e.ttcn | |
13 | // Description: | |
14 | // References: | |
15 | // Rev: | |
16 | // Prodnr: | |
17 | // Updated: Thu Sep 5 17:34:59 2013 | |
18 | // Contact: http://ttcn.ericsson.se | |
19 | // | |
20 | //////////////////////////////////////////////////////////////////////////////// | |
21 | // Generated from file(s): | |
22 | // - XmlTest_string.xsd | |
23 | // /* xml version = "1.0" */ | |
24 | // /* targetnamespace = "http://www.XmlTest.org/string" */ | |
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_string_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.3 Simple Types and | |
45 | Appendix B | |
46 | XML Schema Part 2: Datatypes Second Edition | |
47 | 3 Built-in Datatypes */ | |
48 | ||
49 | ||
50 | type XSD.Name NameA | |
51 | with { | |
3f84031e | 52 | variant "element"; |
970ed795 EL |
53 | }; |
54 | ||
55 | ||
56 | type XSD.String Name; | |
57 | ||
58 | ||
59 | type Name_1 NameB | |
60 | with { | |
3f84031e | 61 | variant "name as uncapitalized"; |
62 | variant "element"; | |
970ed795 EL |
63 | }; |
64 | ||
65 | ||
66 | type XSD.String Name_1 | |
67 | with { | |
3f84031e | 68 | variant "name as 'name'"; |
970ed795 EL |
69 | }; |
70 | ||
71 | ||
72 | type XSD.String NameLength4 length(4); | |
73 | ||
74 | ||
75 | type Non_empty_string_1 Non_empty_string | |
76 | with { | |
3f84031e | 77 | variant "name as 'Non-empty-string'"; |
78 | variant "element"; | |
970ed795 EL |
79 | }; |
80 | ||
81 | ||
82 | type XSD.String Non_empty_string_1 length(3) | |
83 | with { | |
3f84031e | 84 | variant "name as 'Non-empty-string'"; |
970ed795 EL |
85 | }; |
86 | ||
87 | ||
88 | type Non_empty_string Non_empty_stringChild length(0 .. infinity) | |
89 | with { | |
3f84031e | 90 | variant "name as 'Non-empty-stringChild'"; |
970ed795 EL |
91 | }; |
92 | ||
93 | ||
94 | type XSD.String Longer_string length(5) | |
95 | with { | |
3f84031e | 96 | variant "name as 'Longer-string'"; |
970ed795 EL |
97 | }; |
98 | ||
99 | ||
3abe9331 | 100 | type XSD.String Longer_stringChild length(5) |
970ed795 | 101 | with { |
3f84031e | 102 | variant "name as 'Longer-stringChild'"; |
970ed795 EL |
103 | }; |
104 | ||
105 | ||
106 | type XSD.String StringMin length(5 .. infinity); | |
107 | ||
108 | ||
109 | type XSD.String StringMax length(0 .. 7); | |
110 | ||
111 | ||
112 | type XSD.String StringMinMax length(5 .. 7); | |
113 | ||
114 | ||
115 | type XSD.String Better_us_zipcode (pattern "[0-9]#5(-[0-9]#4)#(0,1)") | |
116 | with { | |
3f84031e | 117 | variant "name as 'better-us-zipcode'"; |
970ed795 EL |
118 | }; |
119 | ||
120 | ||
121 | /* [$\c]+ means: (dollar or NameChar) 1 or more times. | |
122 | \c inside a character class gets "folded into" it. | |
123 | It should become: (pattern "dollar-or-namechar`s=[$\w\d.\-_:]+") */ | |
124 | ||
125 | ||
126 | type XSD.String HO47449a (pattern "dollar-or-namechar`s=[$\w\d.\-_:]+"); | |
127 | ||
128 | ||
129 | /* [\]$\c\[]+ means: (] or $ or NameChar or [) 1 or more times. | |
130 | \c is still inside a character class. | |
131 | It should become: (pattern "still-inside=[\]$\w\d.\-_:\[]+") */ | |
132 | ||
133 | ||
134 | type XSD.String HO47449b (pattern "still-inside=[\]$\w\d.\-_:\[]+"); | |
135 | ||
136 | ||
137 | /* [ ]$\c[ ]+ means: space, | |
138 | followed by dollar, a NameChar, | |
139 | and another space 1 or more times. | |
140 | This time, \c is outside the character class. | |
141 | It should become: (pattern "outside=[ ]$[\w\d.\-_:][ ]+") */ | |
142 | ||
143 | ||
144 | type XSD.String HO47449c (pattern "outside=[ ]$[\w\d.\-_:][ ]+"); | |
145 | ||
146 | ||
3f84031e | 147 | type XSD.String Artf673083 (pattern "(""[\w\d:][\w\d.\-_:]*"")") |
148 | with { | |
149 | variant "name as uncapitalized"; | |
150 | }; | |
151 | ||
152 | ||
970ed795 EL |
153 | type XSD.String Mystring_1 length(4 .. infinity) |
154 | with { | |
3f84031e | 155 | variant "name as 'mystring'"; |
970ed795 EL |
156 | }; |
157 | ||
158 | ||
159 | /* Case Sensitivity Test follows: Mystring and mystring should be different */ | |
160 | ||
161 | ||
162 | type XSD.String Mystring length(4 .. infinity); | |
163 | ||
164 | ||
165 | type Type_1 Type | |
166 | with { | |
3f84031e | 167 | variant "name as uncapitalized"; |
168 | variant "element"; | |
970ed795 EL |
169 | }; |
170 | ||
171 | ||
172 | type XSD.String Type_1 | |
173 | with { | |
3f84031e | 174 | variant "name as 'type'"; |
970ed795 EL |
175 | }; |
176 | ||
177 | ||
178 | } | |
179 | with { | |
3f84031e | 180 | encode "XML"; |
181 | variant "namespace as 'http://www.XmlTest.org/string' prefix 'strng'"; | |
182 | variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; | |
970ed795 | 183 | } |