netmod-wg / yang-next

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

default to namespace urn:yang:<module-name> ? #5

Open kwatsen opened 8 years ago

kwatsen commented 8 years ago

On 4/20/16, 7:47 AM, "netmod on behalf of Juergen Schoenwaelder" <netmod-bounces@ietf.org on behalf of j.schoenwaelder@jacobs-university.de> wrote:

On Tue, Apr 19, 2016 at 09:37:03PM +0200, Martin Bjorklund wrote:

But I like urn:yang: even more - and if we had this, we wouldn't have to use the "namespace" statement. Unfortunately that would require a new version of YANG...

I think we should try to move into a direction that makes things simpler and more consistent in the longer term. It is too late to address this in YANG 1.1 but clearly if I would have had this idea earlier I would have filed an issue. The urn:yang: makes it clear that

Even the IETF could in principle move to a scheme where we use

module ietf-foo { version 1.1; namespace "urn:yang:ietf-foo"; // ... }

and future versions of YANG may then even drop the namespace definition if it matches the module name, e.g., the example becomes just this:

module ietf-foo { version 1.2; // ... }

(The XML encoding specific namespace definition is removed.)

/js

PS: In hindsight, perhaps we should have used reverse DNS names for module name prefixes, i.e., org-ietf-foo instead of just ietf-foo and so we would have a reasonably reliable mechanism in place to create unique names for both SDOs and other organizations.

kwatsen commented 7 years ago

Since JSON doesn't use the namespace at all, the module-name should now be the defacto namespace for XML documents

schoenw commented 6 years ago

Not worth fixing. You want get urn:yang registered anyway.

abierman commented 1 month ago

Support auto-generation of XML namespace if namespace-stmt is missing. So many people get this field wrong and inconsistent (including yumaworks)