Fix ConstraintDefinition inconsistency
[yangtools.git] / yang / yang-model-export / src / test / resources / schema-context-emitter-test / foo.xml
1 <module xmlns="urn:ietf:params:xml:ns:yang:yin:1" xmlns:foo-prefix="foo-namespace" name="foo">
2     <yang-version value="1"></yang-version>
3     <namespace uri="foo-namespace"></namespace>
4     <prefix value="foo-prefix"></prefix>
5     <organization>
6         <text></text>
7     </organization>
8     <contact>
9         <text></text>
10     </contact>
11     <revision date="2016-08-05"></revision>
12     <extension name="test-extension">
13         <status value="current"></status>
14     </extension>
15     <feature name="test-feature">
16         <status value="current"></status>
17         <description>
18             <text>test-feature description</text>
19         </description>
20         <reference>
21             <text>test-feature reference</text>
22         </reference>
23     </feature>
24     <identity name="test-identity">
25         <base name="test-base-identity"></base>
26         <status value="current"></status>
27         <description>
28             <text>test-identity description</text>
29         </description>
30         <reference>
31             <text>test-identity reference</text>
32         </reference>
33     </identity>
34     <identity name="test-base-identity">
35         <status value="current"></status>
36     </identity>
37     <typedef name="test-uint32-typedef">
38         <type name="uint32">
39             <range value="50..100">
40                 <error-message>
41                     <value>The argument is out of bounds &lt;50, 100&gt;</value>
42                 </error-message>
43                 <error-app-tag value="range-out-of-specified-bounds"></error-app-tag>
44             </range>
45         </type>
46         <units name="seconds"></units>
47         <status value="current"></status>
48     </typedef>
49     <typedef name="test-int32-typedef">
50         <type name="int32">
51             <range value="50..100">
52                 <error-message>
53                     <value>The argument is out of bounds &lt;50, 100&gt;</value>
54                 </error-message>
55                 <error-app-tag value="range-out-of-specified-bounds"></error-app-tag>
56             </range>
57         </type>
58         <status value="current"></status>
59     </typedef>
60     <typedef name="test-leafref-typedef">
61         <type name="leafref">
62             <path value="../leafref-target-leaf"></path>
63         </type>
64         <status value="current"></status>
65     </typedef>
66     <typedef name="test-iid-typedef">
67         <type name="instance-identifier">
68             <require-instance value="false"></require-instance>
69         </type>
70         <status value="current"></status>
71     </typedef>
72     <grouping name="test-grouping-1">
73         <status value="current"></status>
74         <leaf name="test-leaf-1">
75             <type name="string"></type>
76             <default value="def-val"></default>
77             <config value="true"></config>
78             <mandatory value="false"></mandatory>
79             <status value="current"></status>
80         </leaf>
81         <leaf-list name="test-leaf-list">
82             <type name="string"></type>
83             <config value="false"></config>
84             <ordered-by value="user"></ordered-by>
85             <status value="current"></status>
86         </leaf-list>
87         <list name="test-list">
88             <key value="key-leaf-1 key-leaf-2"></key>
89             <config value="true"></config>
90             <min-elements value="5"></min-elements>
91             <ordered-by value="system"></ordered-by>
92             <status value="current"></status>
93             <leaf name="key-leaf-1">
94                 <type name="string"></type>
95                 <config value="true"></config>
96                 <mandatory value="false"></mandatory>
97                 <status value="current"></status>
98             </leaf>
99             <leaf name="key-leaf-2">
100                 <type name="string"></type>
101                 <config value="true"></config>
102                 <mandatory value="false"></mandatory>
103                 <status value="current"></status>
104             </leaf>
105         </list>
106         <container name="test-container-2">
107             <presence value="false"></presence>
108             <config value="false"></config>
109             <status value="current"></status>
110         </container>
111     </grouping>
112     <grouping name="test-grouping-2">
113         <status value="current"></status>
114         <anyxml name="test-anyxml-2">
115             <config value="false"></config>
116             <mandatory value="false"></mandatory>
117             <status value="current"></status>
118         </anyxml>
119         <choice name="test-choice-2">
120             <config value="false"></config>
121             <mandatory value="false"></mandatory>
122             <status value="current"></status>
123             <case name="first">
124                 <status value="current"></status>
125                 <leaf name="first-case-leaf">
126                     <type name="string">
127                         <length value="10|15">
128                             <error-message>
129                                 <value>The argument is out of bounds &lt;10, 10&gt;</value>
130                             </error-message>
131                             <error-app-tag value="length-out-of-specified-bounds"></error-app-tag>
132                         </length>
133                     </type>
134                     <config value="false"></config>
135                     <mandatory value="false"></mandatory>
136                     <status value="current"></status>
137                 </leaf>
138             </case>
139             <case name="second">
140                 <status value="current"></status>
141                 <leaf name="second-case-leaf">
142                     <type name="int32">
143                         <range value="10|15">
144                             <error-message>
145                                 <value>The argument is out of bounds &lt;10, 10&gt;</value>
146                             </error-message>
147                             <error-app-tag value="range-out-of-specified-bounds"></error-app-tag>
148                         </range>
149                     </type>
150                     <config value="false"></config>
151                     <mandatory value="false"></mandatory>
152                     <status value="current"></status>
153                 </leaf>
154             </case>
155         </choice>
156     </grouping>
157     <anyxml name="test-anyxml">
158         <when condition="foo != 'bar'"></when>
159         <must condition="bar != 'foo'"></must>
160         <config value="true"></config>
161         <mandatory value="false"></mandatory>
162         <status value="current"></status>
163         <foo-prefix:test-extension></foo-prefix:test-extension>
164     </anyxml>
165     <leaf name="leafref-target-leaf">
166         <type name="string"></type>
167         <config value="true"></config>
168         <mandatory value="false"></mandatory>
169         <status value="current"></status>
170     </leaf>
171     <container name="test-container-1">
172         <must condition="bar != 'foo'"></must>
173         <presence value="false"></presence>
174         <config value="true"></config>
175         <status value="current"></status>
176     </container>
177     <container name="test-container-3">
178         <presence value="false"></presence>
179         <config value="true"></config>
180         <status value="current"></status>
181         <choice name="test-choice">
182             <config value="true"></config>
183             <mandatory value="false"></mandatory>
184             <status value="current"></status>
185             <case name="a">
186                 <status value="current"></status>
187                 <leaf name="case-a-leaf">
188                     <type name="int32"></type>
189                     <config value="true"></config>
190                     <mandatory value="false"></mandatory>
191                     <status value="current"></status>
192                 </leaf>
193             </case>
194             <case name="b">
195                 <status value="current"></status>
196                 <leaf name="case-b-leaf">
197                     <type name="decimal64">
198                         <fraction-digits value="3"></fraction-digits>
199                         <range value="-9223372036854775.808..9223372036854775.807">
200                             <error-message>
201                                 <value>The argument is out of bounds &lt;-9223372036854775.808, 9223372036854775.807&gt;</value>
202                             </error-message>
203                             <error-app-tag value="range-out-of-specified-bounds"></error-app-tag>
204                             <reference>
205                                 <text>https://tools.ietf.org/html/rfc6020#section-9.3.4</text>
206                             </reference>
207                         </range>
208                     </type>
209                     <config value="true"></config>
210                     <mandatory value="false"></mandatory>
211                     <status value="current"></status>
212                 </leaf>
213             </case>
214         </choice>
215         <leaf name="bits-leaf">
216             <type name="bits">
217                 <bit name="one">
218                     <position value="1"></position>
219                     <status value="current"></status>
220                 </bit>
221                 <bit name="two">
222                     <position value="2"></position>
223                     <status value="current"></status>
224                 </bit>
225             </type>
226             <config value="true"></config>
227             <mandatory value="false"></mandatory>
228             <status value="current"></status>
229         </leaf>
230         <leaf name="identityref-leaf">
231             <type name="identityref">
232                 <base name="test-base-identity"></base>
233             </type>
234             <config value="true"></config>
235             <mandatory value="false"></mandatory>
236             <status value="current"></status>
237         </leaf>
238     </container>
239     <augment target-node="/test-container-3/test-choice">
240         <status value="current"></status>
241         <case name="c">
242             <status value="current"></status>
243             <leaf name="case-c-leaf">
244                 <type name="string"></type>
245                 <config value="true"></config>
246                 <mandatory value="false"></mandatory>
247                 <status value="current"></status>
248             </leaf>
249         </case>
250     </augment>
251     <augment target-node="/test-container-1">
252         <status value="current"></status>
253         <uses name="test-grouping-1">
254             <refine target-node="test-list">
255                 <config value="true"></config>
256                 <min-elements value="5"></min-elements>
257             </refine>
258             <refine target-node="test-leaf-list">
259                 <config value="false"></config>
260             </refine>
261             <refine target-node="test-leaf-1">
262                 <default value="def-val"></default>
263                 <config value="true"></config>
264                 <mandatory value="false"></mandatory>
265             </refine>
266             <refine target-node="test-container-2">
267                 <presence value="false"></presence>
268                 <config value="false"></config>
269             </refine>
270             <augment target-node="test-container-2">
271                 <status value="current"></status>
272                 <leaf name="test-leaf-2">
273                     <type name="string"></type>
274                     <config value="true"></config>
275                     <mandatory value="false"></mandatory>
276                     <status value="current"></status>
277                 </leaf>
278             </augment>
279         </uses>
280     </augment>
281     <rpc name="test-rpc">
282         <status value="current"></status>
283         <grouping name="rpc-grouping">
284             <status value="current"></status>
285             <leaf name="rpc-grouping-leaf">
286                 <type name="string"></type>
287                 <config value="true"></config>
288                 <mandatory value="false"></mandatory>
289                 <status value="current"></status>
290             </leaf>
291         </grouping>
292         <input>
293             <leaf name="input-leaf">
294                 <type name="string"></type>
295                 <config value="true"></config>
296                 <mandatory value="false"></mandatory>
297                 <status value="current"></status>
298             </leaf>
299         </input>
300         <output>
301             <leaf name="output-leaf">
302                 <type name="string"></type>
303                 <config value="true"></config>
304                 <mandatory value="false"></mandatory>
305                 <status value="current"></status>
306             </leaf>
307         </output>
308     </rpc>
309     <notification name="test-notification">
310         <status value="current"></status>
311         <uses name="test-grouping-2">
312             <refine target-node="test-choice-2">
313                 <config value="false"></config>
314                 <mandatory value="false"></mandatory>
315             </refine>
316             <refine target-node="test-anyxml-2">
317                 <config value="false"></config>
318                 <mandatory value="false"></mandatory>
319             </refine>
320         </uses>
321     </notification>
322 </module>