Subject: [rfc-i] Proper way to reference drafts in the current version of xml2rfc?

From: "Paul Hoffman" <[email-masked]>
Date: Wed, 18 Nov 2020 15:55:27 -0800

Greetings. I have tried the following in my <references>:
    <?rfc include="reference.I-D.ietf-dprive-dnsoquic.xml" ?>
This fails in xml2rfc with
    draft-ietf-dnsop-rfc8499bis.xml(0): Error: IDREF attribute target 
references an unknown ID "ietf-dprive-dnsoquic", at None

So, based on the RFC Editor's FAQ, section 3.1, I instead tried:
    <xi:include 
href="https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-dprive-dnsoquic.xml"/>
This fails with:
    Error: Unable to parse the XML document: 
draft-ietf-dnsop-rfc8499bis.xml
     ...stuff.../draft-ietf-dnsop-rfc8499bis.xml: Line 1977: Namespace 
prefix xi on include is not defined

So, how does one reference a draft using the current xml2rfc tool?

--Paul Hoffman
_______________________________________________
rfc-interest mailing list
[email-masked]
https://www.rfc-editor.org/mailman/listinfo/rfc-interest

---

From: "Paul Hoffman" <[email-masked]>
Date: Wed, 18 Nov 2020 17:27:12 -0800

Sorry, please ignore the question. I was misinterpreting the error 
message.

FWIW:

> references an unknown ID "ietf-dprive-dnsoquic", at None

That is actually about the calling reference, which I had as <xref 
target="ietf-dprive-dnsoquic"/> instead of <xref 
target="I-D.ietf-dprive-dnsoquic"/>. The error message meant "you 
included this in a reference section but didn't use the refernce".

--Paul Hoffman

---

From: Michael Richardson <[email-masked]>
Date: Thu, 19 Nov 2020 02:37:52 -0500

> references an unknown ID "ietf-dprive-dnsoquic", at None

That's the correct syntax at your document.
(The trailing .xml is apparently important, but it has in the past worked
without it, which may be a bug)
It seems that the ietf-dprive-dnsoquic content might be broken.
There is a cache in ~/.cache/xml2rfc and maybe your copy is broken.
If not, then maybe it was rendered wrong by the DT due to an error?

    > Error: Unable to parse the XML document: draft-ietf-dnsop-rfc8499bis.xml
    > ...stuff.../draft-ietf-dnsop-rfc8499bis.xml: Line 1977: Namespace prefix
    > xi on include is not defined

I dunno about this.

--
Michael Richardson <[email-masked]>   . o O ( IPv6 IøT consulting )
           Sandelman Software Works Inc, Ottawa and Worldwide

---

From: Henrik Levkowetz <[email-masked]>
Date: Thu, 19 Nov 2020 09:17:37 +0100

> That's the correct syntax at your document.

Only for a v2 document, though.

> without it, which may be a bug)

No, it's the difference between using --legacy and not.  If you don't use
--legacy, you must have the full correct URL, with hostname, path, and extension.

>     > xi on include is not defined

In the <rfc> element, the namespace declaration for 'xi' is missing.  You
should add xmlns:xi="http://www.w3.org/2001/XInclude" as an attribute to
the opening <rfc> tag.

	Henrik