Subject: [Tools-discuss] producing reference-I.D.* from .xml file

From: Michael Richardson <[email-masked]>
Date: Thu, 31 Jan 2019 13:16:10 -0500

I have a couple of documents which reference each other.
I often wind up push out one mostly -00 version to DT, and then
after a suitable delay xml2rfc.tools.ietf.org/public/rfc/bibxml3
will have a reference available, and then I can resolve the (possibly)
circular references.  But of course, I'm out one revision in the loop.

I figure I should be able to just generate the reference.I-D.* contents
myself.

Does xml2rfc do this? I can't find an argument would do that.
Is another tool I should use?

--
Michael Richardson <[email-masked]>, Sandelman Software Works
 -= IPv6 IoT consulting =-

---

From: Julian Reschke <[email-masked]>
Date: Thu, 31 Jan 2019 19:32:48 +0100

> Is another tool I should use?

With rfc2629.xslt, you can specify the XML source for a bib entry, and 
it will pull out most fields for you.

Of course that'll be an extra processing step.

Best regards, Julian

---

From: Henrik Levkowetz <[email-masked]>
Date: Thu, 31 Jan 2019 19:44:14 +0100

Hi Michael,

> Is another tool I should use?

It doesn't, but I see no reason why it shouldn't.  I've added it to my
list of things to do for the next release.

Regards,

	Henrik

---

From: Michael Richardson <[email-masked]>
Date: Thu, 31 Jan 2019 16:37:09 -0500

> With rfc2629.xslt, you can specify the XML source for a bib entry, and it
    > will pull out most fields for you.

So, I need to run it through XSLT?  Do you have a cheat sheet for that?

--
]               Never tell me the odds!                 | ipv6 mesh networks [
]   Michael Richardson, Sandelman Software Works        |    IoT architect   [
]     [email-masked]  http://www.sandelman.ca/        |   ruby on rails    [

---

From: Julian Reschke <[email-masked]>
Date: Fri, 1 Feb 2019 06:06:02 +0100

> So, I need to run it through XSLT?  Do you have a cheat sheet for that?

<https://greenbytes.de/tech/webdav/rfc2629xslt/rfc2629xslt.html>

If you are on Macos or Linux, getting xsltproc installed should be easy.

Then write the reference like that:

<reference anchor="NAME">
   <x:source xmlns:x='http://purl.org/net/xml2rfc/ext' 
href="sourcefile.xml" basename="draft-...."/>
</reference>

and process it like:

xsltproc clean-for-DTD-xslt input.xml > output.xml

Best regards, Julian