Re: [xml2rfc] Inline use of <sourcecode>

Anders Rundgren <anders.rundgren.net@gmail.com> Mon, 18 January 2021 13:09 UTC

Return-Path: <anders.rundgren.net@gmail.com>
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 AD8B53A1321 for <xml2rfc@ietfa.amsl.com>; Mon, 18 Jan 2021 05:09:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.36
X-Spam-Level:
X-Spam-Status: No, score=-2.36 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.262, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 lRFOTBMnMGEf for <xml2rfc@ietfa.amsl.com>; Mon, 18 Jan 2021 05:09:46 -0800 (PST)
Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (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 DC86B3A131B for <xml2rfc@ietf.org>; Mon, 18 Jan 2021 05:09:45 -0800 (PST)
Received: by mail-wm1-x331.google.com with SMTP id 190so13556005wmz.0 for <xml2rfc@ietf.org>; Mon, 18 Jan 2021 05:09:45 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=H4EUjoet1gMi2zH/Dvn0NrkWjZGfHn4UpPeUdoEp71A=; b=XNRcGC2AADkUqqn0Mmep39NtRjMorvklLXdoLkMvMDgNPM8YCqy8IO341V/TlDd9Pu rLmeBzBsHD/NNFlGWH7U4lMxkmoi6Xfzy+s002iqR+szf8AMSCzoEuu5OSG7tm9KR/uT ltKXaGOq8wtz+8+qtvHeXD/iUkB21+Xmv13ITCTDadg66G7IroLcZiEvvNr/mmURQjCn 64p1VxBQ/VI43qFQDB4tfpnCqwZIPl3yJPdwDE4wr3T+LOwKDdWPze3jz4EKtyNr9nB9 FFqT+6Pi8PIFT2Gd8galUtw7jr6+N/g3efpvVjfTYLJ9IQQtEgGWfjj9QRToFIK20nUK WJ6w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=H4EUjoet1gMi2zH/Dvn0NrkWjZGfHn4UpPeUdoEp71A=; b=YQQ9KcqsWtNTtk4y0xqbvZnoQXfLQte8ftf3eAxXGy2ob3AzUsskPjZSy7b7VEipgJ FfM1+b26DlGRTuvNCG46fgN7TZBVg/QL6ebd7v/luKjZtOMr753IwWR+9rI2/harKzD1 zq1ps1SiawoxeLaFO368jU1Safj7+RfKBOXf6HTHEEr50/rj1JQ2sBG+13v58wjRXccJ fKyS8YdPu6eGbvcmw0+KN0PGa5mRr4QJ5Sb//2wJROXwd8P5xhoz5NbeVhxjaFJFwuZF JZ6EbPHZ70EvARcZAZnK9H78CgAsbqT497ul9uBWhku3NuATMPOGB8ikzKM37D5b5YY6 SoZg==
X-Gm-Message-State: AOAM533DW3FFQeu6jv78jMKl/iq5Bshj6MVnVWvAmJaPhjkaOz/9FifH LnAnUWqNc4kCqJj3/yi16Ph+4WgkOwI=
X-Google-Smtp-Source: ABdhPJzYOQBRUYCDXKbitLuSHM4TviYzucjrbdShqhZ1seHuLdzyEUI3UHFBdDUtnnsQNvQ3WQLWHQ==
X-Received: by 2002:a05:600c:350c:: with SMTP id h12mr20932779wmq.79.1610975383858; Mon, 18 Jan 2021 05:09:43 -0800 (PST)
Received: from [192.168.1.79] (25.131.146.77.rev.sfr.net. [77.146.131.25]) by smtp.googlemail.com with ESMTPSA id y11sm26109256wmi.0.2021.01.18.05.09.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Jan 2021 05:09:42 -0800 (PST)
To: Roger Price <roger@rogerprice.org>, xml2rfc Mailing List <xml2rfc@ietf.org>
References: <alpine.DEB.2.20.2101181313160.26613@maria.rogerprice.org>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
Message-ID: <2ce15a98-58d9-724e-7918-ac51170d08f9@gmail.com>
Date: Mon, 18 Jan 2021 14:09:40 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1
MIME-Version: 1.0
In-Reply-To: <alpine.DEB.2.20.2101181313160.26613@maria.rogerprice.org>
Content-Type: text/plain; charset="iso-8859-15"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/xml2rfc/Hdke8icbNNixzINO9FdjU29upv8>
Subject: Re: [xml2rfc] Inline use of <sourcecode>
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, 18 Jan 2021 13:09:48 -0000

On 2021-01-18 13:58, Roger Price wrote:
> I'm trying to work out how to markup a protocol token in running text since
> there seems be no inline version of <sourcecode> in the way that HTML has
> <code>.

Hi Roger,
I have used <tt> successfully:

https://www.ietf.org/archive/id/draft-jordan-jws-ct-01.html#name-canonicalize-the-json-objec
https://tools.ietf.org/html/draft-jordan-jws-ct-01#section-3.1.2

Are you using the on-line version?
The "" around <tt> objects for RfcMarkup appears to have been removed; 8 months ago they were there...

Thanx,
Anders

> 
> It looks as if <sourcecode> is the correct element since RFC 7991 clause 2.48
> https://tools.ietf.org/html/rfc7991#page-59 says:
> 
>    « ...  When <sourcecode> is a child of <figure> or <section>, it provides
>      full control of horizontal whitespace and line breaks...
>      (When <sourcecode> is a child of other elements, it flows with the text
>      that surrounds it.) »
> 
> I tried the markup:
> 
>    <t>(a) Protocol token <sourcecode>LB</sourcecode> <t>indicates a low battery.
>    <t>(b) Protocol token <tt>LB</tt> indicates a low battery.
> 
> In the .txt file it produces
> 
>      (a) Protocol token
> 
>      LB
> 
>      indicates a low battery.
> 
>      (b) Protocol token "LB" indicates a low battery.
> 
> and in the .html file it produces
> 
>     (a) Protocol token
> 
>         LB
> 
>     indicates a low battery.
> 
>     (b) Protocol token LB indicates a low battery.
> 
> Comments:
> 
> 1. Correct: The LB's are correctly formatted in the HTML in a monospaced font.
> 
> 2. Bug: In both outputs (a), although <sourcecode> is a child of <t> it does not
> flow with the text as stated in the RFC.
> 
> 3. Ugly: In the txt file, (b) sees the token OB adorned with quote characters
> which are not part of the protocol.  The txt and html files do not agree.
> 
> 4. Ugly: A <t> element is needed after <sourcecode> since <sourcecode> is not
> behaving as a true inline element.
> 
> What is the recommended way of marking up inline source code?
> 
> Roger
> 
> 
> _______________________________________________
> xml2rfc mailing list
> xml2rfc@ietf.org
> https://www.ietf.org/mailman/listinfo/xml2rfc
>