Re: [Rfc-markdown] [rfc-i] How do drafts get section links?

Carsten Bormann <cabo@tzi.org> Fri, 08 December 2017 00:47 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: rfc-markdown@ietfa.amsl.com
Delivered-To: rfc-markdown@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D5CBB126C26 for <rfc-markdown@ietfa.amsl.com>; Thu, 7 Dec 2017 16:47:41 -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] 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 cm-K1FTM1VOE for <rfc-markdown@ietfa.amsl.com>; Thu, 7 Dec 2017 16:47:37 -0800 (PST)
Received: from mailhost.informatik.uni-bremen.de (mailhost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6F2B112762F for <rfc-markdown@ietf.org>; Thu, 7 Dec 2017 16:47:37 -0800 (PST)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from submithost.informatik.uni-bremen.de (submithost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::b]) by mailhost.informatik.uni-bremen.de (8.14.5/8.14.5) with ESMTP id vB80lVbs004465; Fri, 8 Dec 2017 01:47:31 +0100 (CET)
Received: from [192.168.217.124] (p5DC7E827.dip0.t-ipconnect.de [93.199.232.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by submithost.informatik.uni-bremen.de (Postfix) with ESMTPSA id 3ytDGC5L9SzDXbW; Fri, 8 Dec 2017 01:47:31 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <CANh-dXkJe3yV8a8HbGh1munOJvn-whKrrN-Yzh=AYitn=9Yp6g@mail.gmail.com>
Date: Fri, 08 Dec 2017 01:47:30 +0100
Cc: RFC Interest <rfc-interest@rfc-editor.org>, RFC Markdown <rfc-markdown@ietf.org>
X-Mao-Original-Outgoing-Id: 534386850.340844-5cff76d6ad65f0c0298feaa091e7f4e3
Content-Transfer-Encoding: quoted-printable
Message-Id: <9FC5EDD7-BCC4-4DF9-9671-3BBDDDD581D3@tzi.org>
References: <CANh-dXkJe3yV8a8HbGh1munOJvn-whKrrN-Yzh=AYitn=9Yp6g@mail.gmail.com>
To: Jeffrey Yasskin <jyasskin@chromium.org>
X-Mailer: Apple Mail (2.3273)
Archived-At: <https://mailarchive.ietf.org/arch/msg/rfc-markdown/RsQSisXfsSF0LcylkiUCAm5JDHQ>
Subject: Re: [Rfc-markdown] [rfc-i] How do drafts get section links?
X-BeenThere: rfc-markdown@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "rfc-markdown is a discussion list for people writing I-Ds and RFCs in Markdown and the authors of the tools used for that." <rfc-markdown.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rfc-markdown>, <mailto:rfc-markdown-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/rfc-markdown/>
List-Post: <mailto:rfc-markdown@ietf.org>
List-Help: <mailto:rfc-markdown-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rfc-markdown>, <mailto:rfc-markdown-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 08 Dec 2017 00:47:42 -0000

Hi Jeffrey,

On Dec 8, 2017, at 01:11, Jeffrey Yasskin <jyasskin@chromium.org> wrote:
> 
> What's the right way to get deep links to sections from kramdown-rfc2629 source?

(Sections of other documents, that is.)

RFCXML version 2 has no way to do this, so kramdown-rfc doesn’t support it.

So why are you seeing links on tools.ietf.org (and only there) where there aren’t any?
The .txt to .html converter at tools.ietf.org has some heuristics that allow it to identify references to sections of other RFCs.  These heuristics sometimes fail to notice (and famously sometimes point to the wrong document, leading to spurious errata about problems that aren’t even in the RFC), but they are better than nothing.

Now how is the syntax for deep links into documents going to look like in kramdown-rfc when we add RFCXML v3 support?
I don’t know yet.  But I note that essentially the same heuristics that work on .txt files on tools.ietf.org might work in a markdown source document (and, if they don’t, the author can still set a manual xref [er, relref, if that thing stays in v3]).

(CCing rfc-markdown, as the question is of interest there, too; please trim the CC list if you just want to vent about relref, as you probably should at this point.)

Grüße, Carsten