Hi Lada,

On Fri, Jun 04, 2021 at 10:46:09AM +0200, Ladislav Lhotka wrote:
> Hi Benjamin,
> 
> thanks for the review, please see below.
> 
> Benjamin Kaduk via Datatracker <nore...@ietf.org> writes:
> 
> ...
> 
> > ----------------------------------------------------------------------
> > COMMENT:
> > ----------------------------------------------------------------------
> >
> > 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
> >    [IANA-DNS-PARAMETERS].
> >
> > 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.

Understood about the current way being brittle but nothing better being
available (yet).

My comment here was intended more along the lines of an apparent
inconsistency between the text and the code -- the text says that we will
set "status obsolete" if the registration is deprecated, but the XSLT
doesn't do that.  IMO it would be better to either drop the text about
deprecated or add code to look for it (but this is just a non-blocking
comment so my opinion doesn't count for too much).

> >
> > 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.

I guess that gets a bit into Francesca's point about how involved the DEs
or other parties will be when (new) output is generated.  I don't think we
need to say more in this subthread, though.

> >
> > 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.

Makes sense that actually using it is clumsier than the literal.

> >
> >      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
> >         https://www.iana.org/assignments/dns-parameters";;</text>
> >         <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. 

Ah!  Thanks for the explanation.

> >
> >        <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.

I feel pretty confident that IANA will continue to publish an XML version
even if it ends up being generated from some other source.  Anyway, there's
no urgency for getting a more "durable" version, so we should probably just
wait and react if any issues arise in the future.

Thanks,

Ben

_______________________________________________
DNSOP mailing list
DNSOP@ietf.org
https://www.ietf.org/mailman/listinfo/dnsop

Reply via email to