Subject: [xml2rfc] v3imp #B Fix @page margin left header footer rules in xml2rfc

From: Sean Leonard <[email-masked]>
Date: Fri, 23 Jan 2015 01:11:17 -0800

Tool Request
#B Fix @page margin left header footer rules in xml2rfc

In the current xml2rfc (v2) tool, the following @page rules are *always* 
output:
       @page {
       @top-left {
            content: "Internet-Draft";
       }
       @top-right {
            content: "December 2010";
       }
       @top-center {
            content: "Abbreviated Title";
       }
       @bottom-left {
            content: "Doe";
       }
       @bottom-center {
            content: "Expires June 2011";
       }
       @bottom-right {
            content: "[Page " counter(page) "]";
       }
       }

       @page:first {
         @top-left {
           content: normal;
         }
         @top-right {
           content: normal;
         }
         @top-center {
           content: normal;
         }
       }

That's not really nice.

In draft-josefsson-pkix-textual-10.html (which is not published, but is 
used as the basis for the PDF version), I tweaked the output manually to:
       @page {
       @top-left {
            content: "Internet-Draft";
       }
       @top-right {
            content: "December 2014";
       }
       @top-center {
            content: "pkix-textual";
       }
       @bottom-left {
            content: "Josefsson & Leonard";
       }
       @bottom-center {
            content: "Expires July 2015";
       }
       @bottom-right {
            content: "[Page " counter(page) "]";
       }
       }

       @page:first {
         @top-left {
           content: normal;
         }
         @top-right {
           content: normal;
         }
         @top-center {
           content: normal;
         }
       }

A competent HTML to PDF converter (e.g., Prince XML) will use these CSS 
rules in the output.

I tried to make some trivial changes to xml2rfc to put in the right 
values. Unfortunately, the changes cannot be trivial because some of the 
variables are not exposed to the HTML template; thus some new code needs 
to be developed to reproduce the same content in the HTML/CSS output.

The broader rfc-interest point is that even though pagination artifacts 
like headers and footers are not part of the canonical XML (v3) format, 
the underlying variables need to be present and accessible to xml2rfc -> 
HTML/PDF/other conversion tools, so that reasonable and consistent 
pagination artifacts can be generated.

Sean

---

From: Julian Reschke <[email-masked]>
Date: Fri, 23 Jan 2015 12:21:20 +0100

>             content: "[Page " counter(page) "]";

Are you saying it outputs these literal strings, no matter what the 
input is? If yes, just raise a bug report.

(and you may want to switch to a more competent processor such as 
rfc2629.xslt, from which apparently the output was "borrowed", but not 
properly implemented).

Best regards, Julian