Re: [Tools-discuss] xml2rfc in --v2 mode -- bug report?

Julian Reschke <julian.reschke@gmx.de> Mon, 13 June 2022 18:34 UTC

Return-Path: <julian.reschke@gmx.de>
X-Original-To: tools-discuss@ietfa.amsl.com
Delivered-To: tools-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 06792C15AAED for <tools-discuss@ietfa.amsl.com>; Mon, 13 Jun 2022 11:34:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.785
X-Spam-Level:
X-Spam-Status: No, score=-8.785 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-1.876, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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=gmx.net
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0SeMn5ShIok4 for <tools-discuss@ietfa.amsl.com>; Mon, 13 Jun 2022 11:34:17 -0700 (PDT)
Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EF625C15AAEE for <tools-discuss@ietf.org>; Mon, 13 Jun 2022 11:34:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1655145254; bh=woCEtZ4WlBjIQ8pI4AeMT/SIx/ytB0cI1x8svhdOIXA=; h=X-UI-Sender-Class:Date:Subject:To:References:From:In-Reply-To; b=FRq4kNKE6w0swFBivMAnWjqyeNCDy3yE2JQBN480MBjEylZ/4ELMsd+cA41nVsN+h 0pAy343rWRXsh3MHfNoI0wOS8oe+gHMLNudrDkhlgn4hlXDmOHtojij77v/w+9XCjw AQNHa/9rF9hsJBCJ5tCyFVexT+L3GpvqMXJFyOLs=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.178.20] ([217.251.133.244]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MTzay-1o9Acm2dr0-00R0zp for <tools-discuss@ietf.org>; Mon, 13 Jun 2022 20:34:14 +0200
Message-ID: <0888d7b6-0009-dd1a-cb89-f5967fbf8f30@gmx.de>
Date: Mon, 13 Jun 2022 20:34:13 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0
To: tools-discuss@ietf.org
References: <B39D28F0353AE74800217ADC@PSB> <7EDFAAE2-3109-4D16-BC16-1A47DB365522@ietf.org> <E022AAF289DF04D70F449FF7@PSB>
From: Julian Reschke <julian.reschke@gmx.de>
In-Reply-To: <E022AAF289DF04D70F449FF7@PSB>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:4BSqUBV8rX3C1zq72zqKzi0mhPmcal1OFY/vIuBFT8xxIbSbfUs O5aTeK5IeN0S3jIXKwWwKBErSMU+YypiacVgUX6VLmGCvy/HI+cTa8Ra4P5DYKhij4P8BHN YPU6q2L8yKqyVco5LagWK1z7OQ69BGL5xnTPP4AXGPotGVbWAgB4mXsS4LOWAEHMFWSzNCT QNwsb9iqgu2y1oG6S6KAw==
X-UI-Out-Filterresults: notjunk:1;V03:K0:vldpSlVmcTg=:GaxnxyHgf8iBogHwjjuua6 tHpShDL1gSQ/2q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d6FnQInB/NRqImVfL+Li47 kBlqotSEB+9pzYbVIi2uLt1yxA2CQG7zm1kMcOUlhJe9PaLMQK9c3/f0A==
Archived-At: <https://mailarchive.ietf.org/arch/msg/tools-discuss/Z4eccSDp5LOw9gYkffRUSrEi9_g>
Subject: Re: [Tools-discuss] xml2rfc in --v2 mode -- bug report?
X-BeenThere: tools-discuss@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: IETF Tools Discussion <tools-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tools-discuss>, <mailto:tools-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tools-discuss/>
List-Post: <mailto:tools-discuss@ietf.org>
List-Help: <mailto:tools-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tools-discuss>, <mailto:tools-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Jun 2022 18:34:22 -0000

Am 12.06.2022 um 19:05 schrieb John C Klensin:
> ...
> But this is a v2 document whose first version dates to early
> 2017, when v3 was still in its infancy and, IIR, the online
> version of xml2rfc would not yet handle v3.  RelaxNG was, again
> IIR, only introduced with RFC 7749 in February 2016, bringing
> the change from a DTD-based definition to a Schema-based one
> with it.  Most of the changes described in its Appendix B had
> (as RFC 7749 says) been adopted some years earlier and templates
> adjusted, so that the actual changes needed in 2016 were very
> small and many documents and templates did not require changes
> at all.   I also note that DOCTYPE appears in Section 4 of RFC
> 7749 with language that implies to me that it is required.
> ...

Trying to clarify:

- there never ever was a *need* to include a DOCTYPE

- RFC 7749 was published over 16 years after 2629. During that time
frame, the grammar had been extended quite a bit, sometimes with lots of
community discussion, sometimes rather ad-hoc. RFC 7749 documents the
common grammar understood by the existing implementations (the TCL
script, the Python re-implementation, and my XSLT) at the time of
publication. It's not a new design, just an inventory of what was there
back then, to be used as basis when working on v3 (and, fwiw, I think
that has mostly worked well)

- Section 4 explains how to declare named character entities
(https://greenbytes.de/tech/webdav/rfc7749.html#special.unicode.code.points).
These indeed need some kind of doctype declaration (for precision:
https://www.w3.org/TR/2008/REC-xml-20081126/#sec-prolog-dtd) to work;
but that doesn't imply that you need a full DTD, nor that the
recipient/processor will actually look at it even if you have one.

To be clear: if you don't want to type non-ASCII character codes
directly, you'll need a Unicode-capable editor, use numeric references
(such as "&#160;" instead of "&nbsp;"), or declare these entities; and
the only way to do that in XML is what Section 4 of RFC 7749 describes
(and I believe Jay's note about referencing the RelaxNG grammar using a
PI is misleading as it doesn't help with that case at all).

Finally, I do agree that xml2rfc's attempt to discourage use of DTDs
might be well-intended, but really increases confusion with something
that's already confusing enough in XML.

Best regards, Julian