[xml2rfc] Question about “tocInclude” in xml2rfc

Stuart Cheshire <cheshire@apple.com> Thu, 04 March 2021 04:48 UTC

Return-Path: <cheshire@apple.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 BA7953A104F for <xml2rfc@ietfa.amsl.com>; Wed, 3 Mar 2021 20:48:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.347
X-Spam-Level:
X-Spam-Status: No, score=-7.347 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.248, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_HI=-5, 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=apple.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 AzK98MKJaHWi for <xml2rfc@ietfa.amsl.com>; Wed, 3 Mar 2021 20:48:25 -0800 (PST)
Received: from rn-mailsvcp-ppex-lapp35.apple.com (rn-mailsvcp-ppex-lapp35.rno.apple.com [17.179.253.44]) (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 7C3E23A104E for <xml2rfc@ietf.org>; Wed, 3 Mar 2021 20:48:25 -0800 (PST)
Received: from pps.filterd (rn-mailsvcp-ppex-lapp35.rno.apple.com [127.0.0.1]) by rn-mailsvcp-ppex-lapp35.rno.apple.com (8.16.0.43/8.16.0.43) with SMTP id 1244m3nf018389 for <xml2rfc@ietf.org>; Wed, 3 Mar 2021 20:48:25 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=from : content-type : content-transfer-encoding : mime-version : subject : message-id : date : to; s=20180706; bh=Mnw4uID0ZFCIB3fu2YL0M3k/o5Wh1/sQVTbajbfOV20=; b=rsTbB+NIwZsTdQj+IcC4/4LQA2e1zfyr9Vi3PV/F9+EIqJMim2b09iJVt6HqVreV0vRv lruw//fbvEf5rXGUn82JgxHMkN97I27+y4wvUVI/M1UA205Cm/VAZW1GQvIFzd3MUerA CYx3Hapqahiy9YqCgH4DfXXMKslXqMKMXWX9uSfEEzJSWl58sTjAUGa0PPXKHT33hwm3 eu01TSTL3Vdcl1ig7ZSN7PxJOG03lOwwGA6pWaFr2JapAuLFkt6bYAevNh8D/cUxXrgC LT8bO1CkNmVQUZYa5mDNAWvLy9BQ3JdNGfA5CE55NZe/elaOwnCNN5rwUtnxlQnK3rgf JA==
Received: from rn-mailsvcp-mta-lapp01.rno.apple.com (rn-mailsvcp-mta-lapp01.rno.apple.com [10.225.203.149]) by rn-mailsvcp-ppex-lapp35.rno.apple.com with ESMTP id 36yjga24fw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for <xml2rfc@ietf.org>; Wed, 03 Mar 2021 20:48:25 -0800
Received: from rn-mailsvcp-mmp-lapp03.rno.apple.com (rn-mailsvcp-mmp-lapp03.rno.apple.com [17.179.253.16]) by rn-mailsvcp-mta-lapp01.rno.apple.com (Oracle Communications Messaging Server 8.1.0.7.20201203 64bit (built Dec 3 2020)) with ESMTPS id <0QPF00YDCHCO0PG0@rn-mailsvcp-mta-lapp01.rno.apple.com> for xml2rfc@ietf.org; Wed, 03 Mar 2021 20:48:24 -0800 (PST)
Received: from process_milters-daemon.rn-mailsvcp-mmp-lapp03.rno.apple.com by rn-mailsvcp-mmp-lapp03.rno.apple.com (Oracle Communications Messaging Server 8.1.0.7.20201203 64bit (built Dec 3 2020)) id <0QPF00T00H66YD00@rn-mailsvcp-mmp-lapp03.rno.apple.com> for xml2rfc@ietf.org; Wed, 03 Mar 2021 20:48:24 -0800 (PST)
X-V-A:
X-V-T-CD: 827d2dc74289835954c562e64b1c0212
X-V-E-CD: 987b1ad1200035e81b58a96c26458e61
X-V-R-CD: 3081dc67154176eb19624e366c5e9929
X-V-CD: 0
X-V-ID: 53ac6f3c-cbc5-4d41-a967-2733220347d2
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.761 definitions=2021-03-04_01:2021-03-03, 2021-03-04 signatures=0
Received: from [17.234.66.40] (unknown [17.234.66.40]) by rn-mailsvcp-mmp-lapp03.rno.apple.com (Oracle Communications Messaging Server 8.1.0.7.20201203 64bit (built Dec 3 2020)) with ESMTPSA id <0QPF00BIHHCFRK00@rn-mailsvcp-mmp-lapp03.rno.apple.com> for xml2rfc@ietf.org; Wed, 03 Mar 2021 20:48:19 -0800 (PST)
From: Stuart Cheshire <cheshire@apple.com>
Content-type: text/plain; charset="utf-8"
Content-transfer-encoding: quoted-printable
MIME-version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\))
Message-id: <E3AF770D-A1B5-4AB0-A6FD-CB74D44349D0@apple.com>
Date: Wed, 03 Mar 2021 20:48:15 -0800
To: xml2rfc@ietf.org
X-Mailer: Apple Mail (2.3608.120.23.2.1)
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.761 definitions=2021-03-04_01:2021-03-03, 2021-03-04 signatures=0
Archived-At: <https://mailarchive.ietf.org/arch/msg/xml2rfc/QJL96SFM0uOK5oqndF3SEk8lF3w>
Subject: [xml2rfc] Question about “tocInclude” in xml2rfc
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: Thu, 04 Mar 2021 04:48:27 -0000

I have an Internet Draft that is quite short and doesn’t need a Table of Contents.

In the XML source, I set

    tocInclude="false"

but when I try to build it using xml2rfc 3.5.0 I get the errors below.

    Traceback (most recent call last):
      File "/Users/cheshire/Library/Python/3.7/bin/xml2rfc", line 8, in <module>
        sys.exit(main())
      File "/Users/cheshire/Library/Python/3.7/lib/python/site-packages/xml2rfc/run.py", line 739, in main
        writer.write(filename)
      File "/Users/cheshire/Library/Python/3.7/lib/python/site-packages/xml2rfc/writers/text.py", line 343, in write
        text = self.process()
      File "/Users/cheshire/Library/Python/3.7/lib/python/site-packages/xml2rfc/writers/text.py", line 300, in process
        self.add_pageno_placeholders()
      File "/Users/cheshire/Library/Python/3.7/lib/python/site-packages/xml2rfc/writers/text.py", line 372, in add_pageno_placeholders
        for e in toc.xpath('.//xref[2]'):
    AttributeError: 'NoneType' object has no attribute ‘xpath’

I tried using draft-davies-template-bare-07.xml (downloaded from <https://www.rfc-editor.org/materials/FAQ-xml2rfcv3.html>) and got the same problem. When I change “tocInclude” from “true” to “false” it gives the same errors.

If I try using the web-based tool at <https://xml2rfc.tools.ietf.org/> I get the same errors. The original draft-davies-template-bare-07.xml file works; when I change “tocInclude” from “true” to “false” it gives the same errors.

Any hints on how to fix this?

Stuart Cheshire