CSS3 module postprocessor installation hints

The CSS3 module postprocessor [member-only link] was not made with portability in mind, nor has it been checked very carefully for security issues, but if anybody wants to try and install it on another server, here are some hints.

Prerequisites

The postprocessor is a CGI script written in bash that calls several other programs, some in C, some in sed and some in bash. The following software is required:

Configuration

The script looks for programs to execute and files to insert in certain places that must be set at the top of the script:

bibfile
The name of a file in (restricted) refer format that contains bibliographic data. See refer(1) and the manual of hxmkbib for the format. Or see this example.
biblioinc
The name of a file with a template for the bibliography. See the manual of hxmkbib for the format. or see this example.
copyright
The name of a file containing a copyright statement. This will be inserted where the input document contains the comment <!-- copyright -->.
statusdir
If the input document contains <!-- status --> or <!-- conformance -->, a file will be inserted with an appropriate status or conformance message for the document's status and working group (see the group parameter below). Those files are searched for in this directory.
PATH
May need to be adapted so that the script can find all of the programs or scripts that it needs.

Interface

The API of the postprocessor is built on top of CGI. It accepts both GET and POST requests, with the following parameters:

output
Determines what the CGI script returns. The value must be err, html or auto. The first returns the list of errors that were discovered while processing the input, or the string No errors. The second returns the generated output itself. And auto returns the generated output if there were no errors, and an HTTP error otherwise.
method
Determines how the input is passed to the script. The value must be either file, text or url. The first indicates that the input is passed in the file parameter, the second that it is passed in the text parameter and the last that the input must be retrieved by the CGI script itself from the URL in the url parameter.
group
Certain parts of a document may depend on which working group is the author, e.g., the status section or whether or not CSS code is marked-up specially. The name passed here is used to find files to include.
login
(Only if method=url.) If the script must retrieve the input from a password-protected URL, this parameter gives the login name.
password
(Only if method=url.) If the script must retrieve the input from a password-protected URL, this parameter gives the password.
date
Anywhere where a date should be inserted in a document, this date is used. It must be of the form YYYYMMDD. If omitted or empty, the current date is used.
ids
Indicates whether the script should generate ID attributes on all P and LI elements in the document. The value must be on. Anything else means no such IDs are generated.
file
(Only if method=file.) Contains the input document. By convention method=file indicates that the form used file upload, while method=text means the form used a text field.
text
(Only if method=text.) Contains the input document.
url
(Only if method=url.) Contains the URL where the script should download the input document.
status
Must be one of WD, CR, PR, REC, PER, NOTE or ED. If omitted or empty, the script looks for a status code in the “this version” URL in the document itsef. If it finds none, it assumes ED. (Note: if the status parameter conflicts with the URL, the URL is not corrected.)
omitdchtml
Normally, the script tries to add META and LINK elements according to DC-HTML to aid reference managers to automatically extract bibliographic information. Those META and LINK elements are not generated if this is set to on. Also, if the document already has DC-HTML mark-up, setting this to on avoids that some of it gets overwritten.

The response headers contain a nonstandard line

X-W3C-Postprocessor-Errors: 0

where “0” is replaced by the actual number of errors found while processing the input. This allows to get in a single request both the generated HTML and the number of errors. The line is also returned if the request is a HEAD.

Bert Bos, style activity lead
Copyright © 1994–2021 W3C® Privacy policy

Last updated Wed 06 Jan 2021 05:40:21 AM UTC

Languages

About the translations