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

Julian Reschke <julian.reschke@gmx.de> Fri, 08 December 2017 05:46 UTC

Return-Path: <julian.reschke@gmx.de>
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 28AC3128891 for <rfc-markdown@ietfa.amsl.com>; Thu, 7 Dec 2017 21:46:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.4
X-Spam-Level:
X-Spam-Status: No, score=-5.4 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-2.8, 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 y7kpvxCWwrcx for <rfc-markdown@ietfa.amsl.com>; Thu, 7 Dec 2017 21:46:53 -0800 (PST)
Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CCEBC124205 for <rfc-markdown@ietf.org>; Thu, 7 Dec 2017 21:46:52 -0800 (PST)
Received: from [192.168.178.20] ([93.217.125.18]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MWkep-1eXxve45AR-00Xqth; Fri, 08 Dec 2017 06:46:42 +0100
To: Carsten Bormann <cabo@tzi.org>, Jeffrey Yasskin <jyasskin@chromium.org>
Cc: RFC Markdown <rfc-markdown@ietf.org>, RFC Interest <rfc-interest@rfc-editor.org>
References: <CANh-dXkJe3yV8a8HbGh1munOJvn-whKrrN-Yzh=AYitn=9Yp6g@mail.gmail.com> <9FC5EDD7-BCC4-4DF9-9671-3BBDDDD581D3@tzi.org>
From: Julian Reschke <julian.reschke@gmx.de>
Message-ID: <d77911e9-3707-de39-bebd-a9766639b17e@gmx.de>
Date: Fri, 08 Dec 2017 06:46:41 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0
MIME-Version: 1.0
In-Reply-To: <9FC5EDD7-BCC4-4DF9-9671-3BBDDDD581D3@tzi.org>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Provags-ID: V03:K0:vobPSCEFDunYTrLgZ+zW3KNlzpImfzDejV1EczPRHptOc0p0DyX tc83GqYPCl6ssonUm+Z04waa9g4AJiA05dZWHKiHcjGx6j+oSzR2T/9eHaf59tz12dgsbyS gDkgYqI0HFtDfsANDuZMiJaVxtcQsbJYunSYp8YOMcC1kk+bl9v+7uM5dUsfBrSrch2pFOC j7uQHFY/HgBUB1vI1x7YQ==
X-UI-Out-Filterresults: notjunk:1;V01:K0:gZrqGQYBsyU=:67ms6Ly2Rnj9SC/JQFCzw6 pmNnG0Expa+DDL9mWj1wMken5Cf7LvQp0aPpJtUwuokj5pYz/3auJgXtEPLBzRz1oGFH8FGpg fbMmKNMaadDWny7WOM3oKZFjwbBrautCBA/c73aiPVC6BlTOEE6j7dog6ueP+qfxW8r1HCBqB DbKdSExm6iqQKjaoOBvyvsVgWl396Ia5MkNldrT4aToiC9/5XTlf+U8LENesa2iUhPvVOQsDC iOOc7q97NmV5abnJAZWS6QxRSPyj2VRr6uKemcmqqjENLZEzlENm6bhcq/dwDwOAwuNeUYZoZ Heuw2rXdYHksGZ68DDEUm7dpyAo0TM5L+wdPWhe7N6Idu7+M+DBjFM/Eh2+omg67aaAf2IXZO H63pIoBYLdM/1w4EHDP4m5dHHeFZPbJnS2GB2G5E7SCpki7nxT666reYP3P1Euavt+/8nfQBW L8ZhiQhzM66zobmQ270YCG2ZOhGxlvay6OwVbHSppF2v4aRjXrr62/e9DSd4LrkDn320E/1oA 6tFPVxU2pp4uUWXfW/y6LSKkUZBG8dju83CT1SGer2zhcPgPWZFwJwwZg2E2lgNJAyv8umEky /Oi5SBJsXpagv7pc94wNCCfvijJ/h6XFAWpCvFVmlKdKitwJ/rIIvbUDdrbYTePiUgypNccTE wueqoaMs/GEiwsnEdW0us5Oq/o+hET+lHy6W2d3QC/Hk1pUwyDv86MbeDeMvR/Wb4E2C3ppmN byXBaHGKBSbSyA2sgqbV3vXRwXimVEn8aoXpBWTieV9fNRZ7I0PO4G7cwFjFYk6HkxFDRHJWK re2O86fBL35NaZO2lI4RHrapbvI8xMUuT2UewhJwanUckPhMmo=
Archived-At: <https://mailarchive.ietf.org/arch/msg/rfc-markdown/_Y9hVGGIfcA_Fk_kKmooeAcai-M>
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 05:46:55 -0000

On 2017-12-08 01:47, Carsten Bormann wrote:
> 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.

FWFW, rfc2629.xslt does, see 
<https://www.greenbytes.de/tech/webdav/rfc2629xslt/rfc2629xslt.html#ext-rfc2629.xref>, 
so kramdown-rfc in theory could support it for that backend.

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

Right.

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

I did some experiments with the output of kramdown-rfc as used in HTTP 
and QUIC WG documents (for instance: 
<https://www.greenbytes.de/tech/webdav/draft-ietf-quic-http-08.html#rfc.section.3.1>), 
and heuristics work a bit better if you do not have to worry about line 
breaks. But it's still only heuristics.

Best regards, Julian