Re: [xml2rfc-dev] When did v2v3 stop spewing redundant attributes?

Kesara Rathnayake <kesara@staff.ietf.org> Mon, 07 March 2022 03:56 UTC

Return-Path: <kesara@staff.ietf.org>
X-Original-To: xml2rfc-dev@ietfa.amsl.com
Delivered-To: xml2rfc-dev@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5E0473A0C35 for <xml2rfc-dev@ietfa.amsl.com>; Sun, 6 Mar 2022 19:56:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, NICE_REPLY_A=-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
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 pHHfRHRedCkW for <xml2rfc-dev@ietfa.amsl.com>; Sun, 6 Mar 2022 19:56:50 -0800 (PST)
Received: from ietfx.ietf.org (ietfx.amsl.com [4.31.198.45]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4B0EA3A0C0A for <xml2rfc-dev@ietf.org>; Sun, 6 Mar 2022 19:56:50 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by ietfx.amsl.com (Postfix) with ESMTP id 2DA7F4396AE9 for <xml2rfc-dev@ietf.org>; Sun, 6 Mar 2022 19:56:50 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
Received: from ietfx.ietf.org ([4.31.198.45]) by localhost (ietfx.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t8M2oPL6mFwk for <xml2rfc-dev@ietf.org>; Sun, 6 Mar 2022 19:56:50 -0800 (PST)
Received: from [192.168.1.198] (unknown [122.58.157.86]) by ietfx.amsl.com (Postfix) with ESMTPSA id C72F04396AE6 for <xml2rfc-dev@ietf.org>; Sun, 6 Mar 2022 19:56:49 -0800 (PST)
Message-ID: <505a2bb8-8c06-cb12-1bd0-b16092a4a7a4@staff.ietf.org>
Date: Mon, 07 Mar 2022 16:56:47 +1300
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:98.0) Gecko/20100101 Thunderbird/98.0
Content-Language: en-NZ
To: xml2rfc-dev@ietf.org
References: <681C8835-5154-4261-88CF-BE0AA90905FA@tzi.org>
From: Kesara Rathnayake <kesara@staff.ietf.org>
Organization: IETF Administration LLC
In-Reply-To: <681C8835-5154-4261-88CF-BE0AA90905FA@tzi.org>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/xml2rfc-dev/cbgcOPeS9LLqc6i-g_8ufS1OZMs>
X-Mailman-Approved-At: Sun, 06 Mar 2022 20:01:49 -0800
Subject: Re: [xml2rfc-dev] When did v2v3 stop spewing redundant attributes?
X-BeenThere: xml2rfc-dev@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion about particulars of xml2rfc V3 design, development and code." <xml2rfc-dev.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/xml2rfc-dev>, <mailto:xml2rfc-dev-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/xml2rfc-dev/>
List-Post: <mailto:xml2rfc-dev@ietf.org>
List-Help: <mailto:xml2rfc-dev-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/xml2rfc-dev>, <mailto:xml2rfc-dev-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 07 Mar 2022 03:56:55 -0000


On 27/02/22 1:07 pm, Carsten Bormann wrote:
> We have a little mystery over in https://github.com/cabo/kramdown-rfc/issues/162
> 
> The xml2rfc v2v3 code used to output redundant attributes of the form
> 
> <section anchor="sdfevent" numbered="true" toc="default”>
> 
> where numbered and toc have their default values (and weren’t set on the input side either).
> 
> This seems to have stopped with xml2rfc 3.12.1.
> 
> I have a few instances generated from 3.11.1 v2v3 that look like the above, and I have a few from the same version that look like
> 
> <section anchor="clarifications" toc="default”>
> 
> (i.e., one redundant attribute gone, one still there).
> 
> Previous versions (3.10.0 or earlier) consistently output the redundant attributes.
> 
> Now the mystery:
> When downgrading to, say, 3.9.1, the problem does not recur (!).
> 
> Where was this fixed?  In xml2rfc or maybe some of its dependencies?

I think I uncovered the mystery.
If a document has `SYSTEM "rfc2629.dtd"` doctype definition, xml2rfc 
adds `toc` and `default` attributes.

Since kramdown-rfc 1.5.25, only v2 output adds the `rfc2629.dtd` doctype 
defintion [1].

   --Kesara

[1] 
https://github.com/cabo/kramdown-rfc/commit/276a531e12cb7eab29ae904ba3397f5fa30b25a5
> 
> I’m not asking for the bug to be put back in, but it would help if we could understand what the shape of the set of instances is that have this problem.
> 
> (Note that this is a discussion about documents in processable form (“unprepped”, editable); not an attempt to bring up the discussion whether default values are needed in prepped (final published form) XML documents.)
> 
> Grüße, Carsten
> 
> _______________________________________________
> xml2rfc-dev mailing list
> xml2rfc-dev@ietf.org
> https://www.ietf.org/mailman/listinfo/xml2rfc-dev

-- 
Kesara Rathnayake
Senior Software Development Engineer - IETF LLC
kesara@staff.ietf.org