Re: [xml2rfc] XInclude should be used instead of PI include

Kesara Rathnayake <kesara@staff.ietf.org> Mon, 26 June 2023 21:41 UTC

Return-Path: <kesara@staff.ietf.org>
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 4BE74C151535 for <xml2rfc@ietfa.amsl.com>; Mon, 26 Jun 2023 14:41:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.896
X-Spam-Level:
X-Spam-Status: No, score=-1.896 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=staff-ietf-org.20221208.gappssmtp.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tYXokjn_CtRX for <xml2rfc@ietfa.amsl.com>; Mon, 26 Jun 2023 14:41:47 -0700 (PDT)
Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 09916C151074 for <xml2rfc@ietf.org>; Mon, 26 Jun 2023 14:41:46 -0700 (PDT)
Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-98df69cacd1so203308066b.1 for <xml2rfc@ietf.org>; Mon, 26 Jun 2023 14:41:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=staff-ietf-org.20221208.gappssmtp.com; s=20221208; t=1687815704; x=1690407704; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=LfWn2yuSh+AnSy2JB4wRuHivMswktYonPATeL95Six0=; b=RusEpK+QmG+ur4QP75SAgUDusFI7zRdUeEVerT2B03VvXdqeRX28fdjimdWfXqa2bf nUdjXiXPILEXZ9fEv27Cc9Lr/O0iXgrIlIQABYvn3rgp0G0+7lMnHB/XR/Kqn3LdB9ws jCJNmEXGvSWnKRfUHlurXRhvYYQYDLgss1TveRRf0w/69rnUlGgKKhprnNDgulmmAKzl rsNfsKNguzT7ufK4Xx9HVzqmMJVJvdGhh51blwIIIJ4E/Aq0d0gLFCAkSCn1icLZxmvq A3sei873JpoYV5xM9Hmm8yxXdWhvwq7HMDGdYifYTbF8FnMPzZnlPtgcMuQOdfPpetrn L3Ag==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687815704; x=1690407704; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LfWn2yuSh+AnSy2JB4wRuHivMswktYonPATeL95Six0=; b=VbHjpePdRv+X7pUg/8J7XlU8JXes1/FzPFH53yT9WjHtIhoaXMn81c1zDHbyor34iW LJ1RZXy1cXf2rc4S2l3qXlek2p39JVE6rTPaJVH5zUB1z0mTUkG8hEnXOQ5xUoJolhLZ 07UU2EbSGKR3+/eHYWp4AzUjk48OLPGzaMbfglP6dyAo9Oct9IsKKSrSScts6jVGmmPy NE6pL+yEsSMNSJoOzcXNrhxF5nJLD+Gq9l4U/OF1tACyw5PFw5dTW09rtz3U5Yw7VELC Xc2fBjcTKfv8E3vjOLrwGoAVb0R+PWdjfwLTg4DJJptroywmQLwMxWbHtH9Sn025FiLw qH4Q==
X-Gm-Message-State: AC+VfDxZYGRYOGDCQXKiye4G7VPim9/nYESuda93aCD/15ksAT11+v5c kIEhU3OHXntX3h4jURf3+dh3xthrvBNK/36ahTmVW4RQISJZgKAVSeljQw==
X-Google-Smtp-Source: ACHHUZ4IbEPJwfaTFKW7XfzkDU1XPSy05gWLWdRCXzy1J4wPGo8YaXqpAk27ce1+V7q1+Asj3lfKkVJ9xs1ZIwOrSV4=
X-Received: by 2002:a17:907:7884:b0:98e:23d3:bf47 with SMTP id ku4-20020a170907788400b0098e23d3bf47mr4885747ejc.36.1687815704601; Mon, 26 Jun 2023 14:41:44 -0700 (PDT)
MIME-Version: 1.0
References: <m25y7auglb.wl-randy@psg.com> <B71CAF97-2924-47FF-B28C-61E9C1B93CB1@tzi.org> <m21qhyueoj.wl-randy@psg.com> <2612E60E-6B70-44DE-A87A-5ADB7F21F923@tzi.org> <40975c07-be1c-124b-f9fa-6d8a979157b5@nostrum.com>
In-Reply-To: <40975c07-be1c-124b-f9fa-6d8a979157b5@nostrum.com>
From: Kesara Rathnayake <kesara@staff.ietf.org>
Date: Tue, 27 Jun 2023 09:41:33 +1200
Message-ID: <CAD2=Z86QZ1qMK1=8L2Vo7c=0N0LCPOOdh5QT_OMudAKQNu6FJQ@mail.gmail.com>
To: Robert Sparks <rjsparks@nostrum.com>
Cc: xml2rfc@ietf.org
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/xml2rfc/-XLM6YHwXQ0oGQKz9hhdEK4bAyQ>
Subject: Re: [xml2rfc] XInclude should be used instead of PI include
X-BeenThere: xml2rfc@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: XML2RFC discussion list <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, 26 Jun 2023 21:41:51 -0000

