Re: [netmod] xpath expressions in JSON

Andy Bierman <andy@yumaworks.com> Thu, 11 October 2018 16:52 UTC

Return-Path: <andy@yumaworks.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 A327F130EC6 for <netmod@ietfa.amsl.com>; Thu, 11 Oct 2018 09:52:55 -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, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks-com.20150623.gappssmtp.com
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 ovwwXt2ukP0p for <netmod@ietfa.amsl.com>; Thu, 11 Oct 2018 09:52:53 -0700 (PDT)
Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 442FA130EC5 for <netmod@ietf.org>; Thu, 11 Oct 2018 09:52:53 -0700 (PDT)
Received: by mail-lj1-x234.google.com with SMTP id u21-v6so8852516lja.8 for <netmod@ietf.org>; Thu, 11 Oct 2018 09:52:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=0m0YJuae2wnd98hPxRgs3JF2IjeQ+OCG1Im/6NecqIE=; b=KTflXcPeoGIvneu3hT2n2+UJq74zdfwYmiZnpE+OIw3w+8tm/hd96/wevi3i032S9l Xg2sti2DbyxyvV/EFVoBjgkD8ETVh5r9836nX542wVvmzmA6iyveougTgiS0eVXoRduN XLztzStDlGslBySoCTyaiWRZbe1+nEQ94blRrlDBr0lPW198Hm57WDMM/kNKVWbg31gY agkujkff00P5cHBZOiU99gsYXrjsX5H9VKPefhdf1YQkHPI2BKt+rh9KyYLUv9GWF4sF h0myBne5sA8rhSKU9tQoljp8ybgu9OCaCnWNEfubO9f6XGhFxQ9UVBlcTxHL2xIPy298 qt6w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=0m0YJuae2wnd98hPxRgs3JF2IjeQ+OCG1Im/6NecqIE=; b=TxENiBPl4CIOdZCXu1K+Cx2scK0o0OmjlYoeJDyt6R8C0iwcoJ1zFS/h0pLmcviXfl hb9pEz0rhkkdJmPUiLcNwFNF6H5GhsRBfRqRj4Nlcmus1YLdcA0M17ypNS+l7akUI6A5 mUTHS0+/D20Uc1IvtsB72LwQ5aq05uz5CAXN6Qh8N31eEghVJ8D0EAaeBqoqZT76oTfm 3kJSuhU6JhVd4NvO+g7Xnj2haUfG0JarKpv7sQhPGFsl8SXoGqICJL8YRP1xSgxZBCex TkbIi0trLe1XY8Cup0JBwMmvNkN6zPc80e8IARyfuOtf/BFkwPJPu3AfqmrXGe0zHzyJ GHsg==
X-Gm-Message-State: ABuFfojmP+ez64rX96/i6yYu8U87+FuXvYZdHwvwT9aV0JRq1WDTT5uL 1KZkrnOsNQ7lRRpweub286kRiP7QKSYTsCx0KBeFk/ht
X-Google-Smtp-Source: ACcGV63LNuPzWrE+MPoClLrbBkj9DzOkcoHCVn5vCI6eqo4Z2QegY+JkaF1u97CXxhwih202rf3tNjIOiv4cz2AI72I=
X-Received: by 2002:a2e:1456:: with SMTP id 22-v6mr1747432lju.116.1539276771166; Thu, 11 Oct 2018 09:52:51 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a19:f811:0:0:0:0:0 with HTTP; Thu, 11 Oct 2018 09:52:49 -0700 (PDT)
In-Reply-To: <329f67ff-0774-0fd7-f630-7a01c7e7d3be@cisco.com>
References: <461820e8-4ed9-823b-a2c4-a04c74e4f7c1@cisco.com> <20181011.125007.434815114996317742.mbj@tail-f.com> <7a9b1a5f-db66-7431-a2c7-82acebb2082b@cisco.com> <20181011.181150.1840683183107627057.mbj@tail-f.com> <329f67ff-0774-0fd7-f630-7a01c7e7d3be@cisco.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Thu, 11 Oct 2018 09:52:49 -0700
Message-ID: <CABCOCHTV_-9b0xjcrO=UEyc15xvzYGAQg9CSqEu9qQ0eDSpJVA@mail.gmail.com>
To: Robert Wilton <rwilton@cisco.com>
Cc: Martin Bjorklund <mbj@tail-f.com>, NetMod WG <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000002838e70577f6cd3a"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/9SCfrXyLatZegHFvKRWMJzxL10E>
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 16:52:56 -0000

On Thu, Oct 11, 2018 at 9:45 AM, Robert Wilton <rwilton@cisco.com> wrote:

>
> ....
>
>>
>> Finally, I'm trying to figure out have RFC 8040 query parameter (sect
>>> 4.8.4), which also uses XPath expressions is meant to work. That
>>> states:
>>>
>>> The set of namespace declarations is the set of prefix and
>>>        namespace pairs for all supported YANG modules, where the prefix
>>>        is the YANG module name and the namespace is as defined by the
>>>        "namespace" statement in the YANG module.
>>>
>> Perfect!  It seems the authors of 8040 thought of this ;-)
>>
> OK, what you propose would at least be consistent with how the XPath is
> formed in sec 8040, 4.8.4?
>
> I can live with that.  But still strongly think that WG should think of
> trying to move YANG on from Xpath 1.0.
>


I do not agree YANG should change any statements where XPath is being used.
(Note that leafs like the filter are free to use whatever data type they
want, including yang:xpath1.0).

The WG is on the right track already wrt/ XPath by creating custom XPath
functions
like 'deref' that simplify syntax or extend functionality.



>
>> Yet the examples in section 8.3.6 don't seem to use namespace prefixes
>>> in very many places, e.g. why is it "/example-mod:event1/name='joe'"
>>> and not "/example-mod:event1/example-mod:name='joe'"?  Is the example
>>> wrong, or otherwise what am I missing? :-)
>>>
>> It seems the example is wrong!
>>
> Please can you check section 8040, 8.3.6.  Are all the examples wrong?
>
> Thanks,
> Rob
>
>
>>
>> /martin
>> .
>>
>>
>

Andy