-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
4537 lines (4091 loc) · 186 KB
/
index.html
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
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head>
<meta charset="utf-8" />
<title>Web Publications</title>
<script src="https://www.w3.org/Tools/respec/respec-w3c-common" class="remove" defer="defer"></script>
<script src="common/js/biblio.js" class="remove"></script>
<script src="common/js/orcid.js" class="remove"></script>
<script src="common/js/wp.js" class="remove"></script>
<link href="common/css/common.css" rel="stylesheet" type="text/css" />
<script class="remove">
// <![CDATA[
var respecConfig = {
postProcess: [show_orcid, create_wp],
wg: "Publishing Working Group",
specStatus: "ED",
shortName: "wpub",
subtitle: "Manifest and Structure",
previousPublishDate: "2019-01-30",
previousMaturity: "WD",
edDraftURI: "https://w3c.github.io/wpub/",
editors: [
{
"name": "Matt Garrish",
"company": "DAISY Consortium",
"companyURL": "http://www.daisy.org",
"w3cid": 51655
},
{
"name": "Ivan Herman",
"url": "https://www.w3.org/People/Ivan/",
"company": "W3C",
"w3cid": 7382,
"orcid": "0000-0003-0782-2704",
"companyURL": "https://www.w3.org",
}
],
processVersion: 2018,
includePermalinks: false,
permalinkEdge: true,
permalinkHide: false,
diffTool: "http://www.aptest.com/standards/htmldiff/htmldiff.pl",
wgURI: "https://www.w3.org/publishing/groups/publ-wg/",
wgPublicList: "public-publ-wg",
wgPatentURI: "https://www.w3.org/2004/01/pp-impl/100074/status",
github: {
repoURL: "https://github.com/w3c/wpub/",
branch: "master"
},
localBiblio: biblio
};
// ]]>
</script>
<style>
var {
color: brown;
}
code.json {
color: teal;
}</style>
</head>
<body>
<section id="abstract">
<p>This specification defines a collection of information that describes the structure of Web Publications
so that user agents can provide user experiences specially tailored to reading publications, such as
sequential navigation and offline reading. This information includes the default reading order, a list
of resources, and publication-wide metadata.</p>
</section>
<section id="sotd">
<p>This draft provides a draft version of a Web Publication. Many details are under active consideration
within the Publishing Working Group and are subject to change. The most prominent known issues have been
identified in this document and links provided to comment on them.</p>
<p>The most significant change to this draft is the tightening of its focus on the Web Publication manifest
and structure. Removed are the sections on affordances and Web Publication locators. Rendering details
are instead described in [[PWP-UCR]].</p>
<p>The Publishing Working Group is actively producing proofs of concept of Web Publications and the
technologies required to process them. For a list of these activities, please refer to the <a
href="https://w3c.github.io/wpub/experiments/index.html">experiments page</a>.</p>
</section>
<section id="intro">
<h2>Introduction</h2>
<section id="what-is-wp" class="informative">
<h3>What is a Web Publication</h3>
<p>A <a>Web Publication</a> is a discoverable and identifiable collection of resources. Information
about the Web Publication is expressed in a machine-readable document called a <a>manifest</a>,
which is what enables user agents to understand the bounds of the Web Publication and the connection
between its resources.</p>
<p>The manifest includes metadata that describe the Web Publication, as a publication has an identity
and nature beyond its constituent resources. The manifest also provides a list of all the resources
that belong to the Web Publication and a default reading order, which is how it connects resources
into a single contiguous work.</p>
<p>A Web Publication is discoverable in one of two ways: resources either include a link to the manifest
(via an HTTP Link header or an HTML <code>link</code> element [[html]]), or the manifest can be
loaded directly by a compatible user agent.</p>
<p>With the establishment of Web Publications, user agents can build new experiences tailored
specifically for their unique reading needs.</p>
<figure id="WP-diagram">
<object data="images/WP-diagram.svg" type="image/svg+xml" aria-describedby="wp-diagram-alt">
<p id="wp-diagram-alt">Flowchart depicts the resources of a Web Publication and their attachment
to a manifest.</p>
</object>
<figcaption>Simplified Diagram of the Structure of Web Publications. <br />A <a
href="#WP-diagram-descr">description of the structure diagram</a> is available in the
Appendix. Image available in <a href="images/WP-diagram.svg"
title="SVG image of the structure of Web Publications">SVG</a> and <a
title="PNG image of the structure of Web Publications" href="images/WP-diagram.png">PNG</a>
formats.</figcaption>
</figure>
</section>
<section id="scope" class="informative">
<h3>Scope</h3>
<p>This specification defines requirements for the production of <a>Web Publications</a>. It does not
attempt to constrain the nature of a Web Publication—any type of work that can be represented on the
Web constitutes a potential Web Publication. It is also designed to be adaptable to the needs of
specific areas of published, such as audiobook production, and encourages a modular approach for
creating specializations.</p>
<p>As much as possible, this specification leverages existing Open Web Platform technologies to achieve
its goal—that being to allow for a measure of boundedness on the Web without changing the way that
the Web itself operates.</p>
<p>Moreover, the specification is designed to adapt automatically to updates to Open Web Platform
technologies in order to ensure that Web Publications continue to interoperate seamlessly as the Web
evolves (e.g., by referencing the latest published versions instead of specific dated versions).</p>
<p>The specification is also intended to facilitate different user agent architectures for the
consumption of Web Publications. While a primary goal is that traditional Web user agents (browsers)
will be able to consume Web Publications, this should not limit the capabilities of any other
possible type of user agent (e.g., applications, whether standalone or running within a user agent,
or even Web Publications that include their own user interface). As a result, the specification does
not attempt to architect required solutions for situations whose expected outcome will vary
depending on the nature of the user agent and the expectations of the user (e.g., how to prompt to
initiate a Web Publication, or at what point or how much of a Web Publication to cache for offline
use).</p>
<p>This specification does not define how user agents are expected to render Web Publications. Details
about the types of afforances that user agents can provide to enhance the reading experience for
users are instead defined in [[PWP-UCR]].</p>
</section>
<section id="terminology">
<h3>Terminology</h3>
<p>This document uses terminology defined by the W3C Note "Publishing and Linking on the
Web" [[publishing-linking]], including, in particular, <a class="externalDFN"
href="https://www.w3.org/TR/publishing-linking/#dfn-user">user</a>, <a class="externalDFN"
href="https://www.w3.org/TR/publishing-linking/#dfn-user-agent">user agent</a>, <a
class="externalDFN" href="https://www.w3.org/TR/publishing-linking/#dfn-browser">browser</a>,
and <a class="externalDFN" href="https://www.w3.org/TR/publishing-linking/#dfn-address"
>address</a>.</p>
<dl>
<dt>
<dfn data-lt="identifiers">Identifier</dfn>
</dt>
<dd>
<p>An identifier is metadata that can be used to refer to <a class="externalDFN"
href="https://www.w3.org/TR/publishing-linking/#dfn-web-content">Web Content</a> in a
persistent and unambiguous manner. <abbr title="Uniform Resource Locators">URLs</abbr>,
<abbr title="Uniform Resource Names">URNs</abbr>, <abbr
title="Digital Object Identifiers">DOIs</abbr>, <abbr
title="International Standard Book Numbers">ISBNs</abbr>, and <abbr
title="Persistent Uniform Resource Locators">PURLs</abbr> are all examples of persistent
identifiers frequently used in publishing.</p>
</dd>
<dt>
<dfn data-lt="Manifests">Manifest</dfn>
</dt>
<dd>
<p>A manifest represents structured information about a <a>Web Publication</a>, such as
informative metadata, a <a href="#resource-list">list of all resources</a>, and a <a>default
reading order</a>.</p>
</dd>
<dt>
<dfn>Non-empty</dfn>
</dt>
<dd>
<p>For the purposes of this specification, non-empty is used to refer to an element, attribute
or property whose text content or value consists of one or more characters after whitespace
normalization, where whitespace normalization rules are defined per the host format.</p>
</dd>
<dt>
<dfn data-lt="URLs">URL</dfn>
</dt>
<dd>
<p>The general term <abbr title="Uniform Resource Locator">URL</abbr> is defined by the URL
Standard [[!url]]. It is used as in other <abbr title="World Wide Web Consortium"
>W3C</abbr> specifications, like <abbr title="Hypertext Markup Language"
>HTML</abbr> [[!html]]. In particular, a <abbr title="Uniform Resource Locator"
>URL</abbr> allows for the usage of characters from Unicode following [[!rfc3987]].
See <a href="https://www.w3.org/TR/html/references.html#biblio-url">the note in the HTML5
specification</a> for further details.</p>
</dd>
<dt>
<dfn data-lt="Web Publications|Web Publication's">Web Publication</dfn>
</dt>
<dd>
<p>A Web Publication is a collection of one or more resources, organized together through a
<a>manifest</a> into a single logical work with a <a>default reading order</a>. The Web
Publication is uniquely identifiable and presentable using Open Web Platform
technologies.</p>
</dd>
</dl>
</section>
</section>
<section id="conformance">
<section id="conformance-classes">
<h2>Conformance Classes</h2>
<p>This specification defines two conformance classes: one for <a>Web Publications</a> and one for user
agents that process them.</p>
<p id="wp-conformance">A Web Publication conforms to this specification if it meets the following
criteria:</p>
<ul>
<li>it has a <a>manifest</a> that conforms to <a href="#wp-properties-req"></a>;</li>
<li>it adheres to the construction requirements defined in <a href="#wp-construction"></a>.</li>
</ul>
<p id="ua-conformance">A user agent conforms to this specification if it meets the following
criteria:</p>
<ul>
<li>it is capable of <a href="#obtaining-manifest">obtaining a conforming manifest</a> for a Web
Publication.</li>
</ul>
</section>
</section>
<section id="wp-construction">
<h2>Web Publication Construction</h2>
<section id="wp-manifest">
<h3>Manifest</h3>
<section id="manifest-authored-canonical">
<h4>Authored and Canonical Manifests</h4>
<p>A Web Publication is described by its <a>manifest</a>, which provides a set of properties
expressed using the JSON-LD [[json-ld]] format (a variant of JSON [[ecma-404]] for
linked data).</p>
<p>The manifest is expressed in one of two forms depending on the state of the Web Publication:</p>
<dl>
<dt>
<dfn data-lt="authored web publication manifest">Authored Manifest</dfn>
</dt>
<dd>
<p>The Authored Web Publication Manifest, as its name suggests, is the serialization of the
manifest that the author provides with the Web Publication (note that the author does
not have to be human).</p>
</dd>
<dt>
<dfn data-lt="canonical manifest|canonical web publication manifest">Canonical
Manifest</dfn>
</dt>
<dd>
<p>The Canonical Web Publication Manifest is a version of the Web Publication
<a>Manifest</a> created by user agents when they <a href="#obtaining-manifest"
>obtain the authored manifest</a> and remove all possible ambiguities and
incorporate any missing values that can be inferred from another source.</p>
</dd>
</dl>
<p>It is possible that an authored manifest is the equivalent of the canonical manifest if there are
no ambiguities or missing information, but a canonical manifest only exists after a user agent
has inspected the authored manifest as part of the process of obtaining it.</p>
<p>This specification describes the requirements for creating both authored and canonical manifests.
This section, in particular, details how to create the authored manifest, while <a
href="#wp-properties"></a> provides the various property definitions. These definitions
include the rules user agents uses to supplement the canonical manifest. The algorithm for
transforming an <a>Authored Manifest</a> into a <a>Canonical Manifest</a> is described in the
separate section <a href="#canonical-manifest"></a>.</p>
</section>
<section id="webidl">
<h4>WebIDL</h4>
<section id="webidl-intro" class="informative">
<h5>Explanation</h5>
<p>Although a Web Publication manifest is authored as [[json-ld]], a user agent processes this
information into an internal data structure in order to utilize the properties. The exact
manner in which this processing occurs, and how the data is used internally, is user
agent-dependent.</p>
<p>To ensure interoperability when exposing the items, this specification defines an abstract
representation of the data structures using the Web Interface Definition Language (WebIDL)
[[webidl-1]]. The WebIDL definitions express the expected names, datatypes, and possible
restrictions for each member of the manifest. (A WebIDL representation can be mapped onto
ECMAScript, C, or other programming languages.)</p>
<p class="note">Authors of Web Publications are encouraged to review these definitions, but they
are not necessary to understand.</p>
</section>
<section id="webidl-wpm">
<h5>The <dfn><code>WebPublicationManifest</code></dfn> Dictionary</h5>
<pre class="idl" id="wpm">
dictionary WebPublicationManifest {
};</pre>
<p>The <code>WebPublicationManifest</code> dictionary is the [[!webidl-1]] representation of the
collection of Web Publication manifest properties. WebIDL definitions are also provided at
the end of each property that belongs to the dictionary — these represent the members
of the <code>WebPublicationManifest</code> dictionary.</p>
<p class="note">Refer to <a href="#idl-index"></a> for a complete listing of the
<code>WebPublicationManifest</code> dictionary.</p>
</section>
</section>
<section id="manifest-context">
<h4>Manifest Contexts</h4>
<p>A Web Publication Manifest MUST start by setting the JSON-LD context [[!json-ld]]. The context
has the following two major components:</p>
<ul>
<li>the [[!schema.org]] context: <code>https://schema.org</code></li>
<li>the Web Publication context: <code>https://www.w3.org/ns/wp-context</code></li>
</ul>
<pre class="example" title="The context declaration.">
{
"@context" : ["https://schema.org", "https://www.w3.org/ns/wp-context"],
…
}
</pre>
<p>The Web Publication context document adds features to the properties defined in Schema.org (e.g.,
the requirement for the <a href="https://schema.org/creator">creator</a> property to be order
preserving).</p>
<p class="ednote">As part of the continuous contacts with Schema.org the additional features defined
in the Web Publication context file could migrate to the core Schema.org vocabulary.</p>
<p class="note">Although Schema.org is often referenced using the <code>http</code> URI scheme, <a
href="https://schema.org/docs/faq.html#19">the vocabulary is being migrated</a> to use the
secure <code>https</code> scheme as its default. This specification requires the use
<code>https</code> when referencing Schema.org in the manifest.</p>
</section>
<section id="manifest-values">
<h4>Values</h4>
<section id="arrays-and-single-values">
<h5>Arrays and Single Values</h5>
<p>Various manifest properties can have one or more values. As a general rule, these values can
be expressed as [[!json]] arrays. When the property value is an array with a single
element, however, the array syntax MAY be omitted.</p>
<aside class="example" title="Using a text string instead of an array">
<p>As a Web Publication typically contains many resources, this declaration of a single
resource:</p>
<pre>
{
"resources" : "datatypes.svg",
…
}</pre>
<p>is equivalent to the array:</p>
<pre>
{
"resources" : ["datatypes.svg"],
…
}</pre>
</aside>
</section>
<section id="strings-vs-objects">
<h5>Text Values or Objects</h5>
<p>Various manifest properties are expected to be expressed as [[!json]] objects. Although
the use of objects is usually RECOMMENDED, it is also acceptable to use string values that
are interpreted as objects depending on the context. The exact mapping of text values to
objects is part of the property or object definitions.</p>
<aside class="example" title="Using a text string instead of a Person object.">
<p>The following author name is expressed as a text string:</p>
<pre>
{
"author" : "Herman Melville",
…
}</pre>
<p>but, in the context of <a href="#creators">creators</a>, it is equivalent to:</p>
<pre>
{
"author" : {
"type" : "Person"
"name" : "Herman Melville"
},
…
}</pre>
<p>(See <a href="#creators"></a> for further details.)</p>
</aside>
</section>
<section id="link-values">
<h5>Link Values</h5>
<p>With the exception of the <a href="#descriptive-properties">descriptive properties</a>, Web
Publication properties typically link to one or more resources. When a property requires a
link value, the link MUST be expressed in one of the following two ways:</p>
<ol>
<li>as a string encoding the (absolute or relative) URL of the resources [[!url]];
or</li>
<li>as an instance of a <a href="#publication-link-def"><code>LinkedResource</code>
object</a> that can be used to express the URL, the media type, and other
characteristics of the target resource.</li>
</ol>
<p>In other words, a single string value is a shorthand for a <code>LinkedResource</code> object
whose <code>url</code> property is set to that string value. (See also <a
href="#strings-vs-objects"></a>.)</p>
<pre class="example" title="Resource list that includes one link using a relative URL as a string ('datatypes.svg') and two that display the various properties of the a LinkedResource object">
{
…
"resources" : [
"datatypes.svg",
{
"type" : "LinkedResource",
"url" : "test-utf8.csv",
"encodingFormat" : "text/csv",
"name" : "Test Results",
"description" : "CSV file containing the full data set used."
},
{
"type" : "LinkedResource",
"url" : "terminology.html",
"encodingFormat" : "text/html",
"rel" : "glossary"
}
]
}
</pre>
<section id="linkedResource">
<h6><code>LinkedResource</code> Definition</h6>
<p id="publication-link-def">This specification defines a new type for links called
<code><dfn>LinkedResource</dfn></code>. It consists of the following
properties:</p>
<table class="zebra" data-dfn-for="LinkedResource">
<thead>
<tr>
<th>Term</th>
<th>Description</th>
<th>Required Value</th>
<th>[[!schema.org]] Mapping</th>
<th>Optionality</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>
<dfn>url</dfn>
</code>
</td>
<td>Location of the resource.</td>
<td>A URL [[!url]]. Refer to the property definitions that accept this type
for additional restrictions.</td>
<td>
<a href="https://schema.org/url">
<code>url</code>
</a>
</td>
<td>REQUIRED</td>
</tr>
<tr>
<td>
<code>
<dfn>encodingFormat</dfn>
</code>
</td>
<td>Media type of the resource (e.g., <code>text/html</code>).</td>
<td>MIME Media Type [[!rfc2046]].</td>
<td>
<a href="https://schema.org/encodingFormat">
<code>encodingFormat</code>
</a>
</td>
<td>OPTIONAL</td>
</tr>
<tr>
<td>
<code>
<dfn>name</dfn>
</code>
</td>
<td>Name of the item.</td>
<td>One or more Text items.</td>
<td>
<a href="https://schema.org/name">
<code>name</code>
</a>
</td>
<td>OPTIONAL</td>
</tr>
<tr>
<td>
<code>
<dfn>description</dfn>
</code>
</td>
<td>Description of the item.</td>
<td>Text.</td>
<td>
<a href="https://schema.org/description">
<code>description</code>
</a>
</td>
<td>OPTIONAL</td>
</tr>
<tr>
<td>
<code>
<dfn>rel</dfn>
</code>
</td>
<td>The relationship of the resource to the Web Publication.</td>
<td>
<p>One or more relations. The values are either the relevant relationship
terms of the IANA link registry [[!iana-link-relations]], or
specially-defined URLs if no suitable link registry item exists.</p>
</td>
<td>(None)</td>
<td>OPTIONAL</td>
</tr>
</tbody>
</table>
<pre class="idl">
dictionary LinkedResource {
required DOMString url;
DOMString encodingFormat;
sequence<LocalizableString> name;
LocalizableString description;
sequence<DOMString> rel;
};</pre>
</section>
</section>
</section>
<section id="manifest-pub-types">
<h4>Publication Types</h4>
<p>The Web Publication Manifest MUST include a <dfn>Publication Type</dfn> using the <code
data-dfn-for="WebPublicationManifest"><dfn>type</dfn></code> term [[!json-ld]]. The
type MAY be mapped onto <a href="https://schema.org/CreativeWork"
><code>CreativeWork</code></a> [[!schema.org]].</p>
<pre class="example" title="Setting a Web Publication's type to CreativeWork.">
{
"@context" : ["https://schema.org", "https://www.w3.org/ns/wp-context"],
"type" : "CreativeWork"
…
}
</pre>
<p>Schema.org also includes a number of more specific subtypes of <code>CreativeWork</code>, such as
<a href="https://schema.org/Article"><code>Article</code></a>, <a
href="https://schema.org/Book"><code>Book</code></a>, <a
href="https://schema.org/TechArticle"><code>TechArticle</code></a>, and <a
href="https://schema.org/Course"><code>Course</code></a>. These MAY be used instead of, or
in addition to, <code>CreativeWork</code>.</p>
<pre class="example" title="Setting a Web Publication's type to Book.">
{
"@context" : ["https://schema.org", "https://www.w3.org/ns/wp-context"],
"type" : "Book"
…
}
</pre>
<p>Each Schema.org type defines a set of properties that are valid for use with it. To ensure that
the manifest can be validated and processed by Schema.org aware processors, the manifest SHOULD
contain only the properties associated with the selected type.</p>
<p>If properties from more than one type are needed, the manifest MAY include multiple type
declarations.</p>
<pre class="example" title="A Web Publication that combines properties from both Book and VisualArtwork.">
{
"@context" : ["https://schema.org", "https://www.w3.org/ns/wp-context"],
"type" : ["Book", "VisualArtwork"],
…
}
</pre>
<p>User agents SHOULD NOT fail to process manifests that are not valid to their declared Schema.org
type(s).</p>
<p class="note">Refer to the Schema.org site for the complete <a
href="https://schema.org/CreativeWork">list of <code>CreativeWork</code> subtypes</a>.</p>
<pre class="idl">
partial dictionary WebPublicationManifest {
required sequence<DOMString> type;
};</pre>
</section>
<section id="manifest-properties">
<h4>Properties</h4>
<p>The naming, syntax, and requirements for manifest properties are defined in <a
href="#wp-properties"></a>.</p>
<p class="note">Although authors only have to understand the serialization requirements for manifest
terms, they are encouraged to read through the full definitions for each property. The
definitions describe, in some cases, how items are compiled into the <a>Canonical Manifest</a>
in the absence of explicit information.</p>
</section>
<section id="manifest-relative-urls">
<h4>Relative URLs</h4>
<p>
<a href="https://url.spec.whatwg.org/#relative-url-string">Relative URL strings</a> MAY be used
in the manifest. These URLs are resolved to <a
href="https://url.spec.whatwg.org/#absolute-url-string">absolute URL strings</a> using a <a
href="https://url.spec.whatwg.org/#concept-base-url">base URL</a> [[!url]].</p>
<p>The base URL for relative URLs is determined as follows:</p>
<ul>
<li>In the case of an <a href="#manifest-embedding">embedded manifest</a>, the base URL is the
<a data-cite="!html#the-base-element">document base URL</a> [[!html]] of the
<a>primary entry page</a> of the Web Publication;</li>
<li>In the case of a <a href="#manifest-linking">linked manifest</a>, the base URL is URL of the
manifest resource.</li>
</ul>
<p>By consequence, relative URLs in embedded manifests are resolved against the URL of the primary
entry page <em>unless</em> the page declares a base direction (i.e., in a <a
data-cite="!html#the-base-element"><code><base></code> element</a> in its header).</p>
<p class="issue">The usage (or not) of the <code><base></code> element for embedded manifests
is currently the subject of several issues in the <a href="https://www.w3.org/2018/json-ld-wg/"
>JSON-LD Working Group</a>: <a href="https://github.com/w3c/json-ld-syntax/issues/22"
>JSON-LD #22</a>, <a href="https://github.com/w3c/json-ld-syntax/issues/57">JSON-LD #57</a>,
and, ultimately, <a href="https://github.com/w3ctag/design-reviews/issues/312">TAG #312</a>.</p>
</section>
<section id="manifest-embedding">
<h3>Embedding</h3>
<p>A manifest MAY be embedded only in the <a href="#wp-primary-entry-page">primary entry page</a>.
In this case, the manifest MUST be included in a <a
href="https://www.w3.org/TR/html5/semantics-scripting.html#the-script-element"
><code>script</code> element</a> [[!html]] whose <code>type</code> attribute is set
to <code>application/ld+json</code>.</p>
<p>Additionally, the <code>script</code> element MUST include a unique identifier in an
<code>id</code> attribute [[!html]]. This identifier ensures that the manifest <a
href="#manifest-linking">can be referenced</a>.</p>
<pre class="example" title="A Web Publication Manifest included in an HTML document">
<script id="example_manifest" type="application/ld+json">
{
…
}
</script>
</pre>
</section>
<section id="manifest-linking">
<h2>Linking To a Manifest</h2>
<p>With the exception of the <a>primary entry page</a>, linking a resource to its Web Publication
manifest is OPTIONAL. Including a link is encouraged whenever possible, however, as it allows
user agents to immediately ascertain that a resource belongs to a Web Publication regardless of
how the user reaches the resource.</p>
<p>Links to a Web Publication manifest MUST take one or both of the following forms:</p>
<ul>
<li>
<p>An HTTP <code>Link</code> header field [[!rfc5988]] with its <code>rel</code>
parameter set to the value "<code>publication</code>".</p>
<pre class="example">Link: <https://example.com/webpub/manifest>; rel=publication</pre>
</li>
<li>
<p>A <code>link</code> element [[!html]] with its <code>rel</code> attribute set to the
value "<code>publication</code>".</p>
<pre class="example"><link href="https://example.com/webpub/manifest" rel="publication"/></pre>
</li>
</ul>
<p>When a manifest is embedded within an HTML document, the link MUST include a fragment identifier
that references the <code>script</code> element that contains the manifest (see <a
href="#manifest-embedding"></a>).</p>
<pre class="example" title="Link to a manifest within the same HTML resource">
<link href="#example_manifest" rel="publication">
…
<script id="example_manifest" type="application/ld+json">
{
"@context" : ["https://schema.org", "https://www.w3.org/ns/wp-context"],
…
}
</script>
</pre>
<p class="issue" data-number="132">The exact value of <code>rel</code> is still to be agreed upon
and should be registered by IANA.</p>
<p class="ednote">The following details might be moved to the lifecycle section in a future
draft.</p>
<p>When a resource links to multiple manifests, a user agent MAY choose to present one or more
alternatives to the end user, or choose a single alternative on its own. The user agent MAY
choose to present any manifest based upon information that it possesses, even one that is not
explicitly listed as a parent (e.g., based upon information it calculates or acquires out of
band). In the absence of a preference by user agent implementers, selection of the first
manifest listed is suggested as a default.</p>
</section>
</section>
<section id="wp-bounds">
<h2>Web Publication Bounds</h2>
<p>A Web Publication consists of a finite set of <a href="#wp-resources">resources</a> that represent
its content. This extent is known as its bounds and is defined within its manifest — it is
obtained from the union of resources listed in the <a href="#default-reading-order">default reading
order</a> and <a href="#resource-list">resource list</a>.</p>
<p>To determine whether a resource is within the bounds of a Web Publication, user agents MUST compare
the absolute URL of a resource to the absolute URLs of the resources obtained from the union. If the
resource is identified in the enumeration, it is within the bounds of the Web Publication. All other
resources are external to the Web Publication.</p>
<p>Resources within the bounds of a Web Publication do not have to share the same domain.</p>
</section>
<section id="wp-resources">
<h2>Resources</h2>
<p>A <a>Web Publication</a> MUST include at least one HTML document [[!html]]—the <a>primary
entry page</a>.</p>
<p>There are no restrictions on a Web Publication beyond this requirement. The Web Publication MAY
include references to resources of any media type, both in the <a>default reading order</a> and as
dependencies of other resources.</p>
<p class="note">When adding resources to a Web Publication, consider support in user agents. The use of
progressive enhancement techniques and the provision of fallback content, as appropriate, will
ensure a more consistent reading experience for users regardless of their preferred user agent.</p>
</section>
<section id="wp-primary-entry-page">
<h3>Primary Entry Page</h3>
<p>The <dfn>primary entry page</dfn> represents the preferred starting <a href="#wp-resources"
>resource</a> for a Web Publication and enables discovery of its <a>manifest</a>. It is the
resource that is returned when accessing the Web Publication's <a>address</a>, and MUST be included
in either the <a>default reading order</a> or the <a>resource list</a>.</p>
<p>Although any resource can link to the Web Publication manifest, the primary entry page typically
introduces the publication and provides access to the content. It might contain all the content, in
the case of a single-page Web Publication, or provide navigational aids to begin reading a
multi-document Web Publication. To facilitate the user ease of consumption, the primary entry page
SHOULD contain the <a href="#wp-table-of-contents">table of contents</a>.</p>
<p>It is not required that the primary entry page be included in the <a href="#default-reading-order"
>default reading order</a>, nor that it be the first document listed when it is included. This
specification leaves the exact nature of the document intentionally underspecified to provide
flexibility for different approaches. If a default reading order is not provided, however, user
agents will <a href="#no-reading-order">create one using the primary entry page</a>.</p>
<p>The primary entry page is the only resource in which <a href="#manifest-embedding">a manifest can be
embedded</a>. To ensure discovery of the manifest, the primary entry page MUST provide a <a
href="#manifest-linking">link to the manifest</a>, regardless of whether the manifest is
embedded within the page or external to it.</p>
<p>The address of the primary entry page is also the <a>canonical identifier</a> for the Web Publication
(i.e., it serves as the unique identifier for the Web Publication).</p>
<p>In certain cases where information has been omitted from the manifest, user agents will sometimes use
the primary entry page as a fallback source of information (see <a href="#language-and-dir">language
and base direction</a> and <a href="#title">title</a>).</p>
</section>
<section id="wp-table-of-contents">
<h3>Table of Contents</h3>
<p>The table of contents provides a hierarchical list of links that reflects the structural outline of
the major sections of the Web Publication.</p>
<p>The table of contents is expressed via an [[!html]] element (typically a <a
href="https://www.w3.org/TR/html/sections.html#the-nav-element"><code>nav</code> element</a>) in
one of the <a href="#wp-resources">resources</a>. This element MUST be identified by the
<code>role</code> attribute [[!html]] value "<code>doc-toc</code>" [[!dpub-aria-1.0]],
and MUST be the first element in the document — in <a
href="https://dom.spec.whatwg.org/#concept-tree-order">document tree order</a> [[!dom]]
— with that <code>role</code> value.</p>
<p>If the table of contents is not located in the <a href="#wp-primary-entry-page">primary entry
page</a>, the manifest SHOULD <a href="#table-of-contents">identify the resource</a> that
contains the structure.</p>
<p> When specified, the table of content MUST include a link to at least one <a href="#wp-resources"
>resource</a>, and all links SHOULD refer to <a href="#wp-resources">resources</a> within <a
href="#wp-bounds">publication bounds</a>. </p>
<p>Refer to the <a href="#table-of-contents">table of contents property definition</a> for more
information on how to identify which resource contains the table of contents.</p>
</section>
<section id="wp-pagelist">
<h3>Page List</h3>
<p>The page list is a list of links that provides navigation to static page demarcation points within
the content. These locations allow users to coordinate access into the content, for example. The
exact nature of these locations is left to content creators to define. They usually correspond to
pages of a print document which is the source of the digital publication, but might be a purely
digital creation added to ease navigation.</p>
<p>The page list is expressed via an [[!html]] element (typically a <a
href="https://www.w3.org/TR/html/sections.html#the-nav-element"><code>nav</code> element</a>) in
one of the <a href="#wp-resources">resources</a>. This element MUST be identified by the
<code>role</code> attribute [[!html]] value
"<code>doc-pagelist</code>" [[!dpub-aria-1.0]], and MUST be the first element in the document
— in <a href="https://dom.spec.whatwg.org/#concept-tree-order">document tree
order</a> [[!dom]] — with that <code>role</code> value.</p>
<p>If the page list is not located in the <a href="#wp-primary-entry-page">primary entry page</a>, the
manifest SHOULD <a href="#page-list">identify the resource</a> that contains the structure.</p>
<p>There are no requirements on the page list itself, except that, when specified, it MUST include a
link to at least one <a href="#wp-resources">resource</a>.</p>
<p>Refer to the <a href="#page-list"><code>pagelist</code> property definition</a> for more information
on how to identify which resource contains the page list.</p>
</section>
</section>
<section id="wp-properties">
<h2>Web Publication Properties</h2>
<section id="properties-intro" class="informative">
<h3>Introduction</h3>
<p>The Web Publication manifest is defined by a set of properties that describe the basic information a
user agent requires to process and render a Web Publication. These properties are categorized as
followed:</p>
<dl>
<dt>
<a href="#descriptive-properties">descriptive properties</a>
</dt>
<dd>
<p>Descriptive properties describe aspects of a Web Publication, such as its <a href="#wp-title"
>title</a>, <a href="#creators">creator</a>, and <a href="#language-and-dir"
>language</a>. These properties are primarily drawn from <a href="https://schema.org"
>Schema.org</a> and its <a href="https://schema.org/docs/schemas.html">hosted
extensions</a> [[schema.org]], so they map to one or several Schema.org properties
and inherit their syntax and semantics. (The following property categories typically do not
have Schema.org equivalents, so are defined specifically for Web Publications.)</p>
</dd>
<dt>
<a href="#resource-categorization-properties">resource categorization</a>
</dt>
<dd>
<p>Resource categorization properties describe or identify common sets of resources, such as the
<a href="#resource-list">resource list</a> and <a href="#default-reading-order">default
reading order</a>. These properties refer to one or more resources, such as HTML
documents, images, script files, and separate metadata files.</p>
</dd>
<dt>
<a href="#informative-properties">informative properties</a>
</dt>
<dd>
<p>Informative properties identify resources that contain additional information about the Web
Publication, such as its <a href="#privacy-policy">privacy policy</a> or <a
href="#accessibility-report">accessibility report</a>.</p>
</dd>
<dt>
<a href="#structural-properties">structural properties</a>
</dt>
<dd>
<p>Structural properties identify key meta structures of the Web Publication, such as the <a
href="#cover">cover image</a>, <a href="#table-of-contents">table of contents</a>, and
<a href="#page-list">page list</a>.</p>
</dd>
</dl>
<p class="note">The categorization of properties is done to simplify comprehension of their purpose; the
groupings have no relevance outside this specification (i.e., the groupings do not exist in the
manifest).</p>
<div class="note">
<p>Each manifest item drawn from schema.org identifies the property it maps to and includes its
defining type in parentheses. Properties are often available in many types, however, as a result
of the schema.org inheritance model. Refer to each property definition for more detailed
information about where it is valid to use.</p>
<p>Schema.org additionally includes a large number of properties that, though relevant for
publishing, are not mentioned in this specification — Web Publication authors can use any
of these properties. This document defines only the minimal set of manifest items.</p>
</div>
<p class="ednote">There are discussion on whether a best practices document would be created, referring
to more schema.org terms. If so, it should be linked from here.</p>
</section>
<section id="wp-properties-req">
<h3>Requirements</h3>
<p>The requirements for the expression of Web Publication properties are defined as follows:</p>
<dl>
<dt>REQUIRED:</dt>
<dd>
<ul>
<li>
<a href="#address">address</a>
</li>
<li>
<a href="#default-reading-order">default reading order</a>
</li>
<li>
<a href="#wp-title">title</a>
</li>
</ul>
</dd>
<dt>RECOMMENDED:</dt>
<dd>
<ul>
<li>
<a href="#accessibility">accessibility</a>
</li>
<li>
<a href="#accessibility-report">accessibility report</a>
</li>
<li>
<a href="#language-and-dir">base direction</a>
</li>
<li>
<a href="#canonical-identifier">canonical identifier</a>
</li>
<li>
<a href="#cover">cover</a>
</li>
<li>
<a href="#creators">creators</a>
</li>
<li>
<a href="#language-and-dir">language and base direction</a>
</li>
<li>
<a href="#links">links</a>
</li>
<li>
<a href="#last-modification-date">last modification date</a>
</li>
<li>
<a href="#publication-date">publication date</a>
</li>
<li>
<a href="#privacy-policy">privacy policy</a>
</li>
<li>
<a href="#reading-progression-direction">reading progression direction</a>
</li>
<li>
<a href="#resource-list">resource list</a>
</li>
<li>
<a href="#table-of-contents">table of contents</a>