Sync with 5.4.0
[deliverable/titan.core.git] / regression_test / XML / HR49727 / jabber_x_data.ttcn
CommitLineData
970ed795 1/******************************************************************************
3abe9331 2 * Copyright (c) 2000-2015 Ericsson Telecom AB
970ed795
EL
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 ******************************************************************************/
8//
9// File: jabber_x_data.ttcn
10// Description:
11// References:
12// Rev:
13// Prodnr:
14// Updated: Sun Jan 6 13:51:49 2013
15// Contact: http://ttcn.ericsson.se
16//
17////////////////////////////////////////////////////////////////////////////////
18//
19// Generated from file(s):
20//
21// - x-data.xsd
22// /* xml version = "1.0" encoding = "UTF-8" */
23// /* targetnamespace = "jabber:x:data" */
24//
25////////////////////////////////////////////////////////////////////////////////
26
27////////////////////////////////////////////////////////////////////////////////
28//
29//
30//XEP-0004: Data Forms
31//
32//
33////////////////////////////////////////////////////////////////////////////////
34
35
36
37
38module jabber_x_data {
39
40
41import from XSD all;
42
43
44/* The protocol documented by this schema is defined in
45 XEP-0004: http://www.xmpp.org/extensions/xep-0004.html */
46
47
48type record X
49{
50 enumerated {
51 cancel,
52 form,
53 result,
54 submit
55 } type_,
56 //record of XSD.String instructions_list, Openfire pubsub sends title first
57 //XSD.String title optional,
58 XSD.String title optional,
59 record of XSD.String instructions_list,
60 record of Field field_list,
61 Reported reported optional,
62 record of Item item_list
63}
64with {
65variant "name as uncapitalized";
66variant "element";
67variant (type_) "name as 'type'";
68variant (type_) "attribute";
69variant (instructions_list) "untagged";
70variant (instructions_list[-]) "name as 'instructions'";
71variant (field_list) "untagged";
72variant (item_list) "untagged";
73};
74
75
76type record Field
77{
78 XSD.String label_ optional,
79 enumerated {
80 boolean_,
81 fixed,
82 hidden,
83 jid_multi,
84 jid_single,
85 list_multi,
86 list_single,
87 text_multi,
88 text_private,
89 text_single
90 } type_ optional,
91 XSD.String var_ optional,
92 XSD.String desc optional,
93 Empty required optional,
94 record of Value value_list,
95 record of Option option_list
96}
97with {
98variant "name as uncapitalized";
99variant "element";
100variant (label_) "name as 'label'";
101variant (label_) "attribute";
102variant (type_) "text 'boolean_' as 'boolean'";
103variant (type_) "text 'jid_multi' as 'jid-multi'";
104variant (type_) "text 'jid_single' as 'jid-single'";
105variant (type_) "text 'list_multi' as 'list-multi'";
106variant (type_) "text 'list_single' as 'list-single'";
107variant (type_) "text 'text_multi' as 'text-multi'";
108variant (type_) "text 'text_private' as 'text-private'";
109variant (type_) "text 'text_single' as 'text-single'";
110variant (type_) "name as 'type'";
111variant (type_) "defaultForEmpty as 'text-single'";
112variant (type_) "attribute";
113variant (var_) "name as 'var'";
114variant (var_) "attribute";
115variant (value_list) "untagged";
116variant (option_list) "untagged";
117};
118
119
120type record Option
121{
122 XSD.String label_ optional,
123 Value value_
124}
125with {
126variant "name as uncapitalized";
127variant "element";
128variant (label_) "name as 'label'";
129variant (label_) "attribute";
130variant (value_) "name as 'value'";
131};
132
133
134type XSD.String Value
135with {
136variant "name as uncapitalized";
137variant "element";
138};
139
140
141/* When contained in a "reported" element, the "field" element
142 SHOULD NOT contain a "value" child. */
143type record Reported
144{
145 record length(1 .. infinity) of Field field_list
146}
147with {
148variant "name as uncapitalized";
149variant "element";
150variant (field_list) "untagged";
151};
152
153
154type record Item
155{
156 record length(1 .. infinity) of Field field_list
157}
158with {
159variant "name as uncapitalized";
160variant "element";
161variant (field_list) "untagged";
162};
163
164
165type enumerated Empty
166{
167 x
168}
169with {
170variant "text 'x' as ''";
171variant "name as uncapitalized";
172};
173
174
175}
176with {
177encode "XML";
178variant "namespace as 'jabber:x:data'";
179variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'";
180variant "elementFormQualified";
181}
This page took 0.031777 seconds and 5 git commands to generate.