[YANGTOOLS-982] Split out XML attribute handling Created: 12/Apr/19 Updated: 05/Jan/24 |
|
| Status: | Confirmed |
| Project: | yangtools |
| Component/s: | codecs |
| Affects Version/s: | None |
| Fix Version/s: | 14.0.0 |
| Type: | Bug | Priority: | High |
| Reporter: | Robert Varga | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
The A much cleaner solution is possible, though, by allowing yang-data-codec-xml exposing a specialized NormalizedNodeStreamWriterExtension, which will handle XML attributes in their native format – including namespace declaration, but omitting anything that matches a metadata annotation. Define the extension and implement in both in inbound and outbound directions.
|
| Comments |
| Comment by Robert Varga [ 21/Oct/22 ] |
|
So this is more complicated than it would seem, due to the fact RFC6241 has additional requirements on <rpc/> and <rpc-reply/>: The <rpc> element has a mandatory attribute "message-id", which is a string chosen by the sender of the RPC that will commonly encode a monotonically increasing integer. and: If additional attributes are present in an <rpc> element, a NETCONF peer MUST return them unmodified in the <rpc-reply> element. This includes any "xmlns" attributes. This effectively means we need to pay further attention here and have a back channel to pass such attributes and only in contexts that are appropriate (i.e. in rpc/rpc-reply attributes, but not others) |