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

Martin Bjorklund <mbj@tail-f.com> Thu, 21 December 2017 10:39 UTC

Return-Path: <mbj@tail-f.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 7650B12D82D; Thu, 21 Dec 2017 02:39:50 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, 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 9aB4GkS5hT9k; Thu, 21 Dec 2017 02:39:49 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id DADA31200C1; Thu, 21 Dec 2017 02:39:48 -0800 (PST)
Received: from localhost (h-85-209.A165.priv.bahnhof.se [94.254.85.209]) by mail.tail-f.com (Postfix) with ESMTPSA id 182B31AE0311; Thu, 21 Dec 2017 11:39:48 +0100 (CET)
Date: Thu, 21 Dec 2017 11:39:47 +0100
Message-Id: <20171221.113947.2011578475461538770.mbj@tail-f.com>
To: lhotka@nic.cz
Cc: ianfarrer@gmx.com, draft-ietf-netmod-yang-tree-diagrams@ietf.org, netmod@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <1513852135.9539.15.camel@nic.cz>
References: <45E0BE8A-DA0B-459E-9757-C9817912E473@gmx.com> <1513852135.9539.15.camel@nic.cz>
X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="utf-8"
Content-Transfer-Encoding: base64
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/HUfS4zd04JfW5jABWnJj-DPdnF0>
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 10:39:50 -0000

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
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