Re: [netmod] Whitespace in XML encoding - allowed ?
Balázs Lengyel <balazs.lengyel@ericsson.com> Tue, 09 October 2018 10:02 UTC
Return-Path: <balazs.lengyel@ericsson.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 F3265131252 for <netmod@ietfa.amsl.com>; Tue, 9 Oct 2018 03:02:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.587
X-Spam-Level:
X-Spam-Status: No, score=-2.587 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FROM_EXCESS_BASE64=0.979, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.723, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=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=ericsson.com header.b=enPUVTDf; dkim=pass (1024-bit key) header.d=ericsson.com header.b=lISYjUhV
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 cZo2X_RRKbH4 for <netmod@ietfa.amsl.com>; Tue, 9 Oct 2018 03:02:51 -0700 (PDT)
Received: from sesbmg23.ericsson.net (sesbmg23.ericsson.net [193.180.251.37]) (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 7FE82131254 for <netmod@ietf.org>; Tue, 9 Oct 2018 03:02:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; d=ericsson.com; s=mailgw201801; c=relaxed/simple; q=dns/txt; i=@ericsson.com; t=1539079368; x=1541671368; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=HZvs5FcpGE2hrAMWi7U0cjkA8Ecpf1pNPoRZhtfUeCo=; b=enPUVTDfskN1rrkC4HFyI2oNhltK1SNcLfoTS9pxHpgooB8aLr5C4Yeg9E02iP09 RYqyb27QVrKcDQ4iPelTPhQQzINyUt//XJnTQrJ1Xg5xw96p/fpqbpG5BVkZ5OFP i0lHzQTmX3/A+mcntF8iffEIti3nL5NCqkJyh8gyej0=;
X-AuditID: c1b4fb25-573ff700000018b4-22-5bbc7cc8a629
Received: from ESESBMB504.ericsson.se (Unknown_Domain [153.88.183.117]) by sesbmg23.ericsson.net (Symantec Mail Security) with SMTP id 70.9D.06324.8CC7CBB5; Tue, 9 Oct 2018 12:02:48 +0200 (CEST)
Received: from ESESSMR502.ericsson.se (153.88.183.110) by ESESBMB504.ericsson.se (153.88.183.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Tue, 9 Oct 2018 12:02:48 +0200
Received: from ESESBMB501.ericsson.se (153.88.183.168) by ESESSMR502.ericsson.se (153.88.183.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Tue, 9 Oct 2018 12:02:48 +0200
Received: from EUR01-HE1-obe.outbound.protection.outlook.com (153.88.183.157) by ESESBMB501.ericsson.se (153.88.183.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3 via Frontend Transport; Tue, 9 Oct 2018 12:02:48 +0200
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JNhuZIKaWZmThfw3DyYpHH/brRY36bgJCTQVszh+Lg8=; b=lISYjUhVZKp5Um/8nxau7ZFDpKUq6nSwY0gtsk2CUtReoOk4pvdDjjOjT1axGN3uinonxHCtsgzJDkjXblbEnUA24CSh3GsbCxVgRkVXvOY4XoRuivW1YiNK92xS+BM336oSOu0Dcpm4Lornhgb1saLWH6Sh5aLE7zcUtaNRriQ=
Received: from VI1PR0701MB2736.eurprd07.prod.outlook.com (10.173.80.148) by VI1PR0701MB2126.eurprd07.prod.outlook.com (10.169.137.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.10; Tue, 9 Oct 2018 10:02:47 +0000
Received: from VI1PR0701MB2736.eurprd07.prod.outlook.com ([fe80::4e4:6761:27d5:5bd]) by VI1PR0701MB2736.eurprd07.prod.outlook.com ([fe80::4e4:6761:27d5:5bd%10]) with mapi id 15.20.1228.020; Tue, 9 Oct 2018 10:02:47 +0000
From: Balázs Lengyel <balazs.lengyel@ericsson.com>
To: Qin Wu <bill.wu@huawei.com>, "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: Whitespace in XML encoding - allowed ?
Thread-Index: AQHUX65zMY3LKhsc8UeIQzNDxdo7xaUWoQpAgAAN+YA=
Date: Tue, 09 Oct 2018 10:02:47 +0000
Message-ID: <737c9830-67d3-2e18-aa3f-35b40559d47d@ericsson.com>
References: <14e78aaa-4508-970a-d1a0-e091ffaf5c8e@ericsson.com> <B8F9A780D330094D99AF023C5877DABA9B05FD49@nkgeml513-mbx.china.huawei.com>
In-Reply-To: <B8F9A780D330094D99AF023C5877DABA9B05FD49@nkgeml513-mbx.china.huawei.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
x-originating-ip: [89.135.192.225]
user-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1
x-clientproxiedby: KL1PR0601CA0015.apcprd06.prod.outlook.com (2603:1096:802:1::25) To VI1PR0701MB2736.eurprd07.prod.outlook.com (2603:10a6:801:8::20)
authentication-results: spf=none (sender IP is ) smtp.mailfrom=balazs.lengyel@ericsson.com;
x-ms-exchange-messagesentrepresentingtype: 1
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; VI1PR0701MB2126; 6:rvvO0bI6DpCAWJReh3eZSdFvwtPIhpL2w7ismI1xscZYmt7Ia7p6QaDgQ3eTvGXoP2pAV4o1vfkeRucYZ4N6ELD7H04+4ApdecrSHGwLz5r7n/pJHlbcv051+V/JoKVKIfQD3eg99Ga+Ner0M/kzxyT8BQbYUfMScuoBI5SzT+R43oOz9nUBz6NyBDpjCKh+eVEiPfAl42pXPhu1OC0cdZThpt8CwpZlTI+yrkylRGcaKSfa2AIk1QFBzA1zvQMEStogu6TaoHWByMbJ/hMJTN+7+E21e6HLrdrD1t5/Po9YaCMhtJpEGzeexYMAPEDMOVGpJHmmba0Sbyw4u3QhyPsjaDvhi14cb20alfAlN98t9W2Sd+GRg3gssRMN2tuxIVfbolpX6Vc1oXldCKg4UEc7911Aa0oo3LQ9Z+C/W0KMECJfKx9qXhbW5aXqYof9FHOoXp1qoH9yZWKSc+7S6Q==; 5:NVJctP8IW0oUUjEZ6bmJv/yZecBNSVbijFdud/bH6TASRdyZiOwEE14jtx499dWdiLCj5ke4N9ZawaYO5SAer8cjme5GbnLyj4Xw5s6h8dNMVrlr8zAL2BJq8fi7Bc9pGMentHwbIqZoXcQPMRMJyghua35uIY2F0SAbgJv4yQw=; 7:kSTxbMuh+TxYuGeyEXG78NKCF+p7td4ZClGpXmu1RhbbLPoM0547VfGtD0Vze7anvMG1a65byFtA3cLCvbMYpALykHbYE/HsOdWyhOKCbzXxMkDoot0osWzYaIqVpF16fAHCoFQ8Bsnf8m/JwmXEv9FfmsMr6/b2SwV2zZJF0368k9l/u2iLQcFyTo7HCo4vC/1RPvXKmigCIcMAF3Ocxl2pum0cKE4Pmh2InP2UiWwDkmOiIJIEM/PLxS1EOw6o
x-ms-office365-filtering-correlation-id: 31d8a128-2732-4226-a43b-08d62dce5bd7
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(49563074)(7193020); SRVR:VI1PR0701MB2126;
x-ms-traffictypediagnostic: VI1PR0701MB2126:
x-microsoft-antispam-prvs: <VI1PR0701MB2126DD26004D3A3894D171D4F0E70@VI1PR0701MB2126.eurprd07.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(37575265505322)(248295561703944)(50582790962513);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(102415395)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(3231355)(944501410)(4983020)(4982022)(52105095)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(201708071742011)(7699051); SRVR:VI1PR0701MB2126; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0701MB2126;
x-forefront-prvs: 08200063E9
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(396003)(376002)(136003)(39860400002)(366004)(199004)(252514010)(189003)(606006)(476003)(2616005)(14454004)(2906002)(68736007)(76176011)(8676002)(81156014)(81166006)(7736002)(6436002)(6486002)(71200400001)(71190400001)(85202003)(106356001)(105586002)(102836004)(65806001)(256004)(446003)(31696002)(3260700006)(64126003)(11346002)(25786009)(65956001)(66066001)(86362001)(8936002)(966005)(486006)(36756003)(85182001)(478600001)(66574009)(58126008)(186003)(97736004)(386003)(6506007)(5660300001)(110136005)(99286004)(65826007)(52116002)(316002)(5250100002)(6246003)(53376002)(2501003)(236005)(6512007)(54896002)(6306002)(6116002)(790700001)(53936002)(99936001)(3846002)(26005)(2900100001)(31686004)(229853002)(18717965001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0701MB2126; H:VI1PR0701MB2736.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts)
x-microsoft-antispam-message-info: r5GI34/Fsh5HNaOgucwQk2mnc2tLRSyV6SWGvyerjKhtpFdtCM4ijMTTtzK9WA1+v1WxTqkjl1uMZ8J/yCFcwQXe6gJI/GU7+LwM8M7YVfepXRBEVcMAdoABwOhTMTjLTI1fT5/uFYOwkvAzxRdBJGxMK+F0l9W5x9DmPGZ4osJSt158vgmQPy6h7t5bnBrFGAV29U5NA3FygH7BRi3MGP+QJXtp5hjsDOedIea+BLgAn+tG7n70r58bML0/1DNTRJd9vF0DCXbJNZvgNekvnlCfFg5tahYzKERszPEg5GjP9yrvgLJ5KCwY/P9arcgSoOOXTwRqXndIOA/Bd63ktyIvjSglMfzAe+iM2wq6x+s=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha-256"; boundary="------------ms060408050305040505060107"
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: 31d8a128-2732-4226-a43b-08d62dce5bd7
X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Oct 2018 10:02:47.0313 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0701MB2126
X-OriginatorOrg: ericsson.com
X-Brightmail-Tracker: H4sIAAAAAAAAA1WSa0iTURjHO3v3bq+jxXG6fNL2oaFSVpqXyOxOwQzphhHh6DLzRcW5yaai 5ocFmtORWBluU9FIBqmUecmQhSkpmoXaIkFCmxuZl6VBS1PMtr0z6tvvf/7P/3mewzkUIZgg A6l0RTatUsjkYg6PbbjcmbN3oNAs3bdSFRFrq60nY+tGb5HHWfFFrx1kfEPDL9Z5VhLvcAot T8+lVRFHr/PSVqzlZJa9GuXpG301aKkYlSGKAhwDgxMFZYhHCXAfArvhGWKEE4FpxsL5K5bn uliMeMSCWY2FcAs2riBg/VMnl3EesKDJ+YPNiCkEI90LLseH4uBTUPKtm+VmfxcPTGpJN/vh aKiZq+Yw5zHg6LhDMBwHpfpR5GY2Dob7j2s8zMfHQD9f6d1Dh6Bket0T8MGXQN867RmA8FZY etPsYQIHwLi9zsOA/cE6OsRhWAgztt8kw2LQz457WIivQNGgkXQPAGxAsDZ8z9v0KpgntN7w Hng3ZkcMi+B9nQ4xgVdc0LVpCcY4A4tNNi5jWBAYWszcjfR8e7O3SAmOMS2nAkUZ/9nW6MoQ uBRBxdsurtFzb18YNNjZRteLETgUTMXi/+vdvBtMD+cIhg+BfqWHw/AOqNRZuQzvh7m+74jh aDA9WePUI14jEqppdXJmalR0OK1Kv6FWKxXhCjq7Fbl+Wk/7asgLZJk/0YswhcSb+X60WSog Zbnq/MxeFOzqM9XSNIIC2Qqlghb784WdXVIBP0WWX0CrlNdUOXJa3YuCKLY4gG890JYkwKmy bDqDprNo1YbLonwCNSiuMWtn+AdlZIadt+yMz3tJP99VNTMTuv65MOzpF0lCeT5KFt1OkYzX /tQeUcZsOp26RXpWXq2LmzQPlS0uhCSclOQ6p3jlBy3bRxejKNytRAEXhi466G2i1aJ2YX9Q jEiTssmh7f8o+SoZGEiq6ahNHEs8d9OWZ3UkpQ2P3RWz1WmyyDBCpZb9Ad0SlMdxAwAA
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/q31Q9pEqkefGrSbhvRy3kolxmxY>
Subject: Re: [netmod] Whitespace in XML encoding - allowed ?
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: Tue, 09 Oct 2018 10:02:54 -0000
Hello,
That does not answer my question about whitespace around individual leaf/leaf-list values. The question about all these examples is also open.
regards Balazs
This issue has been touched by earlier version of draft-kwatsen-netmod-artwork-folding-07.
RFC7950 has provide XML encoding rule as follows:
"
Any whitespace between the subelements to the list entry is
insignificant, i.e., an implementation MAY insert whitespace
characters between subelements.
"
Similar rule is applied to leaf-list.
-Qin
发件人: netmod [mailto:netmod-bounces@ietf.org] 代表 Balázs Lengyel
发送时间: 2018年10月9日 17:00
收件人: netmod@ietf.org
主题: [netmod] Whitespace in XML encoding - allowed ?
Hello,
Recently we came up against a problem where a certain implementation did not accept the following:
<with-defaults xmlns="...">report-all</with-defaults>while it did accept
<with-defaults xmlns="...">report-all</with-defaults>I am unsure whether YANG's XML encoding allows whitespace before and after a leaf's value? In RFC7950 it does not say yes or no. I have found the following examples that seem to allow preceding/following whitespace:
https://tools.ietf.org/html/rfc7950#section-4.2.9" rel="nofollow">https://tools.ietf.org/html/rfc7950#section-4.2.9
<status xmlns=http://example.com/system" rel="nofollow">"http://example.com/system">The image example-fw-2.3 is being installed.</status>https://tools.ietf.org/html/rfc7950#section-7.16.3" rel="nofollow">https://tools.ietf.org/html/rfc7950#section-7.16.3
<reporting-entity>/ex:interface[ex:name='Ethernet0']</reporting-entity>https://tools.ietf.org/html/rfc6243#appendix-A.3.1" rel="nofollow">https://tools.ietf.org/html/rfc6243#appendix-A.3.1
<with-defaultsxmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults">report-all</with-defaults>It is problematic that this is not clarified. IMHO this should be clarified in an errata to rfc7950. Chose one:
- It is not allowed to add preceding or following whitespace after the value of a leaf/leaf-list.
Note that some text documents may add whitespace to Netconf examples to avoid long lines,
however this extra whitespace MUST NOT be present in the actual Netconf encoding.- It is not allowed to add preceding or following whitespace after the value of a leaf/leaf-list.
- It is allowed to add preceding or following whitespace after the value of a leaf/leaf-list except
for string based types, where the whitespace could be part of the leaf's value itself..What do you think?
regards Balazs
--Balazs Lengyel Ericsson Hungary Ltd.Senior SpecialistMobile: +36-70-330-7909 email: Balazs.Lengyel@ericsson.com
-- Balazs Lengyel Ericsson Hungary Ltd. Senior Specialist Mobile: +36-70-330-7909 email: Balazs.Lengyel@ericsson.com
- [netmod] Whitespace in XML encoding - allowed ? Balázs Lengyel
- Re: [netmod] Whitespace in XML encoding - allowed… Qin Wu
- Re: [netmod] Whitespace in XML encoding - allowed… Balázs Lengyel
- Re: [netmod] Whitespace in XML encoding - allowed… Martin Bjorklund
- Re: [netmod] Whitespace in XML encoding - allowed… Adrian Farrel
- Re: [netmod] Whitespace in XML encoding - allowed… Ladislav Lhotka
- Re: [netmod] Whitespace in XML encoding - allowed… Kent Watsen
- Re: [netmod] Whitespace in XML encoding - allowed… Ladislav Lhotka
- Re: [netmod] Whitespace in XML encoding - allowed… Balázs Lengyel