[sysrepo-devel] libyang XPath changes

Radek Krejčí rkrejci at cesnet.cz
Fri Jul 14 08:36:28 UTC 2017


Hi,
currently, libyang contains, mainly due to optimizations in the simpler formats, 3 implementations of resolving some path. Using the names from the Michal's text, there are YANG XPATH (most complex not-just path), JSON (data path) and LIBYANG PATH (schema path). The YANG PATH is internally converted to LIBYANG PATH and XML to JSON. They all are defined and, more importantly, used in RFCs (ok, not LIBYANG PATH, but it is actually just an optimized YANG PATH to avoid repetitive resolving of local prefixes). The proposed JSON on schema cannot be actually implemented by the same functions as JSON on data because the tree formats differ. So we would have another (4th) implementation of go-through-tree functionality for the format which is even not used or specified in any related (talking about the schema) RFC. I would prefer to avoid this.

Regards,
Radek


Dne 14.7.2017 v 03:52 fan.changhu at zte.com.cn napsal(a):
>
> Hi,
>
> It is clear enough now, but it still has a little confusing to have two path formats in the APIs, how about using JSON in both cases? after all, as it is said in the attachment, schema path is a subset of data path, if we use the JSON  format as data path, we can also use it as schema path. 
>
> And, as another choice, the proposal in the attachment is also acceptable to me.
>
>
>
> fanchanghu
>
> fan.changhu at zte.com.cn
>
> www.zte.com.cn
>
>
>

-- 
Radek Krejci
mobile  : +420 732 212 714
office  : +420 234 680 256
e-mail  : rkrejci at cesnet.cz
LinkedIn: http://www.linkedin.com/in/radekkrejci

CESNET, Association of Legal Entities
Zikova 4
160 00 Praha 6
Czech Republic




More information about the sysrepo-devel mailing list