On 04/04/2022 13:48, Jernej Tuljak wrote:
> If both "leaf" data nodes are instantiated (XML encoding) as part of <rpc> for "foo", does <x> come before or after <y> (in document order)?Augmented-in nodes come after other nodes.Maybe this is an implementation convention, but the RFC says they are encoded in any order.https://datatracker.ietf.org/doc/html/rfc7950#section-7.17.2You are referring to this: When a node is augmented, the augmenting child nodes are encoded as subelements to the augmented node, in any order.This implies interleaving of augmenting and non-augmenting child nodes within "input" parameters for XML encoding?
Yes. There is no semantic difference in directly-defined on augmenting nodes, especially in 'uses/augment' case -- they share the same namespace, so at the document level (i.e. effective model) there is no difference between the two.
Any ordering should be treated as an implementation artifact. In particular this declaration:
rpc foo {
grouping foo {
container foo {
leaf foo {
type string;
}
}
}
input {
uses foo {
augment foo {
leaf bar {
type uint8;
}
}
}
}
}
is completely equivalent to:
rpc foo {
input {
container foo {
leaf bar {
type uint8;
}
leaf foo {
type string;
}
}
}
}
The presence of the intermediate grouping is a pure module-internal
modeling detail. I believe introducing/removing the grouping is a
non-breaking change as per RFC6020 (if memory serves right).
Regards, Robert
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
