specStatus
values with a common, 'standard' behavior: distinct logos based on value,
no watermark, simple background template
Extract/add the right CSS references and gathers all resources (logo files, watermark image, etc.) to be added to the overall set of resources in the final book. Note that the HTML DOM of the main file is modified on the fly:
base.css
.Mapping from specStatus
to its relevant description for the cases when a simple, automatic mapping
is not possible. See specStatus_css_mappings for the definition of the terms.
Note that the following spec status values do not have an entry (nor do they appear in specStatus_simple): base
, BG-DRAFT
, BG-FINAL
, and CG-FINAL
.
This is deliberate: for the BG/CG documents the TR style has a big logo on the left at the top of the TOC column, something that is unnecessary for the EPUB case where that TOC
column is non-existent altogether; on the other hand, it leads to a narrower content that is detrimental in many reading systems. (CG-DRAFT has a watermark, hence its presence.)
As for the
base` value, there is no logo or other style addition altogether.
CSS files (for the 2016 version of the Process)
Handling CSS mappings is a bit complicated because the W3C setup is not entirely consistent...
The general, and "usual", case is that the
specStatus
value, i.e., 'REC', 'WD', 'CR', etc, means that there is a logo used with the namehttps://www.w3.org/StyleSheets/TR/2016/logos/{specStatus}.svg
(this is, usually, the left stripe in the text). Structurally, the HTML links to a style file of the sorthttps://www.w3.org/StyleSheets/TR/2016/W3C-{specStatus}
. These files are all very simple: import a commonbase.css
file and add a setting for the background image using the logo file. All these files must be copied into the zip file, and the HTML references must be changed to their relative equivalents.However… the complication, from EPUB's point of view, is that
specStatus
and, in some cases, an extra trick is used to create a watermark using a separate image file.The approach chosen to convert the content to the EPUB file is therefore as follows:
base.css
file. This file is copied into the EPUB file from a separate, but fixed, URI]. This is a modified version of the "real"base.css
with:The easy (i.e., well structured) cases are assembled in the specStatus_simple array; these can be handled automatically. The characteristics of "non-standard" cases (e.g., BG/CG documents) are described in the specStatus_css object, based on the specStatus_css_mappings interface.