Re: [netmod] XML and prefix
Martin Björklund <mbj+ietf@4668.se> Fri, 14 January 2022 11:41 UTC
Return-Path: <mbj+ietf@4668.se>
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 C442E3A2274 for <netmod@ietfa.amsl.com>; Fri, 14 Jan 2022 03:41:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_NAKED_TO_NUMERO=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=4668.se header.b=KNoVOUMp; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=dwUddXEX
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 piUye1TbTiGc for <netmod@ietfa.amsl.com>; Fri, 14 Jan 2022 03:41:17 -0800 (PST)
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B75363A2275 for <netmod@ietf.org>; Fri, 14 Jan 2022 03:41:16 -0800 (PST)
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 81A685C005A; Fri, 14 Jan 2022 06:41:15 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 14 Jan 2022 06:41:15 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=4668.se; h=date :message-id:to:cc:subject:from:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=fm3; bh= z6uIcOVE0ZujOSqHZDx2T2s2PFyuHR/Dl8z7QcqWmP8=; b=KNoVOUMpOhKlawkR VZ5URtuUyTXBa7KVJmTr75Xj/xbjr8PwVBotAHeky6Ok7Q3DehYE9v/+GgV92QuG 5QErtUoDW1ys/jyxbMT1saflmVfItTgxUHIzEvgK6IJM4CAxb6i6WBoPbyxAY6iS NxZirvV7oauDSQJGd5FMNOwNXC41GesmWVcUzxrG3SENZoohrumAVM7+jaoiP+eS 8MBUbIcJPG8jvviFvNWS4HptOiH+WmAmBnrjdqvsKi26vJEaRgOyp+XqSntcYEyF TkvD1TinagXlKqLATlPyL5ZFUOu5lBuEGx7MBNNnaPNP+tLThtLrOtA30GyVGchr 7dMlJw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=z6uIcOVE0ZujOSqHZDx2T2s2PFyuHR/Dl8z7QcqWm P8=; b=dwUddXEXT6qQ0Z5C6HbLZKqeVj1Yh1D/kZMUIZRIINiEjewVSfkjd56p2 Ml/jYDElh695Ws+CqsT+oox2Bdr4UPnbNXLeJhfCdbhXyjB8agqvkWsMd58MLtLs 6ijCwAbokFvohikkrXfQ4it0/w/e1xkE40EA7UbTU3Wz9rP9PM/3X2B/dLZUeVqd rvCyiWs5die/2EMJJlza17WFUB+9dYAy0F9K7ku/LwsSsKg5cKaA/1+ag43bWLk+ TZgtyVJ89aBrJjZJPPmkkElxknBzwfPSRgcBa9Fo1oAiW+/TrsPX2H2WilemGfYB FZGMLGWSjPKJZOVXOWU1lqaMPgSEQ==
X-ME-Sender: <xms:W2HhYTglpVOpcFWa9EvRsU8X2dtLO83_cdB3KILJBDi0VdHTxwcPag> <xme:W2HhYQBFVyQTmvSpfpZEhgQQ1MQeTxfMTP_1nXM2zqjik3K1_2o9dsMClPOilaSut V_sP5jbFhvFD5MBvYA>
X-ME-Received: <xmr:W2HhYTG5hnQrrnrCZmt11Za-Q5_qo-ecysk2uv1CsPw-RGZcLhWohgpjnNdtzpl4T31B5CGvk8Vc1x30iFjRjwsLAEmlvyUyUw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrtdehgdefudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffkvffuhfgjfhfogggtgfesthhqre dtredtudenucfhrhhomhepofgrrhhtihhnuceujhpnrhhklhhunhguuceomhgsjhdoihgv thhfseegieeikedrshgvqeenucggtffrrghtthgvrhhnpeeikeehtdfhjeduveekgfdvke duudehvddvffevgffgtdevudeijefgtdevfeeludenucffohhmrghinhepihgvthhfrdho rhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmh gsjhdoihgvthhfseegieeikedrshgv
X-ME-Proxy: <xmx:W2HhYQRMziM0BMfSCyuzqazBEKOAw0gAeFAz1yBEzdw3SqBRfyUBnw> <xmx:W2HhYQy6FV_wNA_XczuAd7bHnF-sIAU6bGtXoa04smR82UiC2rkuIw> <xmx:W2HhYW6bXW0AlJGi5VFpaPvvRlvp9CX0fmbEQhrrOSSFcaRXSzijFg> <xmx:W2HhYdpTuVKr5XfC43jD8C7INrZdlgpMas83PvD_yAMk1UGTuO4l9Q>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 14 Jan 2022 06:41:14 -0500 (EST)
Date: Fri, 14 Jan 2022 12:41:13 +0100
Message-Id: <20220114.124113.502085999357238799.id@4668.se>
To: ietfc@btconnect.com
Cc: ladislav.lhotka@nic.cz, netmod@ietf.org
From: Martin Björklund <mbj+ietf@4668.se>
In-Reply-To: <AM7PR07MB62489AEFC950768B364C3FDAA0549@AM7PR07MB6248.eurprd07.prod.outlook.com>
References: <be6a4101-0897-09fb-43a8-604d247c7090@nic.cz> <20220114.122336.1947215146722594461.id@4668.se> <AM7PR07MB62489AEFC950768B364C3FDAA0549@AM7PR07MB6248.eurprd07.prod.outlook.com>
X-Mailer: Mew version 6.8 on Emacs 26.3
Mime-Version: 1.0
Content-Type: Text/Plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/C5XpGJ6ni8PvbnjBQffg0HYxAZ0>
Subject: Re: [netmod] XML and prefix
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: Fri, 14 Jan 2022 11:41:24 -0000
tom petch <ietfc@btconnect.com> wrote: > From: Martin Björklund <mbj+ietf@4668.se> > Sent: 14 January 2022 11:23 > > Hi, > > Ok, I think I understand what he means. With this XML: > > <alarm-category xmlns:nsfmi="urn:ietf:params:xml:ns:yang\ > :ietf-i2nsf-nsf-monitoring"> > nsfmi:memory-alarm > </alarm-category> > > the prefix "nsfmi" is present in the element data, which means that > in order to implement this properly, the XML parser must pass the > namespace mappings to the user code. > > So he proposes to add to the draft: > (from https://mailarchive.ietf.org/arch/msg/i2nsf/06kJ7vS6X-0hUmGHrCWN-jVzU7M) > > 11. XML Examples for I2NSF NSF Monitoring > > This section shows the XML examples of I2NSF NSF Monitoring data > delivered via Monitoring Interface from an NSF. In order for the XML > to work, the prefix in the element that uses "identityref" type > (e.g., /i2nsf-event/i2nsf-system-detection-alarm/alarm-category/) in > the YANG module described in this document MUST be the same as the > namespace prefix for urn:ietf:params:xml:ns:yang:ietf-i2nsf-nsf- > monitoring. The XML software MUST be chosen that makes the namespace > prefix information available. > > > I think this is a bit odd. Who is supposed to act on the first MUST? > This text is about an example, which is what it is, and it happens to > be correct. > > Also, the text about XML software seems unnecessary to me. It follows > from the definition of an identityref in RFC 7950 that the namespace > mapping is needed to parse this correctly. > > > <tp2> > Martin, > > Again, thank you. My initial take was that defining the prefix in alarm-category makes that the default so that the prefix is not needed on 'memory-alarm' but my XML is getting a bit rusty! Almost ;-) RFC 7950 says: If the prefix is not present, the namespace of the identityref is the default namespace in effect on the element that contains the identityref value. So in this particular case, the example could instead be written as: <alarm-category>memory-alarm</alarm-category> b/c the default namespace in effect is urn:ietf:params:xml:ns:yang:ietf-i2nsf-nsf-monitoring /martin > > Tom Petch > /martin > > > > > > Ladislav Lhotka <ladislav.lhotka@nic.cz> wrote: > > On 14. 01. 22 11:39, Martin Björklund wrote: > > > Hi, > > > I don't understand the problem either. He writes: > > > > > >> Sorry, but this has the same problem in figure 11.1 that we've just > > >> been > > >> discussing with Ian. > > > Can you send a pointer to that discussion? Perhaps there's more > > > context there. > > > > Right. I also suspect that the last sentence should have been > > > > "I don't think it's OK for the draft to say those things." > > > > Lada > > > > > /martin > > > tom petch <ietfc@btconnect.com> wrote: > > >> I see that IANA have taken to asking XML Registry experts about the > > >> registration of YANG namespaces at Last Call, or perhaps they have > > >> always done this but have only recently put the e-mail on a public > > >> list. Anyhow, the experts have taken it upon themselves to comment on > > >> the XML examples and I do not understand this comment. This comes > > >> from > > >> [IANA #1217705] Expert Review for > > >> draft-ietf-i2nsf-nsf-monitoring-data-model-12 (xml-registry) > > >> by Tim Bray 17 dec 2021 03:03 > > >> > > >> =============================== > > >> Sorry, but this has the same problem in figure 11.1 that we've just > > >> been > > >> discussing with Ian. > > >> > > >> For it to work, (a) the prefix in the alarm-category element MUST be > > >> the > > >> same as the namespace prefix for > > >> urn:ietf:params:xml:ns:yang:ietf-i2nsf-nsf-monitoring, which means > > >> that XML > > >> software MUST be chosen that makes the namespace prefix information > > >> available. I don't think it's OK for the draft not to say those > > >> thigns. > > >> > > >> <alarm-category > > >> xmlns:nsfmi="urn:ietf:params:xml:ns:yang:\ > > >> ietf-i2nsf-nsf-monitoring"> > > >> nsfmi:memory-alarm > > >> </alarm-category> > > >> ================================================= > > >> a) I am unclear what the problem is - I thought that XML allowed great > > >> freedom with prefix even if the IETF would rather not > > >> b) this suggestion seems to be that all I-D with XML examples, which > > >> is pretty much every I-D with a YANG module in it, needs to carry a > > >> warning about what XML software to choose, which seems rather a > > >> burden. Thoughts? > > >> > > >> Tom Petch > > >> > > >> > > >> > > >> > > >> _______________________________________________ > > >> netmod mailing list > > >> netmod@ietf.org > > >> https://www.ietf.org/mailman/listinfo/netmod > > > _______________________________________________ > > > netmod mailing list > > > netmod@ietf.org > > > https://www.ietf.org/mailman/listinfo/netmod > > > > -- > > Ladislav Lhotka > > Head, CZ.NIC Labs > > PGP Key ID: 0xB8F92B08A9F76C67
- [netmod] XML and prefix tom petch
- Re: [netmod] XML and prefix Martin Björklund
- Re: [netmod] XML and prefix Ladislav Lhotka
- Re: [netmod] XML and prefix Martin Björklund
- Re: [netmod] XML and prefix tom petch
- Re: [netmod] XML and prefix Martin Björklund
- Re: [netmod] XML and prefix tom petch
- Re: [netmod] XML and prefix Ladislav Lhotka
- Re: [netmod] XML and prefix tom petch