Re: [DNSOP] Benjamin Kaduk's No Objection on draft-ietf-dnsop-iana-class-type-yang-03: (with COMMENT)

Ladislav Lhotka <> Fri, 04 June 2021 08:46 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 57D6C3A2F6B; Fri, 4 Jun 2021 01:46:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id K9XMooGmQrPo; Fri, 4 Jun 2021 01:46:16 -0700 (PDT)
Received: from ( [IPv6:2001:1488:800:400::400]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id A9FD43A2F69; Fri, 4 Jun 2021 01:46:15 -0700 (PDT)
Received: from localhost (unknown [IPv6:2a01:5e0:29:ffff:fc73:fa64:57e6:2115]) by (Postfix) with ESMTPSA id 440A7140A87; Fri, 4 Jun 2021 10:46:10 +0200 (CEST)
From: Ladislav Lhotka <>
To: Benjamin Kaduk <>, The IESG <>
In-Reply-To: <>
References: <>
Date: Fri, 04 Jun 2021 10:46:09 +0200
Message-ID: <>
MIME-Version: 1.0
Content-Type: text/plain
X-Virus-Scanned: clamav-milter 0.102.2 at mail
X-Virus-Status: Clean
Archived-At: <>
Subject: Re: [DNSOP] Benjamin Kaduk's No Objection on draft-ietf-dnsop-iana-class-type-yang-03: (with COMMENT)
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: IETF DNSOP WG mailing list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 04 Jun 2021 08:46:23 -0000

Hi Benjamin,

thanks for the review, please see below.

Benjamin Kaduk via Datatracker <> writes:


> ----------------------------------------------------------------------
> ----------------------------------------------------------------------
> Like Roman, I applaud the use of XSLT to avoid specifying redundant information
> and allow for reasonably automated updates. Some other comments below.
> Section 3
>    The IANA document "Domain Name System (DNS) Parameters"
>    [IANA-DNS-PARAMETERS] contains altogether thirteen registries.  The
> I suggest "at the time of this writing" just in case we add or remove
> some registries.

OK, added.

> Section 4
>    Upon publication of this document, the initial revision of the "iana-
>    dns-class-rr-type" YANG module SHALL be created by applying the XSLT
>    stylesheet from Appendix A to the XML version of
> This is just a random observation from a bystander, but my understanding
> is that IANA is gradually moving registries to a database backend, so
> that the XML version may in some sense not be the "most authoritative"
> version (or the "preferred form for modification" to use the open-source
> software jargon).  The XML format mand XSLT are both quite well-defined,
> and the database backend might not be, though, so it's not clear that
> moving to a procedure to generate YANG directly from the database would
> be an advantage over taking a detour via XML.

That's why this document only deals with the initial revision of the module. Whilst it is perfectly possible that IANA will use the stylesheet for subsequent revisions, it is officially out of scope for this document.

>    "status":  Include only if a class or type registration has been
>       deprecated or obsoleted.  In both cases, use the value "obsolete"
>       as the argument of the "status" statement.
> I don't see any logic in the XSLT that looks for "deprecated", just
> "OBSOLETE".  (This may be fine, given that there's not currently
> anything listed as deprecated in the live registry...)

Right, the XSLT stylesheet is expected to work on those two registries in their current state. The registry XML is loose in some respects and it is not clear (to me at least) how a deprecated entry will exactly look like. It would be certainly better to indicate the status e.g. with an XML attribute. Searching for magic words like "OBSOLETE" in the entry text is brittle, but it's currently the only way.

> Section 5
> The XSLT is only run over trusted input, so it is safe to ignore the
> risk of any issues due to improper escaping or input validation.
> Whether or not we need to note this property in the RFC is not entirely
> clear, though.

I assume that the resulting YANG module will also be validated, e.g. with pyang, so any unintentional translation errors should be discovered.

> Appendix A
>    This appendix contains an XSLT 1.0 stylesheet [W3C.REC-xslt-19991116]
>    that is intended to be used for generating the initial revision of
>    the "iana-dns-class-rr-type" YANG module.  This is achieved by
> Is this only going to be used for the initial revision, or for updates
> as well?

As I wrote, the official target is only the initial revision.

>      <variable name="lf">&#xA;</variable>
> This seems unused (and instead we have a lot of &#xA; literals).

Correct, I first used this variable but then realized its use is in fact clumsier that the literal character entity. Will remove the definition.

>      contact
>        "        Internet Assigned Numbers Authority
> The leading spaces seem a little out of place in the rendered output, to
> me.

This tries to follow the usual formatting conventions used e.g. in the iana-if-type module (RFC 7224). Unfortunately, YANG doesn't support any markup in the description text.

>      description
>        "This YANG module translates IANA registries 'DNS CLASSes' and
>         'Resource Record (RR) TYPEs' to YANG derived types.
>         [...]
>         This initial version of this YANG module was generated from
>         the corresponding IANA registries using a XSLT stylesheet
> Though I guess this part might not work well for a non-initial revision.

Right, the descriptions of subsequent revisions will have to be edited manually because the registries themselves contain no revision info, only revision date.

>        "IANA 'Domain Name System (DNS) Parameters' registry
>         <text>&#xA;&#xA;</text>
> I may be missing something, but why two <text> children of the
> <variable>?

The resulting line would exceed 72 characters, if the two LF entities were inserted directly after the semicolon. 

>        <apply-templates
>            select="iana:registry[@id='dns-parameters-2']"/>
>        <apply-templates
>            select="iana:registry[@id='dns-parameters-4']"/>
> Hardcoding the names "dns-parameters-2" and "dns-parameters-4" is in the
> class of things that (if I understand correctly) IANA is not always keen
> on people doing.  In this case it's probably not a big issue, since the
> output of the transformation will be looked at by a human before it's
> published, and we can modify the template if needed, but I do wonder if
> any identifier more closely aligned to the registry's role is available.

Again, it is only required to work for the initial revision. I would be happy to work with IANA on a more "durable" version of the stylesheet but, as you wrote, the XML format may not be maintained for long.

Thanks, Lada

Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67