Re: [rfc-i] line wrapping in XML

Martin Thomson <mt@lowentropy.net> Fri, 30 October 2020 00:33 UTC

Return-Path: <rfc-interest-bounces@rfc-editor.org>
X-Original-To: ietfarch-rfc-interest-archive@ietfa.amsl.com
Delivered-To: ietfarch-rfc-interest-archive@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8C0213A05A6; Thu, 29 Oct 2020 17:33:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.45
X-Spam-Level:
X-Spam-Status: No, score=-2.45 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=fail (2048-bit key) reason="fail (message has been altered)" header.d=lowentropy.net header.b=NAU0hLHl; dkim=fail (2048-bit key) reason="fail (message has been altered)" header.d=messagingengine.com header.b=Z1znEOqu
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 T-NchkPA0VFZ; Thu, 29 Oct 2020 17:33:22 -0700 (PDT)
Received: from rfc-editor.org (rfc-editor.org [4.31.198.49]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 189663A045E; Thu, 29 Oct 2020 17:33:22 -0700 (PDT)
Received: from rfcpa.amsl.com (localhost [IPv6:::1]) by rfc-editor.org (Postfix) with ESMTP id DBB93F4071D; Thu, 29 Oct 2020 17:33:07 -0700 (PDT)
X-Original-To: rfc-interest@rfc-editor.org
Delivered-To: rfc-interest@rfc-editor.org
Received: from localhost (localhost [127.0.0.1]) by rfc-editor.org (Postfix) with ESMTP id 4D3BEF4071D for <rfc-interest@rfc-editor.org>; Thu, 29 Oct 2020 17:33:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at rfc-editor.org
Authentication-Results: rfcpa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=lowentropy.net header.b=NAU0hLHl; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=Z1znEOqu
Received: from rfc-editor.org ([127.0.0.1]) by localhost (rfcpa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4Edg76AaYuZg for <rfc-interest@rfc-editor.org>; Thu, 29 Oct 2020 17:33:03 -0700 (PDT)
Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by rfc-editor.org (Postfix) with ESMTPS id 2490BF4071A for <rfc-interest@rfc-editor.org>; Thu, 29 Oct 2020 17:33:03 -0700 (PDT)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 8FC68B59 for <rfc-interest@rfc-editor.org>; Thu, 29 Oct 2020 20:33:16 -0400 (EDT)
Received: from imap10 ([10.202.2.60]) by compute1.internal (MEProxy); Thu, 29 Oct 2020 20:33:16 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lowentropy.net; h=mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type; s=fm3; bh=I+HXrYvxM7SU9EggY1hpRy/0nWkuNiX BN8D5netKpSA=; b=NAU0hLHl1flSJLIGEh+J3KkTSWW6z3ZLRyEoq4u0ZXK2pAw lkv4aEArmV24D8lgnhWcLywNq44NulfIOroVMoFbb/CuDBUiZot1NbjfKoFlMfRE QNHnP7xX9xXD7bVPOdKh1iIh7ky3vbF+hHnUrmSYISqjegXq8kvyf+GuntCpqKdU 2BZNIU+aQHfhX+DrrUh5hPsSfdTCRqj/jJ12rsg4+cF2Sk5KrI3h2T8bEaHC7P+b +pREqfX6i1jFPRrMBD/ihslv1ws0E/UCNq2/sSWl87klxM8d1Y/HeTK1LvqjspkZ avQhCIIVl2QnSvUPVYGhL/fFJyYW3zkcYlED06Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=I+HXrY vxM7SU9EggY1hpRy/0nWkuNiXBN8D5netKpSA=; b=Z1znEOquQG9aVo7rR8c323 q6B387qkyVhC4BUaoLeV3ZJeaj3l0WqfE0vOJjOqfrBpKEhXurbGQzB2paKhZyam xPmn/x6yiM47WrAoa9QHjUZCv2d4BDPVzEaoIjFj1613RURyJVCypBFVgvNzf44b 7ivg/pcK/T3WkaLDZ8XiZE27AeEHRAuuWdMdIIBOHLjT1ioWSGTO25xANL6YlaIB UXNNU9xX6/LvEsZqKlcDj18ONrUdk6Uuj8TZtoKyK40mEXM9Y9tNM5qWzZ9S5CmT 5rJSNKedit2NEKjucUzPTpoqEhMFbWplvzDU8SsG1drJ/XkqUofJzotc/sdew/TA ==
X-ME-Sender: <xms:Sl-bXyW7mN1M_L34SDoAKx2puJuM_-AUS0_0mz3hg9bv2vDHCAwo2A> <xme:Sl-bX-kIPXbGt1UnaaIek_IqmEEptjBFrQJB08xcjg-W2Vv9GNYRlXRWuWfuc5l2G x81EkOno0kqiZju17U>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrleeggddvfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgesthdtre dtreertdenucfhrhhomhepfdforghrthhinhcuvfhhohhmshhonhdfuceomhhtsehlohif vghnthhrohhphidrnhgvtheqnecuggftrfgrthhtvghrnhepheevvdfffefhtedvieeule ffudevgeduheefffdtveegtdevheeviedtkeegvdeknecuffhomhgrihhnpehnrghmvghs rdgsrhdpthgrghhsrdgsrhdpvghlvghmvghnthhsrdgsrhdphhhtmhhlqdhtihguhidroh hrghdpmhhnohhtrdhnvghtpdhrfhgtqdgvughithhorhdrohhrghenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmtheslhhofigvnhhtrhhoph ihrdhnvght
X-ME-Proxy: <xmx:Sl-bX2Z5KmoQHZcXJJC6yC1clyU6bvnufHrZM0TjH9TF17ceuoW0JA> <xmx:Sl-bX5XAEgBLrcm0AABMYVBVrNyLvkqTuLGy9rdODFD1B9QLY4gjlg> <xmx:Sl-bX8mhodysN5etDsk9sfuvXf98fnIN2cD3UfofiCfXwMOw7NSEcw> <xmx:TF-bX4yFlQBd9tlVLJwHgM8zG_y8MhbNChAed3R5QTj8cmge8C1jmw>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id F064D20214; Thu, 29 Oct 2020 20:33:13 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.3.0-530-g8da6958-fm-20201021.003-g69105b13-v35
Mime-Version: 1.0
Message-Id: <567ecf8f-2c0f-48ae-bb66-2e594c67bcfd@www.fastmail.com>
In-Reply-To: <996A8A43-640B-4888-B4CB-8A1081C4986C@mnot.net>
References: <30D23CA0-2A80-4BA3-AC18-285CF45FB5FF@mnot.net> <5D30DC79-3EF7-4BAC-BAAD-07224122C8D7@akamai.com> <996A8A43-640B-4888-B4CB-8A1081C4986C@mnot.net>
Date: Fri, 30 Oct 2020 11:32:53 +1100
From: Martin Thomson <mt@lowentropy.net>
To: rfc-interest@rfc-editor.org
Subject: Re: [rfc-i] line wrapping in XML
X-BeenThere: rfc-interest@rfc-editor.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "A list for discussion of the RFC series and RFC Editor functions." <rfc-interest.rfc-editor.org>
List-Unsubscribe: <https://www.rfc-editor.org/mailman/options/rfc-interest>, <mailto:rfc-interest-request@rfc-editor.org?subject=unsubscribe>
List-Archive: <http://www.rfc-editor.org/pipermail/rfc-interest/>
List-Post: <mailto:rfc-interest@rfc-editor.org>
List-Help: <mailto:rfc-interest-request@rfc-editor.org?subject=help>
List-Subscribe: <https://www.rfc-editor.org/mailman/listinfo/rfc-interest>, <mailto:rfc-interest-request@rfc-editor.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: rfc-interest-bounces@rfc-editor.org
Sender: rfc-interest <rfc-interest-bounces@rfc-editor.org>

You can configure tidy to preserve whitespace in certain elements, so it seems like a viable option.

 <option class="TidyMarkupTeach">
  <name>new-pre-tags</name>
  <type>Tag Names</type>
  <default />
  <example>tagX, tagY, ...</example>
  <description>This option specifies new tags that are to be processed in exactly the same way as HTML's <code>&lt;pre&gt;</code> element. This option takes a space or comma separated list of tag names. <br/>Unless you declare new tags, Tidy will refuse to generate a tidied file if the input includes previously unknown tags. <br/>Note you cannot as yet add new CDATA elements. <br/>This option is ignored in XML mode. </description>
  <seealso>new-blocklevel-tags</seealso>
  <seealso>new-empty-tags</seealso>
  <seealso>new-inline-tags</seealso>
  <seealso>custom-tags</seealso>
    <eqconsole />
 </option>

-- from `tidy -xml-config`


On Fri, Oct 30, 2020, at 11:28, Mark Nottingham wrote:
> Nope; tried, but it removes spaces in odd places that are semantically 
> significant.
> 
> 
> > On 30 Oct 2020, at 11:26 am, Salz, Rich <rsalz@akamai.com> wrote:
> > 
> > 
> >>   1. Can we identify a freely available tool for correctly line-wrapping XML that people can insert into their toolchain pre-RPC, so that the RPC doesn't need to hand-wrap lines?
> > 
> > https://www.html-tidy.org/
> > 
> > 
> > 
> 
> --
> Mark Nottingham   https://www.mnot.net/
> 
> _______________________________________________
> rfc-interest mailing list
> rfc-interest@rfc-editor.org
> https://www.rfc-editor.org/mailman/listinfo/rfc-interest
>
_______________________________________________
rfc-interest mailing list
rfc-interest@rfc-editor.org
https://www.rfc-editor.org/mailman/listinfo/rfc-interest