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.
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:
-r
option. It might work with BSD (or Mac OS X) sed as
well, by replacing -r
with -E
, but that
has not been tested very well.
cc -o parseform
parseform.c
<!-- keyword -->
by
the contents of some file.
'foo'
and ''foo''
with
mark-up. Only necessary for CSS modules, where 'foo' stands for a
CSS property name and ''foo'' for a piece of CSS code.
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
biblioinc
copyright
<!-- copyright -->
.
statusdir
<!-- 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
The API of the postprocessor is built on top of CGI. It accepts both GET and POST requests, with the following parameters:
output
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
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
login
method=url
.) If the script must retrieve
the input from a password-protected URL, this parameter gives the
login name.
password
method=url
.) If the script must retrieve
the input from a password-protected URL, this parameter gives the
password.
date
ids
on
. Anything else means no such IDs are generated.
file
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
method=text
.) Contains the input document.
url
method=url
.) Contains the URL where the
script should download the input document.
status
omitdchtml
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.