On Wed, 2017-11-15 at 08:24 +0100, Martin Bjorklund wrote:
> Ladislav Lhotka <[email protected]> wrote:
> > On Wed, 2017-11-15 at 08:00 +0100, Martin Bjorklund wrote:
> > > Balazs Lengyel <[email protected]> wrote:
> > > > See bellow!
> > > > 
> > > > 
> > > > On 2017-11-15 05:22, Juergen Schoenwaelder wrote:
> > > > > In XML land, this is mostly a change of the namespace (not of the
> > > > > prefix) if one keeps the same structure, no? In JSON land, the change
> > > > > of the module name more directly becomes visible in instance data; but
> > > > > this is all encoding details.
> > > > 
> > > > BALAZS: Even in XMLland we store the prefix as part of any leaf with
> > > > type instance-identifier or identityref and potentially CLI scripts.
> > > 
> > > This would be a broken implementation.  Since the prefix might change
> > > you cannot store them as is.  You have to translate the prefix to
> > > namespace/module name, and store that.
> > 
> > I agree. In XML land, there was a lot of software that relied on specific
> > prefixes, and it turned out to be a big problem.
> > 
> > > 
> > > That said, this encoding rule is really unfortunate.  We fixed it in
> > > the JSON encoding, and I wish we had the same in XML...
> > 
> > Prefixes still give you some flexibility, for example the ability to import 
> > two
> > different revisions of the same module.
> 
> Sure, but that's not reflected in the encoding on-the-wire.

XML has its own rules, so unless tools take a specific prefix for granted,
everything should be OK. One can also declare full module names as NS prefixes
in XML encoding to make it closer to JSON encoding.

The only minor problem is the paragraph in sec. 7.1.4 of RFC 7950 stating that
XML and XPath SHOULD use the prefix defined in YANG. IMO, this should be removed
(but, after all, it is only a SHOULD).

Lada

> 
> 
> /martin
-- 
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to