Re: [netmod] xpath expressions in JSON

Vladimir Vassilev <vladimir@transpacket.com> Thu, 11 October 2018 11:09 UTC

Return-Path: <vladimir@transpacket.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2CAFC130E47 for <netmod@ietfa.amsl.com>; Thu, 11 Oct 2018 04:09:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bJbCOAyc-pqy for <netmod@ietfa.amsl.com>; Thu, 11 Oct 2018 04:09:15 -0700 (PDT)
Received: from mail.transpacket.com (s91205186171.blix.com [91.205.186.171]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1E63F130DE7 for <netmod@ietf.org>; Thu, 11 Oct 2018 04:09:15 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by mail.transpacket.com (Postfix) with ESMTP id 7C3001444360; Thu, 11 Oct 2018 13:09:13 +0200 (CEST)
Received: from mail.transpacket.com ([127.0.0.1]) by localhost (mail.transpacket.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id xc2uU25CEGjc; Thu, 11 Oct 2018 13:09:13 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1]) by mail.transpacket.com (Postfix) with ESMTP id 4DC96144438B; Thu, 11 Oct 2018 13:09:13 +0200 (CEST)
Received: from mail.transpacket.com ([127.0.0.1]) by localhost (mail.transpacket.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id aCWLUpeSMae6; Thu, 11 Oct 2018 13:09:13 +0200 (CEST)
Received: from [192.168.209.177] (s1853520235.blix.com [185.35.202.35]) by mail.transpacket.com (Postfix) with ESMTPSA id 0EA571444360; Thu, 11 Oct 2018 13:09:13 +0200 (CEST)
From: Vladimir Vassilev <vladimir@transpacket.com>
To: Martin Bjorklund <mbj@tail-f.com>, andy@yumaworks.com
Cc: netmod@ietf.org
References: <20181010.155915.278994099457235212.mbj@tail-f.com> <3B614CF4-9545-4C31-BEF4-CDFBF72AA045@cisco.com> <CABCOCHT32pSP3raNj6pP3BY9ji4DnOoOAaKVY7QyfV4tqqp9KA@mail.gmail.com> <20181011.083904.763170181197608903.mbj@tail-f.com> <c4b62803-ac65-5c5d-df82-715048ae6ca0@transpacket.com>
Message-ID: <4996f333-f847-2a0c-1d0d-668408c576f5@transpacket.com>
Date: Thu, 11 Oct 2018 13:09:12 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0
MIME-Version: 1.0
In-Reply-To: <c4b62803-ac65-5c5d-df82-715048ae6ca0@transpacket.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: nb
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/yorM0ZN5p-gg_XtuGt-JyWgxwIk>
Subject: Re: [netmod] xpath expressions in JSON
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 11 Oct 2018 11:09:18 -0000

On 10/11/18 11:43 AM, Vladimir Vassilev wrote:
>
> +1. This is one of the two necessary changes to make the 
> instance-identifier type canonical. Proposed changes RFC 7950:
>
> OLD:
>
> 9.13.2.  Lexical Representation
>
>    An instance-identifier value is lexically represented as a string.
>    All node names in an instance-identifier value MUST be qualified with
>    explicit namespace prefixes, and these prefixes MUST be declared in
>    the XML namespace scope in the instance-identifier's XML element.
>
>    Any prefixes used in the encoding are local to each instance
>    encoding.  This means that the same instance-identifier may be
>    encoded differently by different implementations.
>
> 9.13.3.  Canonical Form
>
>    Since the lexical form depends on the XML context in which the value
>    occurs, this type does not have a canonical form.
>
> NEW:
>
> 9.13.2.  Lexical Representation
>
>    An instance-identifier value is lexically represented as a string.
>    All node names in an instance-identifier value MUST be qualified with
>    explicit namespace prefixes where the module name is used as prefix.
>
>    All predicates must appear in alphabetical order.
>
>
> 9.13.3.  Canonical Form
>
>    Since the lexical form is encoding independent and tere is prescribed
>
>    alphabetical order of the predicates the type has a canonical form.

The order of the keys does not need to be alphabetical. It can be the 
order of the keys specified in the YANG module but currently there is no 
requirement for order at all.

Vladimir

>
>
> Vladimir
>
>
>>
>>
>>
>>
>> /martin
>>
>>
>>>
>>>>      Hmm, so you mean change the leaf "stream-xpath-filter" to say:
>>>>
>>>>               o  The set of namespace declarations has one member 
>>>> for each
>>>>                  YANG module supported by the server.  This member 
>>>> maps
>>>>                  from the YANG module name to the YANG module 
>>>> namespace.
>>>>
>>>>                  This means that in the XPath expression, the 
>>>> module name
>>>>                  serves as the prefix.
>>>>
>>>>      .... and then also give an example of this.
>>>>
>>>>      This is probably what we need to do in all places where 
>>>> yang:xpath1.0
>>>>      is used, going forward.  Maybe even define a new type
>>>>      yang:xpath1.0-2 (name?) with the set of namespace declarations
>>>>      built-in.
>>>>
>>>
>>> We should avoid making off-the-shelf implementations of standards like
>>> XPath unusable.
>>> At the very least this should be only available if the server 
>>> supports it
>>> (with a capability URI)
>>>
>>>
>>>
>>>> <RR> So we need an update to RFC7951?
>>>>
>>>> Regards,
>>>> Reshad.
>>>>
>>>>
>>> Andy
>>>
>>>
>>>>      /martin
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>      >
>>>>      > Lada
>>>>      >
>>>>      > >
>>>>      > > How is this supposed to work with JSON?
>>>>      > >
>>>>      > >
>>>>      > > /martin
>>>>      > >
>>>>      > > _______________________________________________
>>>>      > > netmod mailing list
>>>>      > > netmod@ietf.org
>>>>      > > https://www.ietf.org/mailman/listinfo/netmod
>>>>      >
>>>>      > --
>>>>      > Ladislav Lhotka
>>>>      > Head, CZ.NIC Labs
>>>>      > PGP Key ID: 0xB8F92B08A9F76C67
>>>>      >
>>>>
>>>>      _______________________________________________
>>>>      netmod mailing list
>>>>      netmod@ietf.org
>>>>      https://www.ietf.org/mailman/listinfo/netmod
>>>>
>>>>
>>>> _______________________________________________
>>>> netmod mailing list
>>>> netmod@ietf.org
>>>> https://www.ietf.org/mailman/listinfo/netmod
>>>>
>> _______________________________________________
>> netmod mailing list
>> netmod@ietf.org
>> https://www.ietf.org/mailman/listinfo/netmod
>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod