[rfc-i] draft-hoffman-rfcexamples-04, "3. Example of a v3 Document"

julian.reschke at gmx.de (Julian Reschke) Mon, 29 February 2016 15:56 UTC

From: "julian.reschke at gmx.de"
Date: Mon, 29 Feb 2016 16:56:20 +0100
Subject: [rfc-i] draft-hoffman-rfcexamples-04, "3. Example of a v3 Document"
In-Reply-To: <C50F94CE-B2FA-4E6E-A6D8-6805622D3292@att.com>
References: <56D1FB12.7000604@gmx.de> <B88E966E-01F6-423A-92E7-707DEFC90F9C@vpnc.org> <56D2212C.1040005@gmx.de> <ED732BC0-A1EE-4172-81F6-485961FF3DC4@att.com> <56D3E2E7.2040405@gmx.de> <C50F94CE-B2FA-4E6E-A6D8-6805622D3292@att.com>
Message-ID: <56D46A24.5010001@gmx.de>

On 2016-02-29 16:37, HANSEN, TONY L wrote:
> On 2/29/16, 1:19 AM, "Julian Reschke" <julian.reschke at gmx.de> wrote:
>
>
>> On 2016-02-29 04:55, HANSEN, TONY L wrote:
>>> I've looked at convertv2v3. The reference exists in the original v2 doc and is just preserved. That is, this is the entry in the v2 doc:
>>>
>>> <!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
>>>      <!ENTITY RFC2119 SYSTEM
>>>        "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
>>>      ]>
>>>
>>> All of the ENTITY references are pulled out and changed to x:includes. Then the remaining DOCTYPE was then just left alone, with no special checks as to what DTD was being referenced.
>>>
>>> I guess I can add some code to check for this special case and remove the DTD entirely if it's an rfc2629.dtd reference.
>>
>> Well, there are other cases that need to be considered. What would you map
>>
>> <!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
>>
>>    <!-- re-declare "&nbsp;" as code point 160 (non-breaking space) -->
>>    <!-- you may need this for UAs that do not read external DTDs -->
>>    <!ENTITY nbsp
>>    "&#160;">
>>
>> ]>
>>
>> to?
>
> Right now, that DOCTYPE declaration would be passed through.
>
> After I add code to remove the reference to rfc2629.dtd, you would get:
>
> <!DOCTYPE rfc [
>
>     <!-- re-declare "&nbsp;" as code point 160 (non-breaking space) -->
>     <!-- you may need this for UAs that do not read external DTDs -->
>     <!ENTITY nbsp
>     "&#160;">
>
> ]>
>
> In other words, what is there would be preserved.

Looks good to me.

>> In general, how does the conversion treat Internal Entities defined in
>> the document to-be-converted? And how does it treat those defined by
>> rfc2629.dtd (and included files)?
>
> This is what my prototype conversion code does currently. Help would be appreciated.
>
> If you include a reference to an undefined entity, the code currently tries adding references to rfc2629-xhtml.ent rfc2629-other.ent, and &rfc.number; to whatever DOCTYPE is there, then reparses the file. If no DOCTYPE is present, it declares one with rfc2629.dtd.
>
> Based on this discussion, the reference to rfc2629.dtd should probably be changed to individual ENTITY declarations. I can insert a DOCTYPE without referencing rfc2629.dtd.

Sounds good.

> One issue that should be noted is that &rfc.number; is internally pre-defined by the current XML2RFC processors that the RFC Production Center uses, and I don't think that functionality should be lost.

I believe it ought to be removed. It's a non-feature causing problems in 
all proper XML tool chains.

The RFP is fully capable to change "this document" to "RFC ...." at 
AUTH48 time.

Best regards, Julian