3f84031e |
1 | /******************************************************************************* |
2 | * Copyright (c) 2000-2015 Ericsson Telecom AB |
3 | * |
4 | * XSD to TTCN-3 Translator version: CRL 113 200/5 R3B |
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_unique_e.ttcn |
13 | // Description: |
14 | // References: |
15 | // Rev: |
16 | // Prodnr: |
17 | // Updated: Tue Dec 15 11:00:27 2014 |
18 | // Contact: http://ttcn.ericsson.se |
19 | // |
20 | //////////////////////////////////////////////////////////////////////////////// |
21 | // Generated from file(s): |
22 | // - XmlTest_complex_unique_e.xsd |
23 | // /* xml version = "1.0" */ |
24 | // /* targetnamespace = "www.XmlTest.org/complex_unique/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_XmlTest_org_complex_unique { |
37 | |
38 | |
39 | import from XSD all; |
40 | |
41 | |
42 | /* This documentum tests based on |
43 | XML Schema Part 0: Primer Second Edition |
44 | 5 Advanced Concepts III. The Quantity Report |
45 | 5.1 Specifying Uniqueness |
46 | XML Schema Part 1: Structures Second Edition |
47 | 3.11.2 XML Representation of Identity-constraint Definition Schema Components */ |
48 | |
49 | |
50 | type record PurchaseReport |
51 | { |
52 | XSD.Duration period optional, |
53 | XSD.Date periodEnding optional, |
54 | RegionsType regions, |
55 | PartsType parts |
56 | } |
57 | with { |
58 | variant "name as uncapitalized"; |
59 | variant "element"; |
60 | variant (period) "attribute"; |
61 | variant (periodEnding) "attribute"; |
62 | }; |
63 | |
64 | |
65 | type record RegionsType |
66 | { |
67 | record length(1 .. infinity) of record { |
68 | XSD.PositiveInteger code optional, |
69 | record length(1 .. infinity) of record { |
70 | XSD.String number optional, |
71 | XSD.PositiveInteger quantity optional |
72 | } part_list |
73 | } zip_list |
74 | } |
75 | with { |
76 | variant (zip_list) "untagged"; |
77 | variant (zip_list[-]) "name as 'zip'"; |
78 | variant (zip_list[-].code) "attribute"; |
79 | variant (zip_list[-].part_list) "untagged"; |
80 | variant (zip_list[-].part_list[-]) "name as 'part'"; |
81 | variant (zip_list[-].part_list[-].number) "attribute"; |
82 | variant (zip_list[-].part_list[-].quantity) "attribute"; |
83 | }; |
84 | |
85 | |
86 | type record PartsType |
87 | { |
88 | record length(1 .. infinity) of record { |
89 | XSD.String number optional, |
90 | XSD.String base |
91 | } part_list |
92 | } |
93 | with { |
94 | variant (part_list) "untagged"; |
95 | variant (part_list[-]) "name as 'part'"; |
96 | variant (part_list[-].number) "attribute"; |
97 | variant (part_list[-].base) "untagged"; |
98 | }; |
99 | |
100 | |
101 | } |
102 | with { |
103 | encode "XML"; |
104 | variant "namespace as 'www.XmlTest.org/complex_unique' prefix 'r3'"; |
105 | variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; |
106 | variant "elementFormQualified"; |
107 | } |