Subject: Re: [netmod] VRFY :Y34: remove/deprecate/replace the 'anyxml' statement (2nd try)

From: Juergen Schoenwaelder <[email-masked]>
Date: Thu, 5 Mar 2015 16:47:34 +0100

On Tue, Feb 24, 2015 at 09:37:42AM -0500, Phil Shafer wrote:
> Juergen Schoenwaelder writes:
> >I do not buy this argument. Y34 is addressing issues that have
> >surfaced with the usage of anyxml. Since we can't simple change the
> >semantics of anyxml (for backwards compatibility reasons), the obvious
> >solution is to create a replacement for the situations where "any data
> >that can be defined in YANG is needed" and to discourage the usage of
> >anyxml.
> 
> I don't understand the need to discourage the use of anyxml.  I
> don't get why it suddenly became scary or dangerous.  It's a chunk
> of XML data, which is a useful datatype regardless of the encoding
> scheme used to transport it.

We are not talking about a datatype. We are talking about arbitrary
XML inside of a data tree.
 
> anyxml is simple and easy to understand.  You may not like it or
> want to use it, but it's concrete and well defined.

It is clearly defined but I heard that implementations differ in their
support of it. And this becomes more clearly an issue in the light of
other encodings.

> In contrast, anydata implies something more intangible, where we
> are saying that there's a chunk of data here that has a data model,
> but you may not know what that model is.  This implies that you may
> or may not know how to marshal or unmarshal it, how to insert/delete/rename
> data within it, etc.  It's no longer a simple datatype.  It's alive,
> complex, and governed by unknown rules.  Yes, the server understands
> the data model (assumably), but it still seems wrong.

Anyxml says there is a chunk of arbitrary XML data, anydata says there
is a chunk of data that has a YANG data model. In other words, anydata
is a more constrained subset of anyxml. So I do not see how this could
be more intangible than anyxml. The main difference is that you can
actually apply different encoding rules to anydata while for anyxml
the encoding is hard wired (and there is not even a requirement that
there is a data model at all).

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>