Skip to content

Commit

Permalink
Merge pull request #89 from readium/update-divina-level-0
Browse files Browse the repository at this point in the history
Update to the Divina profile
  • Loading branch information
HadrienGardeur authored Jun 26, 2024
2 parents ad268cc + 3e91f5f commit 944682a
Show file tree
Hide file tree
Showing 21 changed files with 512 additions and 534 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ W3C has recently provided a definition for a [Web Publication](https://w3c.githu
> A **Web Publication (WP)** is a collection of one or more constituent resources, organized together in a uniquely identifiable grouping, and presented using standard Open Web Platform technologies.
It also provides a definition for a manifest in the context of a Web Publication:
> [...] **manifest** refers to an abstract means to contain information necessary to the proper management, rendering, and so on, of a publication. This is opposed to metadata that contains information on the content of the publication like author, publication date, and so on. The precise format of how such a manifest is stored is not considered in this document.
> [...] **manifest** refers to an abstract means to contain information necessary to the proper management, rendering, and so on, of a publication.
The Readium Web Publication Manifest is an attempt to standardize a JSON based manifest format that follows both definitions.

Expand Down Expand Up @@ -319,7 +319,7 @@ Link Objects in `readingOrder`, `resources` or `links` can be identified as such

All Link Objects containing the `cover` link relation <strong class="rfc">must</strong> reference an image directly. They <strong class="rfc">should</strong> include a `height` and `width` to facilitate how they are processed by User Agents.

This specification recommends using one of the following media types: `image/jpeg`, `image/png`, `image/gif`, `image/webp` or `image/svg+xml`.
This specification recommends using one of the following media types: `image/jpeg`, `image/png`, `image/gif`, `image/avif` or `image/svg+xml`.

*Example 8: Reference to a cover*

Expand Down Expand Up @@ -348,10 +348,10 @@ The initial registry, contains the following profiles:

| Name | Description |
| ----- | ------------ |
| [EPUB Profile](profiles/epub.md) | A profile for EPUB content transformed to Web Publications. |
| [Audiobook Profile](profiles/audiobook.md) | A profile for Audiobooks. |
| [Divina Profile](profiles/divina.md) | A profile for Digital Visual Narrative publications (comics, manga and bandes dessinées). |
| [PDF Profile](profiles/pdf.md) | A profile for PDF documents integrated into Web Publications. |
| [EPUB Profile](profiles/epub.md) | A profile for EPUB publications served as Web Publications. |
| [PDF Profile](profiles/pdf.md) | A profile for PDF documents served as Web Publications. |

## 9. Packaging

Expand Down
1 change: 1 addition & 0 deletions context.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@container": "@language"
},
"sortAs": "http://schema.org/alternateName",
"layout": "http://www.idpf.org/2013/rendition#layout",
"accessibility": "@nest",
"summary": "http://schema.org/accessibilitySummary",
"accessMode": "http://schema.org/accessMode",
Expand Down
65 changes: 38 additions & 27 deletions contexts/default/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Default Context | [https://readium.org/webpub-manifest/context.jsonld](https://r

## Title

A Web Publication Manifest <span class="rfc">must</span> contain a single title using the `title` element:
A Web Publication Manifest <strong class="rfc">must</strong> contain a single title using the `title` element:

```json
"title": "Moby-Dick"
Expand All @@ -33,14 +33,14 @@ To provide these alternate representations, an object may be used instead of a s
}
```

In addition to the `title` element, the manifest <span class="rfc">may</span> also contain an optional `subtitle` element with exactly the same syntax.
In addition to the `title` element, the manifest <strong class="rfc">may</strong> also contain an optional `subtitle` element with exactly the same syntax.

```json
"title": "Flatland"
"subtitle": "A Romance of Many Dimensions"
```

The manifest <span class="rfc">may</span> also contain a `sortAs` element to provide a single sortable string, used by a client to organize a collection of publications:
The manifest <strong class="rfc">may</strong> also contain a `sortAs` element to provide a single sortable string, used by a client to organize a collection of publications:

```json
"title": "A Tale of Two Cities"
Expand All @@ -49,20 +49,41 @@ The manifest <span class="rfc">may</span> also contain a `sortAs` element to pro

## Identifier

A Web Publication Manifest <span class="rfc">should</span> contain an identifier. The identifier must be a valid URI:
A Web Publication Manifest <strong class="rfc">should</strong> contain an identifier. The identifier must be a valid URI:

```json
"identifier": "http://example.com/publication"
```

## Layout and reading progression

Publications come in all shapes and forms but when it comes to publications that are primarily made of text and visuals, we can organize them in three main categories:

- Reflowable publications, where users are free to change the text and layout however they prefer.
- Fixed layout publications, where each resource is a "page" and may be presented side by side with another resource in a "spread".
- Scrolled publications, where displaying the publication in a continuous scroll is meaningful and resources are usually fit to the width of the viewport

In order to convey this information, a Web Publication Manifest <strong class="rfc">may</strong> include a `layout` property with one of the following values:

| Value | Description | Formats |
| ----- | ----------- | ------- |
| `reflowable` | Reading systems are free to adapt text and layout entirely based on user preferences. | EPUB |
| `fixed` | Each resource is a "page" where both dimensions are usually contained in the device's viewport. Based on user preferences, the reading system may also display two resources side by side in a spread. | Divina, Fixed Layout EPUB or PDF
| `scrolled` | Resources are displayed in a continuous scroll, usually by filling the width of the viewport, without any visible gap between between spine items. | Scrolled Divina |

To provide a number of affordances (taps, gestures, keyboard events), reading systems also need to know the reading progression.

For reflowable and fixed layout publications, a manifest <strong class="rfc">may</strong> express this information using `readingProgression`.

It allows the following values: `ltr` (left to right, default value) and `rtl` (right to left).

## Contributors

The default context for the Web Publication Manifest provides a number of elements to indicate the nature of a contributor: `author`, `translator`, `editor`, `artist`, `illustrator`, `letterer`, `penciler`, `colorist`, `inker` and `narrator`.

In addition to these elements, it also provides a generic term for contributors: `contributor`.

A Web Publication Manifest <span class="rfc">should</span> contain one or more contributors.
A Web Publication Manifest <strong class="rfc">should</strong> contain one or more contributors.

The most straightforward expression of a contributor is through a simple string:

Expand Down Expand Up @@ -113,7 +134,7 @@ ISNI (http://isni.org) is the preferred authority, but other sources may also be
}
```

If none of the elements available are specific enough, a `contributor` element <span class="rfc">may</span> be used instead.
If none of the elements available are specific enough, a `contributor` element <strong class="rfc">may</strong> be used instead.

The `contributor` element should be used with an object that contains a `role`.
All values for the `role` element should be based on [MARC relator codes](https://www.loc.gov/marc/relators/relaterm.html):
Expand All @@ -127,29 +148,29 @@ All values for the `role` element should be based on [MARC relator codes](https:

## Language

In order to indicate its primary language, a Web Publication Manifest <span class="rfc">should</span> use a `language` element. Its value must be a valid [BCP 47](https://tools.ietf.org/html/bcp47) language tag.
In order to indicate its primary language, a Web Publication Manifest <strong class="rfc">should</strong> use a `language` element. Its value must be a valid [BCP 47](https://tools.ietf.org/html/bcp47) language tag.

```json
"language": "en"
```

If a publication has more than one primary language (a bilingual edition for example), the `language` element <span class="rfc">may</span> contain an array of values:
If a publication has more than one primary language (a bilingual edition for example), the `language` element <strong class="rfc">may</strong> contain an array of values:

```json
"language": ["en", "fr", "ja"]
```

## Description

A Web Publication Manifest <span class="rfc">may</span> contain a description of the publication in plain text using the `description` element:
A Web Publication Manifest <strong class="rfc">may</strong> contain a description of the publication in plain text using the `description` element:

```json
"description": "The story of two gnomes, discussing the meaning of life in a Scandivanian garden."
```

## Publisher

A Web Publication Manifest <span class="rfc">may</span> list one or more publishers using the `publisher` element.
A Web Publication Manifest <strong class="rfc">may</strong> list one or more publishers using the `publisher` element.

To provide even more details, it's also possible to use the `imprint` element that behaves exactly like `publisher` but provides a complementary information.

Expand All @@ -175,23 +196,23 @@ Multiple publishers can be listed in this element using the string or object rep

## Publication date

A Web Publication Manifest <span class="rfc">may</span> contain a publication date using the `published` element. The publication date must be a valid ISO 8601 date.
A Web Publication Manifest <strong class="rfc">may</strong> contain a publication date using the `published` element. The publication date must be a valid ISO 8601 date.

```json
"published": "2016-09-02"
```

## Modification date

Publications can be updated and to identify each specific version, the manifest <span class="rfc">should</span> also contain a `modified` element containing the timestamp when the publication was last modified expressed as an ISO 8601 time and date:
Publications can be updated and to identify each specific version, the manifest <strong class="rfc">should</strong> also contain a `modified` element containing the timestamp when the publication was last modified expressed as an ISO 8601 time and date:

```json
"modified": "2016-02-22T11:31:38Z"
```

## Subjects

A Web Publication Manifest <span class="rfc">may</span> also provide one or more subjects using the `subject` element:
A Web Publication Manifest <strong class="rfc">may</strong> also provide one or more subjects using the `subject` element:

```json
"subject": "Historical Fiction"
Expand Down Expand Up @@ -239,7 +260,7 @@ This document identifies the following subject schemes along with a recommended

## Collections & series

A Web Publication Manifest <span class="rfc">may</span> indicate that it belongs to one or multiple collections/series.
A Web Publication Manifest <strong class="rfc">may</strong> indicate that it belongs to one or multiple collections/series.

`collection` and `series` behave the same way, the most straightforward way to indicate that a publication belongs to a collection/series is through a simple string:

Expand Down Expand Up @@ -291,19 +312,9 @@ A position can be either an integer or a float where the value is greater than z
}
```

## Reading progression direction

To properly browse through a publication, a User Agent needs to know its progression direction.

A manifest <span class="rfc">may</span> express this information using `readingProgression`.

It allows the following values: `ltr` (left to right), `rtl` (right to left), `ttb` (top to bottom), `btt` (bottom to top) and `auto`.

It defaults to `auto` when no value is set.

## Duration and number of pages

To indicate the length of a publication, a Web Publication Manifest <span class="rfc">may</span> include the `duration` and `numberOfPages` terms.
To indicate the length of a publication, a Web Publication Manifest <strong class="rfc">may</strong> include the `duration` and `numberOfPages` terms.

`duration` is expressed in seconds using a float (number in JSON), while `numberOfPages` is an integer.

Expand All @@ -320,9 +331,9 @@ In addition to these two properties, `abridged` is used to indicate an abridged

## Accessibility metadata

In order to document its accessibility metadata, a Web Publication Manifest <span class="rfc">should</span> include an `accessibility` object.
In order to document its accessibility metadata, a Web Publication Manifest <strong class="rfc">should</strong> include an `accessibility` object.

This `accessibility` object <span class="rfc">may</span> contain the following properties: `conformsTo`, `certification`, `accessMode`, `accessModeSufficient`, `feature`, `hazard` and `summary`.
This `accessibility` object <strong class="rfc">may</strong> contain the following properties: `conformsTo`, `certification`, `accessMode`, `accessModeSufficient`, `feature`, `hazard` and `summary`.

### Conformance

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# DiViNa guidelines
# Advanced Divina guidelines

## Guidelines relative to presentation hints

Expand Down
134 changes: 134 additions & 0 deletions experimental/presentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# Advanced Divina Presentation Hints

The Presentation Hints extension defines a number of hints for User Agents about the way content <strong class="rfc">should</strong> be presented to the user.

## 1. Presentation Hints in `metadata`

In order to provide publication-wide Presentation Hints, this extension introduces a new element in the `metadata` object of [the Readium Web Publication Manifest](https://readium.org/webpub-manifest):

| Key | Semantics | Type |
| ----- | --------- | -------- |
| `presentation` | Publication-wide presentation hints. | Object |

The following elements <strong class="rfc">may</strong> be included in `presentation`:

- [`clipped`](#clipped)
- [`fit`](#fit)
- [`orientation`](#orientation)

## 2. Presentation Hints as Link Properties

In addition to publication-wide hints, this extension defines a number of Link Properties to provide resource-level hints in `readingOrder` or `resources`.

The following elements <strong class="rfc">may</strong> be included in `properties`:

- [`clipped`](#clipped)
- [`fit`](#fit)
- [`orientation`](#orientation)

## 3. Properties

### clipped

The `clipped` property is meant to adapt visual resources to any given viewport ratio. The clipped areas <strong class="rfc">must not</strong> contain information which are mandatory for the comprehension of the resource.

| Key | Semantics | Type | Values | Default |
| ----- | --------- | -------- | --------- | ------- |
| `clipped` | Specifies whether or not the parts of a linked resource that flow out of the viewport are clipped. | Boolean | `true` or `false` | `false` |

*In this example, all resources are scaled to fit the viewport height and clipped to fit different viewport widths. It behaves like turbomedia.*

```json
"metadata": {
"layout": "scrolled",
"presentation": {
"fit": "height",
"clipped": true
}
}
```

*In this example, a specific resource is scaled to fit the viewport width and clipped to fit different viewport heights.*

```json
"readingOrder": [
{
"href": "image1.avif",
"type": "image/avif",
"properties": {
"fit": "width",
"clipped": true
}
}
]
```

### fit

| Key | Semantics | Type | Values | Default |
| ----- | --------- | -------- | --------- | ------- |
| `fit` | Specifies constraints for the presentation of a linked resource within the viewport. | String | `contain`, `cover`, `width` or `height` | `contain` |

| Value | Definition |
| ------- | ---------- |
| `contain` | The content is centered and scaled to fit both dimensions into the viewport. |
| `cover` | The content is centered and scaled to fill the viewport. |
| `width` | The content is centered and scaled to fit the viewport width. |
| `height` | The content is centered and scaled to fit the viewport height. |

*In this example, a specific resource is scaled to fit the viewport.*

```json
"readingOrder": [
{
"href": "image1.avif",
"type": "image/avif",
"properties": {
"fit": "contain"
}
}
]
```

### orientation

| Key | Semantics | Type | Values | Default |
| ----- | --------- | -------- | --------- | ------- |
| `orientation` | Suggested orientation for the device when displaying the linked resource. | String | `landscape`, `portrait` or `auto` | `auto` |

The `orientation` property is mostly relevant for resources with fixed dimensions (images, videos), where the orientation has an actual impact on how the resource is displayed.

*In this example, all resources should be displayed in portrait mode.*

```json
"metadata": {
"presentation": {
"orientation": "portrait"
}
}
```
*In this example, a specific resource should be displayed in landscape mode.*

```json
"readingOrder": [
{
"href": "page1.html",
"type": "text/html",
"properties": {
"orientation": "landscape"
}
}
]
```

## Appendix A - JSON Schema

The following JSON Schemas for this module are available under version control:

- Metadata: <https://github.com/readium/webpub-manifest/blob/master/schema/experimental/presentation/metadata.schema.json>
- Link Properties: <https://github.com/readium/webpub-manifest/blob/master/schema/experimental/presentation/properties.schema.json>

For the purpose of validating a Readium Web Publication Manifest, use the following JSON Schema resources:

- <https://readium.org/webpub-manifest/schema/experimental/presentation/metadata.schema.json>
- <https://readium.org/webpub-manifest/schema/experimental/presentation/properties.schema.json>
File renamed without changes.
1 change: 0 additions & 1 deletion modules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
| Name | Description |
| ----- | ------------ |
| [Encryption](encryption.md) | Property which conveys to User Agents how a given resource has been encrypted. |
| [Presentation Hints](presentation.md) | Metadata and properties which convey to User Agents how a given publication should be presented. |

## Registering a module

Expand Down
Loading

0 comments on commit 944682a

Please sign in to comment.