[netmod] Whitespace in XML encoding - allowed ?
Balázs Lengyel <balazs.lengyel@ericsson.com> Tue, 09 October 2018 09:00 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 6D2F513126C for <netmod@ietfa.amsl.com>; Tue, 9 Oct 2018 02:00:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.597
X-Spam-Level:
X-Spam-Status: No, score=-2.597 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, 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=MhII3mu1; dkim=pass (1024-bit key) header.d=ericsson.com header.b=SK/XRxvP
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 HDbn838UCaxD for <netmod@ietfa.amsl.com>; Tue, 9 Oct 2018 02:00:00 -0700 (PDT)
Received: from sessmg22.ericsson.net (sessmg22.ericsson.net [193.180.251.58]) (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 1F59A13124A for <netmod@ietf.org>; Tue, 9 Oct 2018 01:59:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; d=ericsson.com; s=mailgw201801; c=relaxed/simple; q=dns/txt; i=@ericsson.com; t=1539075598; x=1541667598; 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=aThNCtmENNl9WAFchfyOXy7vXTX39gYcAlgvoymmED8=; b=MhII3mu1i2kd8BtInPUa4ovXR7gbyJovTxbKmR1QxyAUf05VcxN1Nn6LJnczCF3G e9kWmzZgGU71IQ0ksMmhDjU2JW5WNUHnjFHpkVfPb2KqZkoCqS9xBaS0nscfaEgy HV9ClOkJXEWCsh/YV/v5RnGgoW749jXwQ9WZfWiA4ys=;
X-AuditID: c1b4fb3a-159ff700000012ff-2d-5bbc6e0ec391
Received: from ESESBMB505.ericsson.se (Unknown_Domain [153.88.183.118]) by sessmg22.ericsson.net (Symantec Mail Security) with SMTP id D2.0B.04863.E0E6CBB5; Tue, 9 Oct 2018 10:59:58 +0200 (CEST)
Received: from ESESBMB505.ericsson.se (153.88.183.172) by ESESBMB505.ericsson.se (153.88.183.172) 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 10:59:58 +0200
Received: from EUR02-VE1-obe.outbound.protection.outlook.com (153.88.183.157) by ESESBMB505.ericsson.se (153.88.183.172) 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 10:59:58 +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=2e2gNfZreR17X3MoznXFMX/7ls/GxYxSHoQBIlmi/S8=; b=SK/XRxvPNrkELkg6/wYvf3OhPmTy7L+rz4Zl0n9KFAZMPlxQrR8VZiIEwMajyZ3YqnLQKlnFk2zhk//j9R5Q2OWm5ao5foEdhtVa9QyYuLLGoTapEypCb+pxHaQS15/Wg3OuL2aq9NjxbAmTmDlF0TpPpVZWoOh/RFlGhuOhw0k=
Received: from VI1PR0701MB2736.eurprd07.prod.outlook.com (10.173.80.148) by VI1PR0701MB2912.eurprd07.prod.outlook.com (10.173.72.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.8; Tue, 9 Oct 2018 08:59:57 +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 08:59:57 +0000
From: Balázs Lengyel <balazs.lengyel@ericsson.com>
To: "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: Whitespace in XML encoding - allowed ?
Thread-Index: AQHUX65zMY3LKhsc8UeIQzNDxdo7xQ==
Date: Tue, 09 Oct 2018 08:59:56 +0000
Message-ID: <14e78aaa-4508-970a-d1a0-e091ffaf5c8e@ericsson.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: VI1PR0902CA0035.eurprd09.prod.outlook.com (2603:10a6:802:1::24) To VI1PR0701MB2736.eurprd07.prod.outlook.com (2603:10a6:801:8::20)
x-ms-exchange-messagesentrepresentingtype: 1
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; VI1PR0701MB2912; 6:C5ko85rA3tdxAyLt3oiH/YWNILw7R7Gup+luaa98PZPRaTEAkhSBAbpYzjw/B8ErLyGVWUYR0ZDxa8shQoI5r2Ka/pc95y1QiXq7820ShQGftrENDMioKhF3OYqH9gZxEU9P3KbPm9IhMtumB4tFSHYO40bE8vjqadyAvCjAxDSreoKbCLvF8QK+YXej1KDmA2Oc+3PGOy35lhmn8KHYj9VPaJfTFJHKGABELGzVVOiVrYLJs0fvZK1aVFx29gDe6C2kuUe9N+cBxqDt/lRmwhbQiI+kDwESfMKdg1+DzkFDGRjcDqX6PR+MUorm/z3KR4Raap/ecQq0G7UqvH4ml4Lj11NRapb6W3XUgJMAcuhen9RL5xgykrzHt+ce/JVVJbqPubqhFKqEnkGhQ4Gm6wbudJ4Lt0sD5RFOxqppMXgbFE267qm2Mvde6ndWGwF3hwrayW4alYdrd3ARqcJtxg==; 5:Xvegrt+umb7UM1/Ew6a5StUTEg6tqxkP0oZQNn6PMWvDnFEH6QPnidefoizForP26mLPcRRmKjg5sxVU9FDHOt7Ed/s2xZoV3Y8/heOlFZx8qGzAlqpJ/CFLRw0EhZV1+goiJfU5PP7ichFBy7ULEtDgsF0lH6BPQJ6pB+yyRLM=; 7:yuJ6TaTQNn5srw4rIcjcIEwm52xLe1MBZjzZx0F+jHpXyh7pghvH3hLXwv2dX7ME/+eBLIJD8p6J3pKqL9MWvoBorLd508TZuatbFs7eGNnyvJRKk+wR3nRhiaWHBs1K5wiMzbpQ/EIIF5w6YpNWX9GpZtrN2tpSR+QfCNT+i7fOjP1mV39INtN2p0+5G4Q0QEe+Shyq7UpP/VIijGR2oWRTWKakX49YQJukOOSe8jpik0Lr8yvK/HyskCDsbROU
x-ms-office365-filtering-correlation-id: ebd38e47-0a97-4092-41d3-08d62dc59505
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(49563074)(7193020); SRVR:VI1PR0701MB2912;
x-ms-traffictypediagnostic: VI1PR0701MB2912:
x-microsoft-antispam-prvs: <VI1PR0701MB2912E72DB8ADEBFB016CBD9CF0E70@VI1PR0701MB2912.eurprd07.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(37575265505322)(248295561703944);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(102415395)(6040522)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(3231355)(944501410)(4982022)(4983020)(52105095)(149066)(150057)(6041310)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699051)(76991055); SRVR:VI1PR0701MB2912; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0701MB2912;
x-forefront-prvs: 08200063E9
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(346002)(39860400002)(366004)(376002)(136003)(189003)(199004)(252514010)(486006)(66066001)(65826007)(5640700003)(99286004)(97736004)(65806001)(65956001)(606006)(256004)(36756003)(6306002)(54896002)(6512007)(476003)(2616005)(6506007)(6486002)(14454004)(99936001)(386003)(64126003)(68736007)(6436002)(52116002)(6916009)(2501003)(31686004)(58126008)(71200400001)(5660300001)(478600001)(966005)(71190400001)(316002)(2900100001)(5250100002)(2906002)(8936002)(8676002)(186003)(1730700003)(81166006)(53376002)(6346003)(6116002)(85182001)(102836004)(26005)(2351001)(3846002)(105586002)(25786009)(3260700006)(31696002)(236005)(7736002)(106356001)(53936002)(81156014)(86362001)(85202003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0701MB2912; H:VI1PR0701MB2736.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts)
authentication-results: spf=none (sender IP is ) smtp.mailfrom=balazs.lengyel@ericsson.com;
x-microsoft-antispam-message-info: jpOJ2+gKacyY+HlVNNXYj2DAznJOwKp8XmZbsatTFUqxiqtUKSi9WRVC2rrHChZyks9W644i7hQXR1g5aheN89R4v0K/3Bf/BKIBHjEI0ztNPACyD2sPaL6mw+DEG0T8FMzx3sBf8u3rdYGjlaAeMiqvovzFBkTgw1Q5hPSAFw71/LdPOgMmcNx9V8im4SHFGXbp/hyxrbfegCSh8pb0Rx2qHJqEqMWAXf/V1WQeI+5PfUsb5ZvoHwp1Q5Aub29qBWUUM0zwlRasfM70lNRYB1VnQ1O+omoTETx1IHHTFrazMaIDGcUhhDU6+XTB/RSS3xSWcV1KBdVWv1UjubhB0LS3SqoN7VTLINOWHS2XHQU=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha-256"; boundary="------------ms030608060505010608070500"
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: ebd38e47-0a97-4092-41d3-08d62dc59505
X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Oct 2018 08:59:56.9429 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0701MB2912
X-OriginatorOrg: ericsson.com
X-Brightmail-Tracker: H4sIAAAAAAAAA1WSWUwTURSGc2em07FavRRqT1BMHFESVHBBg0vcwoMJ0RhfRIiRKiMidMAO EGsM2kiD0CIQi9JqBBRqggaXuCuB1qJWowGVRR+IxSLBRiIPqCgubS8k+vad//z/uffcXI5W dcgiuSwxX9CL2hyeVTC2lDuFi6eLD9OWnP0TlljbaZRtQJsbGsaobShVsTZDyMkqFPTx69IV +7+/saI8e/KhivoadAyZksrQFA5wAthLvsjLkIJT4XYE42cuTRSjCHpPuylSXKTA5x4LFQyu pKGpe5gK5lXYSsFjq4a4+hG89N9ggw0WJ0HJcGvIFIFjwHbvakgPx/HQeL2KJnoCfL5VHmAu wHHQ3hkVlBkcDc/OtcqCrMTrofrSKAoywjPh27MroZE01sA7Xy1FdogAb+dzlrAahj78lhHm oebTuxCr8S4o9thlwXsCtiGoqnnKENMieNHjQ4Sj4FWtGRFTmxxGS7wTk7aAqe49RRqvETS3 n6Am08MjFfLgBoBzobJ6D5GTwWj00ITnQFO5lyHZ9zS8dV2eyM4GY3UpW4ni7f9sZA/4aFyK oLi7i7WHniAMPDYfYw+cQeMF4DDx//uDvBAc9X6a8Bqo+eFkCc8Fq9krJ7wC/O0jiPBycDT/ YuuQogmpJUGSdJnLlsUJ+qy9kpQrxolC/g0U+FvOmz9X30XOwY0uhDnET1Mez3iYppJpCyWD zoWiA3P6r13uQJGMmCsKfIRSfed+mkqZoTUcFvS5u/UFOYLkQrM4htcoN+1LTFXhTG2+kC0I eYJ+sktxUyKPoSzLZkOK13G35YW5dy/fmF2FJXfBkvMWSpHgn3Fkpee0bsBiaIms+yr2PW17 8iW9ruhU12CMb+sDKlbXV6ZcqkmePzBVPV6w/WhP/I7mpAOlYRcOup3syx+uR1azXbdxlbPI 9PX7yeuZ4UMfXcM7+zL5ceO8Rgtz3N3r3hO75TbPSPu1S2NpvaT9C1gnhTdjAwAA
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/y2iTxA2XT9N_AQgIAF2hLMvgauc>
Subject: [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 09:00:09 -0000
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-defaults xmlns="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 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