Global constants used at various places.

Enums

Functions

Interfaces

I
ConfigOptions

Config options, to be used as part of the arguments in [[Options]] to overwrite the configuration options of ReSpec.

I
Options

Options provided by the user if and when the source has to be pre-processed via ReSpec.

Variables

v
acceptable_url_endings: string[]

Acceptable endings for document URL-s. We try to avoid cases when the relative URL calculations go wrong

v
entity_codes: string[][]

Entity/code pairs: the XHTML conversion is supposed to remove the XML entities (if used) to their code alternatives.

v
ENV_MODIFIED_FILE_LOCATION: "R2EPUB_MODIFIED_EPUB_FILES"

Environmental variable name for the location of external copies of some css and image files

v
environment

Flag to decide whether the code runs in a browser, in Deno, or in node.js.

v
fixup_js: string

Generic 'fixup' script (used for warnings for rescinded or obsolete versions).

v
invalid_host_names: string[]

Invalid host names (essentially "localhost" and friends); unless explicitly set in the environment, these are considered to be unsafe. This is important for server deployment: servers should never accept these host names

v
local_port_number: "80"

Default port number for the server locally. Set to the default HTTP port number; the environment variable PORT may, however, overwrite this for a server.

v
local_style_files: string

Local (relative) URL for styles and logos

v
media_types: MediaType

Various media types used in the code.

v
modified_epub_files: string

Base URL for the W3C files (like base.css, logos in SVG format) modified for EPUB.

v
process_2021_date: "2021-11-02"

Cut-off date for the publication process change

v
process_version: number

Process version being used

v
spec_generator: "https://www.w3.org/publications/spec-generator/?type=respec&url="

URL of the spec generator service, used if the source has to be transformed via respec first.

v
spec_status_values: string[]

Valid Spec Status values

v
text_content: string[]

These media types refer to textual content, no reason to bother about streaming when fetching them...

v
TR_css_files: string

Base URL for the official W3C css files (only the non-SVG ones are used directly).

v
tr_epub_css: ` body { /* Layout */ max-width: 50em; /* limit line length to 50em for readability */ margin: 0 auto !important; /* center text within page, space for footers */ padding: 1.6em 1.5em 2em 50px; /* assume 16px font size for downlevel clients */ padding: 1.6em 1.5em 2em calc(26px + 1.5em); /* leave space for status flag */ } div[role~="main"] { margin: 0 auto; /* center text within page */ max-width: none; padding: 1.6em 1.5em 2em 50px; /* assume 16px font size for downlevel clients */ padding: 1.6em 1.5em 2em calc(26px + 1.5em); /* leave space for status flag */ } body { max-width: 100% !important; } h2 { page-break-before: always; page-break-inside: avoid; page-break-after: avoid; } div.head h2 { page-break-before: auto; page-break-inside: avoid; page-break-after: avoid; } figure { page-break-inside: avoid; } h3, h4, h5 { page-break-after: avoid; } dl dt { page-break-after: avoid; } dl dd { page-break-before: avoid; } div.example, div.note, pre.idl, .warning, table.parameters, table.exceptions { page-break-inside: avoid; } p { orphans: 4; widows: 2; } .outdated-warning { position: absolute; border-style: solid; border-color: red; } .outdated-warning input { display: none; } p.copyright, p.copyright small { font-size: small; } #toc-nav, #toc-toggle-inline { display:none !important; } #back-to-top, .toc-toggle { display: none !important; } nav#toc { display: none } `

Extra CSS file for EPUB content; mainly used to adapt and, possibly, to compensate the effects of the main CSS file. The features are

v
TR_logo_files: string

Base URL for the official W3C logos (only the non-SVG ones are used directly).

v
W3C_icons: "https://www.w3.org/Icons/"

Generic ICON directory on the W3C site

v
wcag_checked: string[]

Document types that are supposed to be WCAG A level due to the W3C publication check.