[YANGTOOLS-1108] Leaf of type union containing identity-ref is not correctly transformed to XML Created: 03/Jun/20 Updated: 04/Jun/20 Resolved: 04/Jun/20 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 3.0.12, 5.0.3, 4.0.10 |
| Type: | Bug | Priority: | Medium |
| Reporter: | Anna Bencúrová | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
If some leaf has type union, which is containing also identity-ref, NormalizedNode with filled this leaf with some identity is not correctly rendered to XML. E.g.:
module foo {
namespace "foo-namespace";
prefix "f";
identity ident-base;
identity ident-one {
base ident-base;
}
...
leaf union-identityref-leaf {
type union-type;
}
leaf identityref-leaf {
type identityref {
base ident-base;
}
}
...
}
If both leaves will have set as value identity ident-one, the XML converted output will be following: <identityref-leaf>ident-one</identityref-leaf> The leaf identityref-leaf is converted correctly, but union-identityref-leaf with union has string QName included, which will not be converted using opposite direction. |
| Comments |
| Comment by Robert Varga [ 04/Jun/20 ] |
|
Yeah, this is caused by XML writeout path going in the completely wrong legacy direction with codecs. |