Re: [netmod] xpath expressions in JSON
Ladislav Lhotka <lhotka@nic.cz> Thu, 11 October 2018 06:08 UTC
Return-Path: <lhotka@nic.cz>
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 C83A21292F1 for <netmod@ietfa.amsl.com>; Wed, 10 Oct 2018 23:08:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.999
X-Spam-Level:
X-Spam-Status: No, score=-6.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nic.cz
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 v9vd6vyLcTay for <netmod@ietfa.amsl.com>; Wed, 10 Oct 2018 23:08:46 -0700 (PDT)
Received: from mail.nic.cz (mail.nic.cz [IPv6:2001:1488:800:400::400]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3E23B130E04 for <netmod@ietf.org>; Wed, 10 Oct 2018 23:08:46 -0700 (PDT)
Received: from birdie (unknown [IPv6:2a01:5e0:29:ffff:ffc6:c393:cdb9:8db1]) by mail.nic.cz (Postfix) with ESMTPSA id C2C2660134; Thu, 11 Oct 2018 08:08:44 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1539238124; bh=nEpzZnb9J8rh5eSrYmt/t3+1YUsnqXtLWCronqMKm3w=; h=From:To:Date; b=W7hd2TJXmiteL6eEVvJMWjrcVeN+3opfNOPfrMvJuK9zNQ6X2VuFT4m1XxjofNkaD WxdPyjqplwNafGod06TIq8QEUlyBOf+xFaiywP0jqjvcb4MOlCxj//hnzNxMKQi774 Am2XFxTZ6Q0t70I921ZNz/VWqE+PIrzD/2Un51bU=
Message-ID: <74ab4ac248f1933ba7a3a095eb7bb1865325588e.camel@nic.cz>
From: Ladislav Lhotka <lhotka@nic.cz>
To: Andy Bierman <andy@yumaworks.com>, "Reshad Rahman (rrahman)" <rrahman@cisco.com>
Cc: Martin Bjorklund <mbj@tail-f.com>, "netmod@ietf.org" <netmod@ietf.org>
Date: Thu, 11 Oct 2018 08:08:44 +0200
In-Reply-To: <CABCOCHT32pSP3raNj6pP3BY9ji4DnOoOAaKVY7QyfV4tqqp9KA@mail.gmail.com>
References: <20181010.131610.1510095762179710072.mbj@tail-f.com> <8736tevut6.fsf@nic.cz> <20181010.155915.278994099457235212.mbj@tail-f.com> <3B614CF4-9545-4C31-BEF4-CDFBF72AA045@cisco.com> <CABCOCHT32pSP3raNj6pP3BY9ji4DnOoOAaKVY7QyfV4tqqp9KA@mail.gmail.com>
Organization: CZ.NIC
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.30.1
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: clamav-milter 0.99.2 at mail
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/k1R1ilXlPpdq_sImiFTXwk6fDlk>
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 06:08:49 -0000
On Wed, 2018-10-10 at 19:23 -0700, Andy Bierman wrote: > > > On Wed, Oct 10, 2018 at 6:59 PM, Reshad Rahman (rrahman) <rrahman@cisco.com> > wrote: > > On 2018-10-10, 9:59 AM, "netmod on behalf of Martin Bjorklund" < > > netmod-bounces@ietf.org on behalf of mbj@tail-f.com> wrote: > > > > Ladislav Lhotka <lhotka@nic.cz> wrote: > > > Martin Bjorklund <mbj@tail-f.com> writes: > > > > > > > Hi, > > > > > > > > While reviewing restconf-notif, I saw this example: > > > > > > > > { > > > > "ietf-subscribed-notifications:input": { > > > > "stream": "NETCONF", > > > > "stream-xpath-filter": "/ds:foo/", > > > > "dscp": "10" > > > > } > > > > } > > > > > > > > Note the "stream-xpath-filter". It has a prefix in the XPath > > string. > > > > How are prefixes declared when JSON is used? > > > > > > > > The leaf "stream-xpath-filter" says: > > > > > > > > o The set of namespace declarations are those in > > scope on > > > > the 'stream-xpath-filter' leaf element. > > > > > > > > (I think I provided that text...) > > > > > > > > This assumes that the encoding is XML, or at leas that the encoding > > > > can somehow transfer namespace declarations. > > > > > > It can't. There are two options: > > > > > > 1. have different representations of this value in XML and JSON, > > > analogically to instance indentifiers (sec. 6.11 in RFC 7951). > > > > > > 2. use a module name rather than a prefix in XML, too. > > > > > > I would suggest #2. > > <RR> But that means making non-backwards compatible change to the XML > > representation? > > Not really. It means NETMOD WG would be creating its own special variant of > XPath. The thing is that XPath is "XML Path Language", so using it outside XML is problematic. Lada > > > 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 > > -- Ladislav Lhotka Head, CZ.NIC Labs PGP Key ID: 0xB8F92B08A9F76C67
- [netmod] xpath expressions in JSON Martin Bjorklund
- Re: [netmod] xpath expressions in JSON Ladislav Lhotka
- Re: [netmod] xpath expressions in JSON Martin Bjorklund
- Re: [netmod] xpath expressions in JSON Reshad Rahman (rrahman)
- Re: [netmod] xpath expressions in JSON Andy Bierman
- Re: [netmod] xpath expressions in JSON Qin Wu
- Re: [netmod] xpath expressions in JSON Martin Bjorklund
- Re: [netmod] xpath expressions in JSON Ladislav Lhotka
- Re: [netmod] xpath expressions in JSON Martin Bjorklund
- Re: [netmod] xpath expressions in JSON Martin Bjorklund
- Re: [netmod] xpath expressions in JSON Andy Bierman
- Re: [netmod] xpath expressions in JSON Vladimir Vassilev
- Re: [netmod] xpath expressions in JSON Robert Wilton
- Re: [netmod] xpath expressions in JSON Martin Bjorklund
- Re: [netmod] xpath expressions in JSON Robert Wilton
- Re: [netmod] xpath expressions in JSON Martin Bjorklund
- Re: [netmod] xpath expressions in JSON Vladimir Vassilev
- Re: [netmod] xpath expressions in JSON Vladimir Vassilev
- Re: [netmod] xpath expressions in JSON Robert Wilton
- Re: [netmod] xpath expressions in JSON Reshad Rahman (rrahman)
- Re: [netmod] xpath expressions in JSON Robert Wilton
- Re: [netmod] xpath expressions in JSON Martin Bjorklund
- Re: [netmod] xpath expressions in JSON Martin Bjorklund
- Re: [netmod] xpath expressions in JSON Andy Bierman
- Re: [netmod] xpath expressions in JSON Robert Wilton
- Re: [netmod] xpath expressions in JSON Andy Bierman
- Re: [netmod] xpath expressions in JSON Reshad Rahman (rrahman)
- Re: [netmod] xpath expressions in JSON Martin Bjorklund
- Re: [netmod] xpath expressions in JSON Robert Wilton
- Re: [netmod] xpath expressions in JSON Robert Wilton
- Re: [netmod] xpath expressions in JSON Andy Bierman
- Re: [netmod] xpath expressions in JSON Reshad Rahman (rrahman)
- Re: [netmod] xpath expressions in JSON Ladislav Lhotka
- Re: [netmod] xpath expressions in JSON Vladimir Vassilev
- Re: [netmod] xpath expressions in JSON Martin Bjorklund
- Re: [netmod] xpath expressions in JSON Ladislav Lhotka
- Re: [netmod] xpath expressions in JSON Robert Wilton
- Re: [netmod] xpath expressions in JSON Reshad Rahman (rrahman)
- Re: [netmod] xpath expressions in JSON Vladimir Vassilev
- Re: [netmod] xpath expressions in JSON Andy Bierman
- Re: [netmod] xpath expressions in JSON Juergen Schoenwaelder
- Re: [netmod] xpath expressions in JSON Martin Bjorklund
- Re: [netmod] xpath expressions in JSON Andy Bierman
- Re: [netmod] xpath expressions in JSON Andy Bierman
- Re: [netmod] xpath expressions in JSON Juergen Schoenwaelder
- Re: [netmod] xpath expressions in JSON Martin Bjorklund
- Re: [netmod] xpath expressions in JSON Andy Bierman
- Re: [netmod] xpath expressions in JSON Ladislav Lhotka
- Re: [netmod] xpath expressions in JSON Martin Bjorklund
- Re: [netmod] xpath expressions in JSON Ladislav Lhotka
- Re: [netmod] xpath expressions in JSON Qin Wu
- Re: [netmod] xpath expressions in JSON Martin Bjorklund
- Re: [netmod] xpath expressions in JSON Ladislav Lhotka
- Re: [netmod] xpath expressions in JSON Martin Bjorklund
- Re: [netmod] xpath expressions in JSON Ladislav Lhotka
- Re: [netmod] xpath expressions in JSON Martin Bjorklund
- Re: [netmod] xpath expressions in JSON Robert Wilton
- Re: [netmod] xpath expressions in JSON Ladislav Lhotka
- Re: [netmod] xpath expressions in JSON Juergen Schoenwaelder
- Re: [netmod] xpath expressions in JSON Robert Wilton
- Re: [netmod] xpath expressions in JSON Juergen Schoenwaelder
- Re: [netmod] xpath expressions in JSON Ladislav Lhotka
- Re: [netmod] xpath expressions in JSON Juergen Schoenwaelder
- Re: [netmod] xpath expressions in JSON Martin Bjorklund
- Re: [netmod] xpath expressions in JSON Kent Watsen