Canonical identifier of the publication, used in the dc:identifier
metadata entry
Title of the publication
Add accessibility feature strings to the metadata
list of feature strings
Add a new OPF collection. This is used when the final EPUB is itself a collection of parts; each collection in the OPF sense collects the constituents of a specific part.
a new collection to be added to the package document.
Add a list of creators (authors) to the publication.
list of creators of the publications
Set the date and the modification date of the publication.
modification date and proper date (there is no difference for W3C Documents)
Add a manifest item, i.e., the reference to a resource that is part of the publication.
manifest item, as defined in the EPUB 3.3 Specification
Add a spine item, i.e., the reference to the resource in the manifest that is a constituent of the spite (i.e., reading order) of the book
the reference that must be added to the spine item
Add an A11y link to WCAG A, to specify that the document conforms to this level
Serialize the Package document into (pretty printed) XML.
The OPF Wrapper
Wrapper around the internal representation of a EPUB3 Package document, as defined in the EPUB 3.3 Specification
The module relies on the
xmlbuilder2
package, which generates an XML file out of a set of JS objects. See the documentation of that library for the details; the short overview is:"@""
represent an attribute."#""
represent textual content of the element.The type hierarchy to represent an OPF file through such objects is defined through Package. Those types and default values do not reflect all possibilities of Package documents, only those that are relevant for W3C Technical reports.