Re: [xml2rfc] can xref section= reference an anchor?

Carsten Bormann <cabo@tzi.org> Mon, 16 December 2019 17:53 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: xml2rfc@ietfa.amsl.com
Delivered-To: xml2rfc@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1EDF6120881 for <xml2rfc@ietfa.amsl.com>; Mon, 16 Dec 2019 09:53:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.2
X-Spam-Level:
X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-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 v2ZKoZV6Bb9K for <xml2rfc@ietfa.amsl.com>; Mon, 16 Dec 2019 09:53:17 -0800 (PST)
Received: from gabriel-vm-2.zfn.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1189912001A for <xml2rfc@ietf.org>; Mon, 16 Dec 2019 09:53:17 -0800 (PST)
Received: from [172.16.42.104] (p548DC893.dip0.t-ipconnect.de [84.141.200.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-vm-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 47c85701FDzyxp; Mon, 16 Dec 2019 18:53:14 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <5d192de5-c6ca-aa1f-b7e0-0500704e491a@htt-consult.com>
Date: Mon, 16 Dec 2019 18:53:14 +0100
Cc: "xml2rfc@ietf.org" <xml2rfc@ietf.org>
X-Mao-Original-Outgoing-Id: 598211592.262215-78332e8e7d40505c3cbd3ac9409b274f
Content-Transfer-Encoding: quoted-printable
Message-Id: <C8AF4E96-E5BB-4232-B58C-A617E404DFF4@tzi.org>
References: <5d192de5-c6ca-aa1f-b7e0-0500704e491a@htt-consult.com>
To: Robert Moskowitz <rgm@htt-consult.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/xml2rfc/xoJgLsL1roqraesYC7QfHJApj7E>
Subject: Re: [xml2rfc] can xref section= reference an anchor?
X-BeenThere: xml2rfc@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <xml2rfc.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/xml2rfc>, <mailto:xml2rfc-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/xml2rfc/>
List-Post: <mailto:xml2rfc@ietf.org>
List-Help: <mailto:xml2rfc-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/xml2rfc>, <mailto:xml2rfc-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 16 Dec 2019 17:53:19 -0000

On Dec 16, 2019, at 17:47, Robert Moskowitz <rgm@htt-consult.com> wrote:
> 
> I see examples of section=5 for RFCs, but for IDs, the section number will tend to be version specific.
> 
> Is there a way to reference the anchor label for the desired section?

To translate the anchor label into a section number (or a section title), the referencing spec would need access to the referenced spec.  To generate a standalone document, this could be implemented by including the referenced spec into the referencing document, or more reasonably just an abstraction of it that leaves only the information needed for that translation (a “side file” in traditional formatter jargon).

I believe the best way to handle this would be to keep extracted “side files” of this kind for all specs (drafts and RFCs), ready for inclusion just like we include the extracted reference information itself into a referencing spec.  This does not just require changes to xml2rfc and related tools, but also to the infrastructure we use to keep copies of specs and their reference extractions.

Grüße, Carsten