Re: [netmod] xpath expressions in JSON

Vladimir Vassilev <vladimir@transpacket.com> Thu, 11 October 2018 11:00 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 1EE1A130E55 for <netmod@ietfa.amsl.com>; Thu, 11 Oct 2018 04:00:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-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 YtUFIG0CPpe2 for <netmod@ietfa.amsl.com>; Thu, 11 Oct 2018 04:00:30 -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 10AE6130DE5 for <netmod@ietf.org>; Thu, 11 Oct 2018 04:00:30 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by mail.transpacket.com (Postfix) with ESMTP id 5C60D14448D7; Thu, 11 Oct 2018 13:00:28 +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 SFyo8bshopDF; Thu, 11 Oct 2018 13:00:28 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1]) by mail.transpacket.com (Postfix) with ESMTP id 1F97014448DA; Thu, 11 Oct 2018 13:00:28 +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 F3pmW-R6myLc; Thu, 11 Oct 2018 13:00:28 +0200 (CEST)
Received: from [192.168.209.177] (s1853520235.blix.com [185.35.202.35]) by mail.transpacket.com (Postfix) with ESMTPSA id ECD6914448D7; Thu, 11 Oct 2018 13:00:27 +0200 (CEST)
To: Andy Bierman <andy@yumaworks.com>, Martin Bjorklund <mbj@tail-f.com>
Cc: NetMod WG <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> <CABCOCHQ58Z0TpVLGVcw_TT-OG+1pWQERyCnU7NFO_Gob7JLLcA@mail.gmail.com>
From: Vladimir Vassilev <vladimir@transpacket.com>
Message-ID: <36a3971c-d3ab-dd0f-48e5-8de0fc4cc064@transpacket.com>
Date: Thu, 11 Oct 2018 13:00:27 +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: <CABCOCHQ58Z0TpVLGVcw_TT-OG+1pWQERyCnU7NFO_Gob7JLLcA@mail.gmail.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/jGfjrfcm6whGEt9no1cI0CbhZ_A>
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:00:32 -0000

On 10/11/18 11:21 AM, Andy Bierman wrote:
>
> So you must mean the full module name will be used at every node:
>
>  /ietf-interfaces:interfaces/ietf-interfaces:interface[ietf-interfaces:name='eth0']

Length is the only real problem I see with the solution. The lexical 
representation of identityref type has made a compromise accepting 
prefix instead of module name. This has its own unsolved issues but 
those could be addressed by a limitation not allowing modules with 
identical prefix statements to define homonyme data nodes and identities 
(which is not the case currently). If this is done module name can be 
replaced with prefix and the instance-identifiers will be shorter and 
encoding independent but still Xpath 1.0 compatible:

  /if:interfaces/if:interface[if:name='eth0']

Vladimir