YANGTOOLS-890 - Fix XML parser bug
[yangtools.git] / yang / yang-data-codec-xml / src / test / resources / bug890 / yang / foo.yang
1 module foo {
2     yang-version 1;
3     namespace "foo";
4     prefix "foo";
5
6     revision "2018-07-10" {
7     }
8
9     grouping path-outgoing-labels_config {
10         description "Path outgoing labels grouping";
11         leaf index {
12               type uint8 {
13                 range "0..255";
14               }
15               description "Index of the label. Index 0 indicates top of the label stack";
16         }
17         leaf label {
18           type uint32;
19           description "The outgoing MPLS labels to impose";
20         }
21     }
22
23     grouping path-outgoing-labels {
24         description "Path outgoing labels grouping";
25         container outgoing-labels {
26             description "List of outgoing labels";
27             list outgoing-labels {
28                 key "index";
29                 description "Outgoing label list";
30                 leaf index {
31                     type leafref {
32                         path "../config/index";
33                     }
34                     description
35                     "Index of the label. Index 0 indicates
36                      top of the label stack";
37                 }
38                 container config {
39                     description "Configuration intended parameters";
40                     uses path-outgoing-labels_config;
41                 }
42                 container state {
43                     config false;
44                     description "Configuration applied parameters and state";
45                     uses path-outgoing-labels_config;
46                 }
47             }
48         }
49     }
50
51     container root {
52         uses path-outgoing-labels;
53     }
54 }