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

Ladislav Lhotka <lhotka@nic.cz> Thu, 21 December 2017 10: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 4CC3C1200C1; Thu, 21 Dec 2017 02:28:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.009
X-Spam-Level:
X-Spam-Status: No, score=-7.009 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, T_RP_MATCHES_RCVD=-0.01, 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 amra_admI1cu; Thu, 21 Dec 2017 02:28:57 -0800 (PST)
Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) (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 984B912D77B; Thu, 21 Dec 2017 02:28:57 -0800 (PST)
Received: from birdie (unknown [IPv6:2001:1488:fffe:6:1f99:257b:62cc:c0d5]) by mail.nic.cz (Postfix) with ESMTPSA id E1B5C64452; Thu, 21 Dec 2017 11:28:55 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1513852135; bh=ma1Lg8t6gCZhSkA9O42bGqm/1BN6oq2xL0Ela70UK6o=; h=From:To:Date; b=YqtTYJphIsRV7P4u0NTpIlKnFpgDaXo+fSuLz3O2CMIRQ0Ec9kWL5IcP54FzBw/zU kc1LIAbw4eIiyvcBEo9zGCLiTOmJGuWFz6CAOmg5D8UPRLcRLHUkyXVuDjLOShp0Ui 2sm240bIxle1YdAMTOmD4LF3l91hEmLAQp0vGeVc=
Message-ID: <1513852135.9539.15.camel@nic.cz>
From: Ladislav Lhotka <lhotka@nic.cz>
To: Ian Farrer <ianfarrer@gmx.com>, draft-ietf-netmod-yang-tree-diagrams@ietf.org
Cc: netmod@ietf.org
Date: Thu, 21 Dec 2017 11:28:55 +0100
In-Reply-To: <45E0BE8A-DA0B-459E-9757-C9817912E473@gmx.com>
References: <45E0BE8A-DA0B-459E-9757-C9817912E473@gmx.com>
Organization: CZ.NIC
Content-Type: text/plain; charset="UTF-8"
X-Mailer: Evolution 3.26.3
Mime-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: clamav-milter 0.99.2 at mail
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/oiDW1vcQRXoBOR-UFLJ88oYlayA>
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:28:59 -0000

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

Lada

> 
> Thanks,
> Ian 
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
-- 
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67