This specification defines a file format and processing model for packaging the set of related resources that comprise a Web Publication into a single-file container, the Web Publication Lightweight Package.
A Web Publication Lightweight Package is used:
to exchange in-progress packaged Web Publications between different individuals and/or different organizations;
to provide packaged Web Publications from a publisher or conversion house to the distribution or sales channel; and
to deliver packaged Web Publications to users or User Agents.
Terms with meanings specific to the publishing industry are capitalized in this document (e.g., "Reading System"). A complete list of these terms and definitions is provided in [[!WEBPUB1]].
Only the first instance of a term in a section is linked to its definition.
In addition, the following terminology is defined for use in this specification:
The name of any type of file or directory within a Web Publication Lightweight Package.
The position of a file or directory within a Web Publication Lightweight Package,
represented as string of characters in which path components,
separated by the delimiting character /
(U+002F
),
represent each directory.
A software application that processes Web Publication Lightweight Packages according to the requirements of this specification.
In this specification, alias to Web Publication Lightweight Package.
(see def in the Web Publication specification).
The base of the Package file system. This directory is virtual in nature: an LPF Processor might or might not generate a physical root directory for the contents of the Package if the contents are unzipped.
A User Agent ...
A Web Publication ...
(see def in the Web Publication specification).
A Web Publication Lightweight Package uses the ZIP format as specified in ISO/IEC 21320-1:2015 ([[!ZIP]]).
A Package MUST include at least one of the following files in its Root Directory:
entry.html
,
which contains the Primary Entry Page of the Web Publication.manifest.jsonld
,
which contains the Web Publication Manifest.The contents of both files are specified in [[!WEBPUB]].
If both entry.html
and manifest.jsonld
are present in the package,
the former MUST contain a reference to the latter.
All other files within the Package MAY be in any location descendant from the Root Directory.
Files within the Package MUST reference each other via relative IRI references, as specified in [[!RFC3987]].
Some language specifications reference Requests For Comments [[RFC]] that preceded [[RFC3987]], in which case the earlier RFC applies for content in that particular language.
All relative IRI references MUST resolve to resources within the Package (i.e. at or below the Root Directory).
The [[!ZIP]] specification has few constraints on the characters allowed for file and dirctory names. When crafting such names, authors must be careful to use characters which allow a broad interoperability among operating systems and are compatible with relative IRI references.
For relative IRI references, the Base URI [[!RFC3986]] is determined by the relevant language specifications for the given file formats.
For example, CSS defines how relative IRI references work in the context of CSS style sheets and property declarations [[!CSSSnapshot]].
The Base URIs expressed within the manifest.jsonld
file use the Root Directory of the Package as the default Base URI.
An LPF compliant User Agent MUST meet all of the following criteria:
application/wpub+zip
Media TypeThis appendix registers the media type application/wpub+zip
for the Lightweight Packaging Format (LPF).
A Lightweight Packaging Format (or LPF) file is a container technology based on the [[!ZIP]] archive format. It is used to encapsulate Web Publications. LPF and its related standards are maintained and defined by the World Wide Web Consortium (W3C).
application
wpub+zip
None.
None.
LPF files are binary files encoded in the
application/zip
media type.
All processors that read LPF files should rigorously check the size and validity of data retrieved.
In addition, because of the various content types that can be embedded in LPF files
, application/wpub+zip
may describe content that poses security implications
beyond those noted here. However, only in cases where the processor recognizes and processes the
additional content, or where further processing of that content is dispatched to other
processors, would security issues potentially arise. In such cases, matters of security would
fall outside the domain of this registration document.
Security considerations that apply to application/zip
also apply to LPF files.
None.
This media type registration is for the Lightweight Packaging Format (LPF), as described by the
Lightweight Packaging Format (LPF) 1.0 specification located at https://github.com/w3c/LPFub/spec/ocf-lite.html
.
This media type will soon be in wide use for the distribution of audio and visual publications. The following list of applications is not exhaustive.
0: PK 0x03 0x04
LPF files are most often identified with the extension
.lpf
.
ZIP
None
public-publ-wg@w3.org
COMMON
The published specification is a work product of the World Wide Web Consortium (W3C)’s Publishing Working Group. The W3C has change control over this specification.