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

Jeffrey Yasskin <jyasskin@chromium.org> Fri, 08 December 2017 04:45 UTC

Return-Path: <jyasskin@google.com>
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 83D3A129508 for <rfc-markdown@ietfa.amsl.com>; Thu, 7 Dec 2017 20:45:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Level:
X-Spam-Status: No, score=-2.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=chromium.org
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 EbuexV1fuHoV for <rfc-markdown@ietfa.amsl.com>; Thu, 7 Dec 2017 20:45:37 -0800 (PST)
Received: from mail-it0-x22d.google.com (mail-it0-x22d.google.com [IPv6:2607:f8b0:4001:c0b::22d]) (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 3C62C129503 for <rfc-markdown@ietf.org>; Thu, 7 Dec 2017 20:45:37 -0800 (PST)
Received: by mail-it0-x22d.google.com with SMTP id z6so2318639iti.4 for <rfc-markdown@ietf.org>; Thu, 07 Dec 2017 20:45:37 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CNhX6j+p3MMPEvy4vIylgZi0b134Ge9AIuwYxovZPVo=; b=HkKPmgTwGq2jvij+iCQa7unwV41CnRaaVASSPfUDrYgAj3C0S3m9hA9Gsz3DGBVj7i UL/J4/a6efbONhGO9b2tQNYEpOyEv58NBPoqceqNV/n7xVTC5SbY7hBAtkChd32wW7fF /nMOMwzKF6fP8MC4PXv+oc8YXkWB/+o9wXeh4=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CNhX6j+p3MMPEvy4vIylgZi0b134Ge9AIuwYxovZPVo=; b=aq5iH6Ajq0M5m3hQL8PSvJHwqOoVOm1ioX4vNSEvyjRVokzmvUrs6mGSnALQ9h2sDR NxeJF7boRX0irHkNU3t5htsOK0oqFUQyX1EiJlsx+/UpCPtZZVQv9PdGzLOenCXn9BQ6 CxXDj0ON2ZIweRmsUQozDFi1nwhfDIlKgIXVJCarZGkvRk2416tM7DUS935fS1BzaWHK zGs1q9rwW+aKLxDbxk6A7PYrjeakQcPJMTycBj+t6vMagochuy4iMjrwTEAj2Uvw/uF/ fbrIcsqrXRa3bwxdALJNlv9qvb8RS6aCVa17D5mc3eWrEJWLGjTDo5g8kHvkieypi4ud 4crQ==
X-Gm-Message-State: AJaThX5kWy1+kZfEi/VqVFrjJzO1hglidllDMGNKxGbU4sIUFHaIwAHN MG44zD4Pp59yrOVrndeimmy7+mAoQXhCgsHk0Ruv/Q==
X-Google-Smtp-Source: AGs4zMYQc8osxT2SNlGocGb+FCn+tJbIuhZDKY+XTqtd2q+dN35OoxZmpzpkoV6sk2EzS+4q+Gx5TdZKsMzYJrN3hq8=
X-Received: by 10.107.205.69 with SMTP id d66mr43684920iog.254.1512708335972; Thu, 07 Dec 2017 20:45:35 -0800 (PST)
MIME-Version: 1.0
References: <CANh-dXkJe3yV8a8HbGh1munOJvn-whKrrN-Yzh=AYitn=9Yp6g@mail.gmail.com> <9FC5EDD7-BCC4-4DF9-9671-3BBDDDD581D3@tzi.org>
In-Reply-To: <9FC5EDD7-BCC4-4DF9-9671-3BBDDDD581D3@tzi.org>
From: Jeffrey Yasskin <jyasskin@chromium.org>
Date: Fri, 08 Dec 2017 04:45:25 +0000
Message-ID: <CANh-dX=s-rd0X3+fYycazebWLpMMxdF5gSQYQ1Jpvt3i9qeGvg@mail.gmail.com>
To: Carsten Bormann <cabo@tzi.org>
Cc: Jeffrey Yasskin <jyasskin@chromium.org>, rfc-interest@rfc-editor.org, rfc-markdown@ietf.org
Content-Type: multipart/alternative; boundary="94eb2c188716045531055fccdb44"
Archived-At: <https://mailarchive.ietf.org/arch/msg/rfc-markdown/4QAW8zvPKAgNDZSiEK7yz8FdFk4>
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 04:45:39 -0000

On Thu, Dec 7, 2017 at 4:47 PM Carsten Bormann <cabo@tzi.org> 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.
>

Yeah, I mostly mentioned kramdown-rfc to make sure any answers like "use
https://www.greenbytes.de/tech/webdav/rfc2629xslt/rfc2629xslt.html#ext-rfc2629.xref"
included instructions for how to get the right attributes into the XML from
.md source.

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

Ah, I see: https://tools.ietf.org/tools/rfcmarkup/ does this for URLs under
https://tools.ietf.org/html/, but the id/ URLs only use xml2rfc or
rfc2629.xslt and so don't get the benefit. That answers my question of how
to test that my source gives the right section links, and in fact
https://tools.ietf.org/html/draft-yasskin-http-origin-signed-responses-01#section-2
has decent deep links, while
https://tools.ietf.org/id/draft-ietf-httpbis-origin-frame-04.html#rfc.section.1
doesn't.

I'm happy to conclude that my mistake was in sending out the wrong links,
and that this list doesn't need to do anything until RFCXML v3 support
comes along.

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

(https://github.com/rfc-format/draft-iab-xml2rfc-v3-bis/issues/26)

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


Thanks,
Jeffrey