There's a guide about using XInclude at
https://authors.ietf.org/en/references-in-rfcxml

Also, you need to have `xmlns:xi="http://www.w3.org/2001/XInclude"` in
the `rfc` element.
Example:
```
<rfc
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="info"
  ...
  version="3">
```

  --Kesara

On Tue, 27 Jun 2023 at 09:37, Robert Sparks <rjsparks@nostrum.com> wrote:
>
> On 6/26/23 4:01 PM, Carsten Bormann wrote:
>
> > On 26. Jun 2023, at 22:55, Randy Bush <randy@psg.com> wrote:
> >> i have a local rsunk repo and am doing
> >>
> >>     <references title="Normative References">
> >>       <?rfc include="reference.RFC.2119.xml"?>
>
> That would look like <xi:include
> href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
>
> All of Carsten's observation about this hardcoding an external reference
> and that the URLs have been changing a _lot_ recently are correct, as
> you can see from the before-preptool source for one of the most recently
> published RFCs:
>
> rjsparks@undex feat-rfc % curl --no-progress-meter
> https://www.rfc-editor.org/prerelease/rfc9425.notprepped.xml | grep 8174
>      <xref target="RFC8174"/> when, and only when, they appear in all
> capitals,
> <xi:include
> href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
>
> (The RPC is shifting to using bib.ietf.org to which xml2rfc.ietf.org
> redirects).
>
> For Internet-Drafts, you'll need to use an href that looks like
>
> https://bib.ietf.org/public/rfc/bibxml-ids/reference.I-D.ietf-rtgwg-segment-routing-ti-lfa.xml
>
> That is, using xi:include comes with the extra burden of knowing the
> names of the bibxml datasets.
>
> There are conversations ongoing about how to avoid these
> author-unfriendly aspects.
>
> RjS
>
> >>       <?rfc include="reference.RFC.2622.xml"?>
> >>       <?rfc include="reference.RFC.2725.xml"?>
> >>
> >> what should i be doing if i want to go to xml heaven?
> > As the warning says, the canonical way is now to use XInclude.
> > XInclude makes you hard-code the full URL to those reference items.
> > This is great if you always want to use the information stored remotely (and if the URLs are stable, which they haven’t been for the last half decade).
> >
> > I don’t know much about XInclude as kramdown-rfc does all the reference handling for you (and can share a cache with xml2rfc, which you can prefill), so I don’t have to remember the details.
> >
> > I’m sure others will speak up…
> >
> > Grüße, Carsten
> >
> > _______________________________________________
> > xml2rfc mailing list
> > xml2rfc@ietf.org
> > https://www.ietf.org/mailman/listinfo/xml2rfc
>
> _______________________________________________
> xml2rfc mailing list
> xml2rfc@ietf.org
> https://www.ietf.org/mailman/listinfo/xml2rfc



-- 
Kesara Rathnayake
Senior Software Development Engineer - IETF Administration LLC
kesara@staff.ietf.org