Re: [netmod] xpaths and Wrapping Long Lines - draft-ietf-netmod-yang-tree-diagrams-03

Ladislav Lhotka <lhotka@nic.cz> Thu, 21 December 2017 11:28 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 6D5AF12D838; Thu, 21 Dec 2017 03:28:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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 ezgFdF-ybuAe; Thu, 21 Dec 2017 03:28:19 -0800 (PST)
Received: from trail.lhotka.name (trail.lhotka.name [77.48.224.143]) by ietfa.amsl.com (Postfix) with ESMTP id 0E7AF124D68; Thu, 21 Dec 2017 03:28:19 -0800 (PST)
Received: by trail.lhotka.name (Postfix, from userid 109) id 48DC4182040F; Thu, 21 Dec 2017 12:27:59 +0100 (CET)
Received: from localhost (nat-2.nic.cz [217.31.205.2]) by trail.lhotka.name (Postfix) with ESMTPSA id A684D18203F5; Thu, 21 Dec 2017 12:27:57 +0100 (CET)
From: Ladislav Lhotka <lhotka@nic.cz>
To: Martin Bjorklund <mbj@tail-f.com>
Cc: ianfarrer@gmx.com, draft-ietf-netmod-yang-tree-diagrams@ietf.org, netmod@ietf.org
In-Reply-To: <20171221.113947.2011578475461538770.mbj@tail-f.com>
References: <45E0BE8A-DA0B-459E-9757-C9817912E473@gmx.com> <1513852135.9539.15.camel@nic.cz> <20171221.113947.2011578475461538770.mbj@tail-f.com>
Mail-Followup-To: Martin Bjorklund <mbj@tail-f.com>, ianfarrer@gmx.com, draft-ietf-netmod-yang-tree-diagrams@ietf.org, netmod@ietf.org
Date: Thu, 21 Dec 2017 12:28:14 +0100
Message-ID: <87r2rol3qp.fsf@nic.cz>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/G0oR1v1NzJkzggEpVBE-idL78mc>
Subject: Re: [netmod] xpaths and Wrapping Long Lines - draft-ietf-netmod-yang-tree-diagrams-03
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
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, 21 Dec 2017 11:28:21 -0000

Martin Bjorklund <mbj@tail-f.com> writes:

> Ladislav Lhotka <lhotka@nic.cz> wrote:
>> Hi Ian,
>> 
>> On Thu, 2017-12-21 at 10:42 +0100, Ian Farrer wrote:
>> > Hi,
>> > 
>> > I’m just looking at the guidance on wrapping long lines given in Section 3.1.
>> > Unfortunately, this doesn’t cover the case where I refer to a long path. E.g:
>> > 
>> > augment /nat:nat/nat:instances/nat:instance/nat:mapping-table/nat:mapping-
>> > entry:
>> > 
>> > In this case, the total length (unindented) is 80 characters, 82 indented and
>> > the path is 72 characters. Moving the path onto it’s own line with indents
>> > will exceed the 72 character limit, so I need a line break in the path. What’s
>> > the correct way to do this?
>> 
>> XPath syntax permits whitespace between tokens, but the argument of "augment" is
>> a schema node identifier and not XPath. The ABNF productions for schema node
>> identifiers do not permit whitespace but you can always use string
>> concatenation:
>> 
>> augment "/nat:nat/nat:instances/nat:instance/"
>>       + "nat:mapping-table/nat:mapping-entry";
>
> But this is in the YANG source; I think Ian asked about the tree
> diagram syntax.  Maybe the corresponding syntax in the tree diagram

Oh, sorry, I thought is was about 6087bis.

Lada

> could be simply:
>
> augment /nat:nat/nat:instances/nat:instance
>         /nat:mapping-table/nat:mapping-entry:
>
> Or even simpler, maybe we can say that any string in the tree diagram
> syntax can follow the YANG string rules.
>
>
>
> /martin

-- 
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67