Subject: [Tools-discuss] question on datatracker access to particular I-D version

From: Tony Hansen <[email-masked]>
Date: Sun, 19 Jul 2015 06:49:51 -0400

I'm working on generating bibxml3 (bibxml for internet drafts) via
django and the datatracker database.

Is there a way to pull up a >particular version< of an I-D on the
datatracker via the URL?

That is, URLs such as

http://datatracker.ietf.org/doc/draft-hansen-rfc-use-of-pdf-02
http://datatracker.ietf.org/doc/draft-hansen-rfc-use-of-pdf?version=02
http://datatracker.ietf.org/doc/draft-hansen-rfc-use-of-pdf-02.txt
http://datatracker.ietf.org/doc/draft-hansen-rfc-use-of-pdf/02

as opposed to

http://datatracker.ietf.org/doc/draft-hansen-rfc-use-of-pdf

which pulls up the final document and lets you get at the earlier
versions after additional clicks.

    Tony Hansen

Full discussion:

I'm also looking at the possibility of making an update to remove the
<format> entries and replacing them with a target on the <reference>
element.

I had *thought* that I could do this using a reference to the
datatracker copy of the internet drafts. But there is an issue.

For each internet draft, e.g. draft-ietf-example-foo-*, there are at
least two entries:

    reference.I-D.draft-ietf-example-foo-00.xml       
    reference.I-D.ietf-example-foo.xml

That is, there is a specific entry for each version of the document with
the complete name of the document and version, PLUS a single entry for
the document >series< that does not have any version number or the
leading "draft-" prefix. This last entry is updated whenever a new
version is created

Picking a draft at random, and doing an ls -l on its variants shows this:

-r--r--r-- 1 tony tony      986 Jun 26  2014
reference.I-D.draft-hansen-rfc-use-of-pdf-00.xml
-r--r--r-- 1 tony tony     1096 Jul 21  2014
reference.I-D.draft-hansen-rfc-use-of-pdf-01.xml
-r--r--r-- 1 tony tony     1089 Jul 22  2014
reference.I-D.draft-hansen-rfc-use-of-pdf-02.xml
-r--r--r-- 1 tony tony      982 Oct 27  2014
reference.I-D.draft-hansen-rfc-use-of-pdf-03.xml
-r--r--r-- 1 tony tony      982 Jan 23 00:00
reference.I-D.draft-hansen-rfc-use-of-pdf-04.xml
-r--r--r-- 1 tony tony      983 Feb 17 00:00
reference.I-D.draft-hansen-rfc-use-of-pdf-05.xml
-r--r--r-- 1 tony tony     1089 Mar  9 00:00
reference.I-D.draft-hansen-rfc-use-of-pdf-06.xml
-r--r--r-- 1 tony tony     1090 Mar 25 00:00
reference.I-D.draft-hansen-rfc-use-of-pdf-07.xml

-r--r--r-- 1 tony tony     1090 Mar 25 00:00
reference.I-D.hansen-rfc-use-of-pdf.xml

Currently the document series entry is always identical to the
largest-numbered entry.

The relevant bits of one of these files (-02) for this discussion are:

<reference anchor='I-D.hansen-rfc-use-of-pdf'>
    <seriesInfo name='Internet-Draft'
value='draft-hansen-rfc-use-of-pdf-02' />
    <format type='TXT'
target='http://www.ietf.org/internet-drafts/draft-hansen-rfc-use-of-pdf-02.txt'
/>
</reference>

I could certainly do a direct move of the existing target so that we get

<reference anchor='I-D.hansen-rfc-use-of-pdf'
target='http://www.ietf.org/internet-drafts/draft-hansen-rfc-use-of-pdf-02.txt'>
    <seriesInfo name='Internet-Draft'
value='draft-hansen-rfc-use-of-pdf-02' />
</reference>

But that doesn't use the datatracker like I wanted.

I could make the document series entry different from the
individual-document entry, as in:

<reference anchor='I-D.hansen-rfc-use-of-pdf'
target='http://datatracker.ietf.org/doc/draft-hansen-rfc-use-of-pdf'>
    <seriesInfo name='Internet-Draft'
value='draft-hansen-rfc-use-of-pdf-07' />
</reference>

But I don't know of any way to pull up a particular version of the I-D
on the datatracker via the command line. That is, URLs such as

http://datatracker.ietf.org/doc/draft-hansen-rfc-use-of-pdf-02
http://datatracker.ietf.org/doc/draft-hansen-rfc-use-of-pdf-02.txt
http://datatracker.ietf.org/doc/draft-hansen-rfc-use-of-pdf/02

So, unless I can find a way to reference the individual version of a
document on the datatracker, the individual-document entries would need
to continue using the www.ietf.org/internet-drafts URL instead of a
datatracker URL.

---

From: Brian E Carpenter <[email-masked]>
Date: Sun, 19 Jul 2015 23:11:41 +1200

It seems to me that there's a bug.

Go to https://datatracker.ietf.org/doc/draft-hansen-rfc-use-of-pdf/02/

The links for html and pdf formats bring up the -02 version, as expected.
The link for txt format brings up the latest version.

Regards
   Brian

---

From: Robert Sparks <[email-masked]>
Date: Sun, 19 Jul 2015 13:26:01 +0200

Good find, Brian -

I'll find the right folks to look at what happens there.

(Specifically, referencing
https://www.ietf.org/id/draft-hansen-rfc-use-of-pdf-02.txt
results in a redirect to
http://www.ietf.org/id/draft-hansen-rfc-use-of-pdf-07.txt
which has more than one problem.)

As you note the
/doc/(doc-name)/(version-number) form is what Tony is looking for at the 
datatracker.

RjS

---

From: Tony Hansen <[email-masked]>
Date: Sun, 19 Jul 2015 08:03:28 -0400

ah, excellent. I thought I had tried that particular variation, but I
guess I didn't.

Thanks!

    Tony