Sync with 5.4.2
[deliverable/titan.core.git] / regression_test / XML / XmlWorkflow / XmlTest_expectedTtcns / http_www_XmlTest_org_po_e.ttcn
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: http_www_XmlTest_org_po_e.ttcn
13 // Description:
14 // References:
15 // Rev:
16 // Prodnr:
17 // Updated: Thu Sep 5 17:34:55 2013
18 // Contact: http://ttcn.ericsson.se
19 //
20 ////////////////////////////////////////////////////////////////////////////////
21 // Generated from file(s):
22 // - po.xsd
23 // /* xml version = "1.0" */
24 // /* targetnamespace = "http://www.XmlTest.org/po/e" */
25 ////////////////////////////////////////////////////////////////////////////////
26 // Modification header(s):
27 //-----------------------------------------------------------------------------
28 // Modified by:
29 // Modification date:
30 // Description:
31 // Modification contact:
32 //------------------------------------------------------------------------------
33 ////////////////////////////////////////////////////////////////////////////////
34
35
36 module http_www_XmlTest_org_po {
37
38
39 import from XSD all;
40
41
42 /* Purchase order schema for Example.com.
43 Copyright 2000 Example.com. All rights reserved. */
44
45
46 type PurchaseOrderType PurchaseOrder
47 with {
48 variant "name as uncapitalized";
49 variant "element";
50 };
51
52
53 type XSD.String Comment
54 with {
55 variant "name as uncapitalized";
56 variant "element";
57 };
58
59
60 type record PurchaseOrderType
61 {
62 XSD.Date orderDate optional,
63 USAddress shipTo,
64 USAddress billTo,
65 Comment comment optional,
66 Items items
67 }
68 with {
69 variant (orderDate) "attribute";
70 };
71
72
73 type record USAddress
74 {
75 XSD.NMTOKEN country ("US") optional,
76 XSD.String name,
77 XSD.String street,
78 XSD.String city,
79 XSD.String state,
80 XSD.Decimal zip
81 }
82 with {
83 variant (country) "defaultForEmpty as 'US'";
84 variant (country) "attribute";
85 };
86
87
88 type record Items
89 {
90 record of record {
91 SKU partNum,
92 XSD.String productName,
93 XSD.PositiveInteger quantity (1 .. !100),
94 XSD.Decimal uSPrice,
95 Comment comment optional,
96 XSD.Date shipDate optional
97 } item_list
98 }
99 with {
100 variant (item_list) "untagged";
101 variant (item_list[-]) "name as 'item'";
102 variant (item_list[-].partNum) "attribute";
103 variant (item_list[-].uSPrice) "name as capitalized";
104 };
105
106
107 /* Stock Keeping Unit, a code for identifying products */
108
109
110 type XSD.String SKU (pattern "\d#(3)-[A-Z]#(2)");
111
112
113 }
114 with {
115 encode "XML";
116 variant "namespace as 'http://www.XmlTest.org/po'";
117 variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'";
118 }
This page took 0.034993 seconds and 5 git commands to generate.