netmod-wg / yang-next

Feature requests for future versions of YANG
6 stars 0 forks source link

context-independent encoding of instance-identifiers and identityrefs #56

Open mbj4668 opened 6 years ago

mbj4668 commented 6 years ago

In the XML encoding of an instance-identifier or an identityref, there are prefixes that are supposed to be defined in the XML document. This means that there is no canonical format of these values.

Also, the default value of an identityref is currently dependent on the YANG context; it uses the prefix defined in the module. If there was a canonical format (e.g. the JSON format), it should be used also for default values. Same issue for identityref values in XPath expressions in must/when.

The proposal would be to encode these like in JSON (RFC 7951)

BalazsLengyel commented 5 years ago

Support this. Using module names like in Restconf comes as an idea.

kwatsen commented 5 years ago

Minutes from a meeting

Juergen: this an encoding issue, more so than a YANG issue Martin: except perhaps for default values... Juergen: goes up to the app, not a transparent change, too late to change? Lada: would be necessary to introduce an new XML attribute

BalazsLengyel commented 5 years ago

IMHO this is also an issue for YANG XPath evaluation where specific value are often used.

kwatsen commented 2 months ago

backwards-compatibility "low" only if using same keyword, a new keyword would break clients.