-
Notifications
You must be signed in to change notification settings - Fork 6
/
Overview.bs
356 lines (241 loc) · 10.1 KB
/
Overview.bs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
<h1>EPUB Zero</h1>
<style type="text/css">
td, th {
vertical-align: top;
border: thin solid #aaa;
padding: 2px;
}
th {
text-align: left;
}
table {
border-collapse: collapse;
}
</style>
<pre class='metadata'>
Status: DREAM
Shortname: e0
Level: 1
Group: TK
ED: http://dauwhe.github.io/epub-zero/
Editor: Tzviya Seigman, Wiley, [email protected]
Editor: Dave Cramer, Hachette Livre, [email protected]
Abstract: A simple ebook format, as close to the Open Web Platform as possible.
</pre>
<h2 class="no-num" id="introduction">
Introduction
</h2>
EPUB Zero is web content, progressively enhanced to support long-form reading and portable web publications.
Note: This specification is only a thought experiment,
inspired by the <a href="http://w3c.github.io/pwp/">Portable Web Publications White Paper</a>
(by the <a href="https://www.w3.org/dpub/IG/wiki/">W3C Digital Publishing Interest Group</a>
and the <a href="idpf.org">IDPF</a>) and by concerns about the complexity of EPUB3.
Please join the Digital Publishing Interest Group and IDPF to help bring about a better future for ebooks.
A book, in the digital world, is a reading mode, not a file format.
The Open Web Platform provides us with most of what we need for the content,
style, and behavior of a publication.
EPUB Zero aims to make publications just another part of the web.
EPUB3 is complex. It requires numerous custom XML vocabularies, and massive repetition of content.
Developing a reading system for EPUB3 is a herculean task, as evidenced by the slow progress of Readium.
Our goal is to create a simpler publication format, easier to author,
and easy to read in a browser with as little additional technology as possible.
Note: EPUB Zero is not just for books, but any packaged web content.
We will use the term <i>publication</i> to describe books, magazines,
journals, manuals, reference documents, corporate documents, articles, etc.
Note: Any discussion of the definitions of <i>packaged</i>, <i>web</i>, <i>content</i>, <i>book</i>, or <i>document</i> will not be tolerated :)
<h2 id="goals">
Design goals and rationale
</h2>
EPUB Zero satisfies the following design goals:
1. Close to the web
2. Basically functional using browser as reading system
3. Simpler than EPUB 3.X
4. All publication content accessible via URI
5. There should be an object model/API
And these principles:
1. Convention over configuration
2. Don't repeat yourself
3. "In case of conflict, consider users over authors over implementors over specifiers over theoretical purity."
Note: The ultimate test of this specification is whether we can build a reading system
on top of an ordinary browser with little or no Javascript.
<h2 id="overview">Overview</h2>
EPUB Zero is yet another ebook format, which isn't just “based on” HTML like EPUB,
but <em>is</em> HTML. Where possible, we use HTML solutions to achieve book-like functionality.
It appears to be possible to do this using mostly-existing web technology.
<figure>
<img src="images/reading-e0-opera.png" alt="screenshot of an epub zero in the Opera browser" width="640"/>
<figcaption>Using Opera 12.16 as an EPUB Zero Reading system. </figcaption>
</figure>
<h2 id="content">
Content
</h2>
EPUB Zero is a collection of web content.
<h2 id="nav">
Navigation
</h2>
<h2 id="nav">
Sequence
</h2>
A book may consist of several HTML files. A user must be able to move
from ch1.html to ch2.html as easily as moving from page 1 to page 2, and with the same action.
Note: discussed by CSSWG in thread starting at https://lists.w3.org/Archives/Public/www-style/2014Jan/0093.html
HTML5 link relations support describing previous and next files.
Issue: Opera and Firefox have UI for <code>link rel=prev|next</code>, but Safari, Chrome, and IE do not.
Issue: Using link relations introduces a burden on authoring that does not currently exist in EPUB3.
<h3 id="interactivity">Interactivity</h3>
Issue: Security for downloaded publications. How is this handled with service workers?
<h3 id="media-overlays">Media Overlays</h3>
Issue: Browsers (as far as we know) do not support SMIL.
Note: See https://github.com/timesheets/timesheets.js for a JS implementation of SMIL
Issue: Are there polyfills that are “good enough?” Is there a better approach for synchronizing [[HTML5]] with multimedia?
<h3 id="global">Global Language Support</h3>
<h3 id="navigation">Navigation</h3>
Most reading systems provide a link to the navigation document as part of the reading system user interface.
Note: In Opera and Firefox, opening a link with <code>rel=sidebar</code> can open a navigation document in the "secondary browsing context", aka sidebar. This does not work in Safari, Chrome, or IE.
<h3 id="fxl">Fixed Layout</h3>
Issue: FXL is often a bad idea
<h3 id="a11y">Accessibility</h3>
Note: Compliance with WCAG 2.0 and integration of ARIA 1.1 and the Digital Publishing module of ARIA will aid in creating accessible content.
Issue: How do we make EPUB Zero documents “born accessible?”
EPUB 3.0 requires a <code>nav</code> document. EDUPUB requires the <code>section</code> element,
and proper use of [[HTML5]] heading elements.
Issue: What's the state of text-to-speech support in browsers?
<h2 id="packaging">
Packaging
</h2>
<h2 id="installing">Installing EPUB Zero publications</h2>
EPUB Zero uses the web manifest specification https://w3c.github.io/manifest/ to facilitate installation as a webapp on user devices.
<div class="example">
<pre>{
"name": "Moby-Dick",
"short_name": "Moby-Dick",
"icons": [{
"src": "icons/moby-dick-icon.webp",
"sizes": "64x64",
"type": "image/webp"
}],
"start_url": "title-page.html",
"display": "minimal-ui",
}</pre>
</div>
Issue: the <code>display</code> property is interesting. Adding an additional
value <code>"display": "book"</code> might be a good way of indicating to the browser
that it should display the content with a UI optimized for long-form content.
Issue: there seems to be some pushback against the web manifest specification.
Issue: How might a web manifest fulfill the function of an EPUB manifest?
<h2 id="offline">Offline reading</h2>
Books must be readable offline and online.
Issue: Is offline reading really the same question as packaging/archiving?
<h3 id="service-workers">
Service Workers
</h3>
Service Workers are the preferred way of implementing offline viewing for web content.
Note: A service worker should be declared in <code>start_url</code>.
<h2 id="structure">
Publication structure and packaging
</h2>
An EPUB Zero publication is a collection of files, which should be collected inside a folder or directory.
The top level of the directory should contain the package file.
No other restrictions exist on the directory structure.
Compressing or otherwise packaging this directory may be required for many reasons, including
1. reduction of file size
2. creating a single “blob” that can be easily transmitted
3. allowing for a digital signature
4. allowing for digital rights management
5. allowing for streaming of the publication
In simple cases, using ZIP may be sufficient. The W3C WebApps Packaging format
may prove useful as well http://w3ctag.github.io/packaging-on-the-web/
Issue: how about using presence of package.json as trigger, as what defines a publication
as something different than an ordinary bundle of web content?
Issue: does the above issue make sense in the context of EPUB Zero?
Properties in manifest.json can act as hints to UA/Browsing Context that the thing is “bookish”
<h2 id="metadata">
Metadata
</h2>
Publication-level metadata can be stored in the publication folder.
We recommend the use of JSON-LD as a metadata format, but different communities may use
other formats such as RDF, Turtle, or ONIX.
<div class="example">
<pre>
{
"@context": "http://schema.org",
"@type": "Book",
"accessibilityAPI": "ARIA",
"accessibilityControl": [
"fullKeyboardControl",
"fullMouseControl"
],
"accessibilityFeature": [
"largePrint/CSSEnabled",
"highContrast/CSSEnabled",
"resizeText/CSSEnabled"
],
"accessibilityHazard": [
"noFlashing",
"noMotionSimulation",
"noSound"
],
"aggregateRating": {
"@type": "AggregateRating",
"reviewCount": "0"
},
"bookFormat": "EBook/e0",
"copyrightHolder": {
"@type": "Organization",
"name": "Harper & Row"
},
"author": "Herman Melville",
"datePublished": "1851-10-19",
"image": "moby-dick-book-cover.jpg",
"offers": {
"@type": "Offer",
"availability": "https://example.com/BuyMe?isbn=9780316123456",
"price": "6.99",
"priceCurrency": "USD"
},
"copyrightYear": "1851",
"description": "Project Gutenberg edition of Moby-Dick",
"genre": "Literary Fiction",
"inLanguage": "en-US",
"isFamilyFriendly": "true",
"isbn": "9780000000000",
"name": "Moby-Dick",
"numberOfPages": "777",
"publisher": {
"@type": "Organization",
"name": "Harper & Row"
}
}
Issue: External metadata must be linked to. How?
</pre>
</div>
<h2 class="no-num" id="acknowledgments">
Acknowledgments
</h2>
EPUB Zero was originally inspired by a series of posts on EPUB3 by Daniel Glazman.
Many thanks to Hadrien Gardeur, Bill McCoy, Markus Gylling,
<h2 class="no-num appendix" id="appendix-1">
Reading system behaviour
</h2>
Issue: this doesn't make much sense, yet.
1. a user agent receives an http request
<pre>
GET /urn:isbn:9780316123456
Host: http://www.hachettebookgroup.com
Accept: ????
</pre>
Issue: what if there's a zip (or any compressed file) or .e0 there?
2. If manifest.json exists, consume manifest.json; open start_url
3. If manifest.json does not exist
a. if index.html exists open that
b. if index.html doesn't exist open first html file
c. if there are no html files open the first supported format
d. otherwise error "there is not a book here"
<h2 class="no-num appendix" id="appendix-2">
References and Further Reading
</h2>
* http://manu.sporny.org/2014/json-ld-origins-2/
* https://infrequently.org/2015/06/progressive-apps-escaping-tabs-without-losing-our-soul/
<h2 class="no-num appendix" id="appendix-3">
Functional requirements for books, and possible solutions
</h2>