-
Notifications
You must be signed in to change notification settings - Fork 59
/
epub-packages.html
4126 lines (3544 loc) · 179 KB
/
epub-packages.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>EPUB Packages 3.2</title>
<script src="https://www.w3.org/Tools/respec/respec-w3c-common" class="remove"></script>
<script src="common/js/biblio.js" class="remove"></script>
<script src="common/js/dfn-crossref.js" class="remove"></script>
<script src="common/js/confreq-permalinks.js" class="remove"></script>
<script src="common/js/copyright.js" class="remove"></script>
<link href="common/css/common.css" rel="stylesheet" type="text/css" />
<script class="remove">
var respecConfig = {
wg: "EPUB 3 Community Group",
wgURI: "https://www.w3.org/community/epub3/",
wgPublicList: "public-epub3",
specStatus: "CG-DRAFT",
noRecTrack: true,
shortName: "epub-packages",
prevRecURI: "https://www.idpf.org/epub/31/spec/epub-packages-20170105.html",
edDraftURI: "https://w3c.github.io/publ-epub-revision/epub32/spec/epub-packages.html",
copyrightStart: "1999",
editors: [
{
name: "Matt Garrish",
company: "DAISY Consortium",
companyURL: "https://www.daisy.org"
},
{
name: "Dave Cramer",
company: "Hachette Book Group",
companyURL: "https://www.hachettebookgroup.com"
}
],
formerEditors: [
{
name: "Markus Gylling",
company: "International Digital Publishing Forum (IDPF)",
companyURL: "https://www.idpf.org"
},
{
name: "William McCoy",
company: "International Digital Publishing Forum (IDPF)",
companyURL: "https://www.idpf.org"
}
],
processVersion: 2017,
includePermalinks: true,
permalinkEdge: true,
permalinkHide: false,
diffTool: "http://www.aptest.com/standards/htmldiff/htmldiff.pl",
github: {
repoURL: "https://github.com/w3c/publ-epub-revision",
branch: "master"
},
localBiblio: biblio,
preProcess: [fixDefinitionCrossrefs, addConformanceLinks],
postProcess: [fixCopyright]
};
</script>
</head>
<body>
<section id="abstract">
<p>This specification defines semantics and conformance requirements for an <a data-lt="EPUB Package">EPUB®
Package</a>. Each Package represents one <a>Rendition</a> of an <a>EPUB Publication</a>, and is
defined by a <a>Package Document</a> that describes the content of the Rendition and sets the
requirements for how <a>Publication Resources</a> are associated.</p>
<p>This specification also defines the <a>EPUB Navigation Document</a>, a machine- and human-readable
specialization of an <a>EPUB Content Document</a> that provides navigation aids such as the table of
contents.</p>
<p>This specification is one of a <a href="epub-spec.html#sec-intro-epub-specs">family of specifications</a>
that compose [[EPUB32]], an interchange and delivery format for digital publications based on XML and
Web Standards. It is meant to be read and understood in concert with the other specifications that make
up EPUB 3</p>. <p>Refer to [[EPUB32Changes]] for more information on the differences between this
specification and its predecessor.</p>
</section>
<section id="sotd"></section>
<section id="sec-introduction">
<h1>Introduction</h1>
<section id="sec-terminology">
<h2>Terminology</h2>
<p>Terms with meanings specific to EPUB 3 are capitalized in this document (e.g., "Author", "Reading
System"). A complete list of these <a href="epub-spec.html#sec-terminology">terms and
definitions</a> is provided in [[!EPUB32]].</p>
<p>Only the first instance of a term in a section is linked to its definition.</p>
</section>
<section id="conformance"></section>
<section id="sec-overview-pfx">
<h2>Prefix Mappings</h2>
<p>For convenience, the following <a href="#sec-metadata-reserved-prefixes">reserved prefix mappings</a>
are used in this specification.</p>
<table class="mapping">
<tr>
<th>prefix</th>
<th>URI</th>
</tr>
<tr>
<td>
<code>dcterms</code>
</td>
<td>
<code>http://purl.org/dc/terms/</code>
</td>
</tr>
<tr>
<td>
<code>opf</code>
</td>
<td>
<code>http://www.idpf.org/2007/opf</code>
</td>
</tr>
<tr>
<td>
<code>rendition</code>
</td>
<td>
<code>http://www.idpf.org/vocab/rendition/#</code>
</td>
</tr>
</table>
</section>
</section>
<section id="sec-conformance">
<h1>Conformance</h1>
<section id="sec-package-conformance">
<h2>Package Conformance</h2>
<p>A conformant <a>EPUB Package</a> MUST meet all of the following criteria:</p>
<dl class="conformance-list">
<dt id="sec-package-conformance-packagedoc">Package Document</dt>
<dd>
<p id="confreq-package">It MUST contain exactly one <a>Package Document</a>, which MUST conform
to the content requirements defined in <a href="#sec-package-content-conf">Package Document
— Content Conformance</a>.</p>
</dd>
<dt id="sec-epub-rendition-content-conformance-all">Publication Resources</dt>
<dd>
<p id="confreq-rendition-manifest">All <a>Publication Resources</a> associated with the Package
MUST be listed in the Package Document (as defined in <a href="#sec-manifest-elem"
>manifest</a>).</p>
</dd>
<dt id="sec-package-conformance-nav">EPUB Navigation Document</dt>
<dd>
<p id="confreq-nav-occur">It MUST contain exactly one <a>EPUB Navigation Document</a>, which
MUST conform to the content requirements defined in <a href="#sec-package-nav-content-conf"
>EPUB Navigation Documents — Content Conformance</a>.</p>
</dd>
<dt id="sec-package-conformance-contentdocs">Content Documents</dt>
<dd>
<p id="confreq-cd">It MUST contain one or more <a>EPUB Content Documents</a>, each of which MUST
conform to the content requirements defined in [[!ContentDocs32]].</p>
</dd>
<dt id="sec-package-conformance-css">CSS Style Sheets</dt>
<dd>
<p id="confreq-css">It MAY contain zero or more CSS Style Sheets, each of which MUST conform to
the content requirements defined in <a href="epub-contentdocs.html#sec-css-content-conf">CSS
Style Sheets — Content Conformance</a> [[!ContentDocs32]].</p>
</dd>
<dt id="sec-package-conformance-pls">Pronunciation Lexicons</dt>
<dd>
<p id="confreq-pls">It MAY contain zero or more PLS Documents, each of which MUST conform to the
content requirements defined in <a href="epub-contentdocs.html#sec-pls-conf-content">PLS
Documents — Content Conformance</a> [[!ContentDocs32]].</p>
</dd>
<dt id="sec-package-conformance-media-overlays">Media Overlay Documents</dt>
<dd>
<p id="confreq-mo">It MAY contain zero or more <a>Media Overlay Documents</a>, each of which
MUST conform to the content requirements defined in [[!MediaOverlays32]].</p>
</dd>
<dt id="sec-package-conformance-additional">Additional Resources</dt>
<dd>
<p id="confreq-additional">It MAY contain zero or more <a>Publication Resources</a> in addition
to those listed above, each of which MUST adhere to the requirements in <a
href="epub-spec.html#sec-epub-pub-conformance-all">Publication Resources</a>
[[!EPUB32]].</p>
</dd>
</dl>
</section>
<section id="sec-package-rs-conformance">
<h2>Reading System Conformance</h2>
<p>An <a>EPUB Reading System</a> MUST meet all of the following criteria:</p>
<ul class="conformance-list">
<li>
<p id="confreq-rendition-rs-package">It MUST process the <a>Package Document</a> as defined in
<a href="#sec-package-rs-conf">Package Document — Reading System Conformance</a>, and
honor all presentation logic expressed through the Package Document (e.g., the reading
order, fallback chains, page progression direction and fixed layouts).</p>
</li>
<li>
<p id="confreq-rendition-rs-nav">It MUST process the <a>EPUB Navigation Document</a> as defined
in <a href="#sec-package-nav-rs-conf">EPUB Navigation Documents — Reading System
Conformance</a>.</p>
</li>
<li>
<p id="confreq-rendition-rs-manifest">It MUST NOT use any resources not listed in the Package
Document in the processing of the Package (e.g., <code>META-INF</code> files ([[!OCF32]]) or
resources specific to other Renditions of the EPUB Publication).</p>
</li>
</ul>
</section>
</section>
<section id="sec-package-doc">
<h1>Package Document</h1>
<section id="sec-package-intro" class="informative">
<h2>Introduction</h2>
<p>The <a>Package Document</a> is an XML document that consists of a set of elements that each
encapsulate information about a particular aspect of the <a>EPUB Package</a>. These elements serve
to centralize metadata, detail the individual resources that compose the Package and provide the
reading order and other information necessary to render the <a>Rendition</a>.</p>
<p>The following list summarizes the information found in the Package Document:</p>
<ul>
<li>
<p><a href="#sec-package-metadata">Metadata</a> — mechanisms to include and/or reference
metadata applicable to the given Rendition of the <a>EPUB Publication</a>.</p>
</li>
<li>
<p>A <a href="#sec-manifest-elem">manifest</a> — identifies (via IRI [[RFC3987]]) and describes
(via MIME media type [[RFC4839]]) the set of resources that collectively compose the given
Rendition.</p>
</li>
<li>
<p>A <a href="#sec-spine-elem">spine</a> — an ordered sequence of ID references to top-level
resources in the manifest from which all other resources in the set can be reached or
utilized. The spine defines the default reading order of the given Rendition.</p>
</li>
<li>
<p><a href="#sec-collection-elem">Collections</a> — a method of encapsulating and identifying
subcomponents within the Package.</p>
</li>
<li>
<p><a href="#sec-foreign-restrictions-manifest">Manifest fallback chains</a> — a mechanism that
defines an ordered list of top-level resources as content equivalents. A Reading System can
then choose between the resources based on which it is capable of rendering.</p>
</li>
</ul>
</section>
<section id="sec-package-content-conf">
<h2>Content Conformance</h2>
<p>A <a>Package Document</a> MUST meet all of the following criteria:</p>
<dl class="conformance-list">
<dt id="confreq-package-docprops">Document Properties</dt>
<dd>
<p id="confreq-package-xml"> It MUST meet the conformance constraints for XML documents defined
in <a href="epub-spec.html#sec-xml-constraints">XML Conformance</a> [[!EPUB32]]. </p>
<p id="confreq-package-docprops-schema">It MUST conform to all content conformance constraints
expressed in <a href="#sec-package-def">Package Document Definition</a>.</p>
<p class="note">Some of the content conformance constraints can be checked by validating content
documents against the schemas provided in <a href="#app-package-schema">Appendix A, Package
Document Schema</a>.</p>
</dd>
<dt id="confreq-package-fileprops">File Properties</dt>
<dd>
<p id="confreq-package-fileprops-name">The Package Document filename SHOULD use the file
extension <code class="filename">.opf</code>.</p>
</dd>
</dl>
<p id="media-type">Package Documents have the MIME media type <code>application/oebps-package+xml</code>
[[!RFC4839]].</p>
</section>
<section id="sec-package-rs-conf">
<h2>Reading System Conformance</h2>
<p>An <a>EPUB Reading System</a> MUST meet all of the following criteria:</p>
<dl class="conformance-list">
<dt id="confreq-rs-package-base">Processing</dt>
<dd>
<p id="confreq-rs-package-def">It MUST process the Package Document in conformance with all
Reading System conformance constraints expressed in <a href="#sec-package-def">Package
Document Definition</a>.</p>
<p id="confreq-rs-epub3-presentational-meta">It SHOULD process rendering metadata, as expressed
in <a href="#sec-package-metadata-rendering">Package Rendering Metadata</a>.</p>
<p id="confreq-rs-epub3-fxl-meta">It MUST process fixed layout metadata, as expressed in <a
href="#sec-package-metadata-fxl">Fixed-Layout Properties</a>.</p>
<p id="confreq-rs-epub3-fxl-conflicts">It MUST ignore proprietary metadata properties that
pertain to layout expressions if they conflict behaviorally with the property semantics
defined in <a href="#sec-package-metadata-fxl">Fixed-Layout Properties</a>.</p>
</dd>
</dl>
</section>
<section id="sec-package-def">
<h2>Package Document Definition</h2>
<p>All [[!XML]] elements defined in this section are in the <code>http://www.idpf.org/2007/opf</code>
namespace [[!XML-NAMES]] unless otherwise specified.</p>
<p>When an element defined in this section has mandatory text content, that content is referred to as
the value of the element in the explanatory descriptions.</p>
<section id="sec-package-elem">
<h3>The <code>package</code> Element</h3>
<p>The <code>package</code> element is the root element of the <a>Package Document</a> and defines
various aspects of the <a>EPUB Package</a> (see the <a href="#sec-package-intro"
>introduction</a> for a general overview).</p>
<dl id="elemdef-opf-package" class="elemdef">
<dt>Element Name</dt>
<dd>
<p><code>package</code></p>
</dd>
<dt>Usage</dt>
<dd>
<p>The <code>package</code> element is the root element of the Package Document.</p>
</dd>
<dt>Attributes</dt>
<dd>
<ul class="nomark">
<li>
<p>
<a href="#attrdef-dir"><code>dir</code></a>
<code>[optional]</code></p>
</li>
<li>
<p>
<a href="#attrdef-id"><code>id</code></a>
<code>[optional]</code></p>
</li>
<li>
<p>
<a href="#attrdef-package-prefix"><code>prefix</code></a>
<code>[optional]</code></p>
</li>
<li>
<p>
<a href="#attrdef-xml-lang"><code>xml:lang</code></a>
<code>[optional]</code></p>
</li>
<li>
<p>
<a href="#attrdef-package-unique-identifier"><code>unique-identifier</code></a>
<code>[required]</code></p>
</li>
<li>
<p>
<a href="#attrdef-package-version"><code>version</code></a>
<code>[required]</code></p>
</li>
</ul>
</dd>
<dt>Content Model</dt>
<dd>
<p>In this order:</p>
<ul class="nomark">
<li>
<p>
<a class="codelink" href="#elemdef-opf-metadata"><code>metadata</code></a>
<code>[exactly 1]</code></p>
</li>
<li>
<p>
<a href="#elemdef-opf-manifest"><code>manifest</code></a>
<code>[exactly 1]</code></p>
</li>
<li>
<p>
<a href="#elemdef-opf-spine"><code>spine</code></a>
<code>[exactly 1]</code></p>
</li>
<li>
<p>
<a href="#sec-opf2-guide"><code>guide</code></a>
<code>[0 or 1]</code>
<a href="epub-spec.html#legacy" class="legacy">(legacy)</a></p>
</li>
<li>
<p>
<a href="#sec-opf-bindings"><code>bindings</code></a>
<code>[0 or 1]</code>
<a href="epub-spec.html#deprecated" class="deprecated">(deprecated)</a></p>
</li>
<li>
<p>
<a href="#elemdef-collection"><code>collection</code></a>
<code>[0 or more]</code></p>
</li>
</ul>
</dd>
</dl>
<p id="attrdef-package-version">The <code>version</code> attribute specifies the EPUB specification
version to which the given EPUB Package conforms. The attribute MUST have the value
"<code>3.0</code>" to indicate compliance with this version of the specification.</p>
<p id="attrdef-package-unique-identifier">The <code>unique-identifier</code> attribute takes an
IDREF [[!XML]] that identifies the <a class="codelink" href="#sec-opf-dcidentifier"
><code>dc:identifier</code></a> element that provides the preferred, or primary,
identifier. Refer to <a href="#sec-package-metadata-identifiers">Publication Identifiers</a> for
more information.</p>
<p id="attrdef-package-prefix">The <code>prefix</code> attribute provides a declaration mechanism
for prefixes not <a href="#sec-metadata-reserved-prefixes">reserved by this specification</a>.
Refer to <a href="#sec-prefix-attr">The <code>prefix</code> Attribute</a> for more
information.</p>
</section>
<section id="sec-shared-attrs">
<h3>Shared Attributes</h3>
<p>This section provides definitions for shared attributes (i.e., attributes that are allowed on two
or more elements).</p>
<dl class="variablelist">
<dt id="attrdef-dir"><code>dir</code></dt>
<dd>
<p>Specifies the base text direction of the content and attribute values of the carrying
element and its descendants.</p>
<p>Inherent directionality specified using [[!Unicode]] takes precedence over this
attribute.</p>
<p>Allowed values are <code>ltr</code> (left-to-right) and <code>rtl</code>
(right-to-left).</p>
<div class="example">
<pre><package … dir="ltr"></pre>
</div>
<p>Allowed on: <a href="#sec-collection-elem"><code>collection</code></a>, <a
href="#sec-opf-dccontributor"><code>dc:contributor</code></a>, <a
href="#sec-opf-dcmes-optional-def"><code>dc:coverage</code></a>, <a
href="#sec-opf-dccreator"><code>dc:creator</code></a>, <a
href="#sec-opf-dcmes-optional-def"><code>dc:description</code></a>, <a
href="#sec-opf-dcmes-optional-def"><code>dc:publisher</code></a>, <a
href="#sec-opf-dcmes-optional-def"><code>dc:relation</code></a>, <a
href="#sec-opf-dcmes-optional-def"><code>dc:rights</code></a>, <a
href="#sec-opf-dcsubject"><code>dc:subject</code></a>, <a href="#sec-opf-dctitle"
><code>dc:title</code></a>, <a href="#sec-meta-elem"><code>meta</code></a> and
<a href="#sec-package-elem"><code>package</code></a>.</p>
</dd>
<dt id="attrdef-href"><code>href</code></dt>
<dd>
<p>An absolute or relative IRI reference [[!RFC3987]] to a resource.</p>
<div class="example">
<pre><link rel="record"
href="meta/9780000000001.xml"
media-type="application/marc"/></pre>
</div>
<p>Allowed on: <a href="#sec-item-elem"><code>item</code></a> and <a href="#sec-link-elem"
><code>link</code></a>.</p>
</dd>
<dt id="attrdef-id"><code>id</code></dt>
<dd>
<p>The ID [[!XML]] of the element, which MUST be unique within the document scope.</p>
<div class="example">
<pre><dc:identifier id="pub-id">urn:isbn:97800000000001</dc:identifier></pre>
</div>
<p>Allowed on: <a href="#sec-collection-elem"><code>collection</code></a>, <a
href="#sec-opf-dccontributor"><code>dc:contributor</code></a>, <a
href="#sec-opf-dcmes-optional-def"><code>dc:coverage</code></a>, <a
href="#sec-opf-dccreator"><code>dc:creator</code></a>, <a
href="#sec-opf-dcmes-optional-def"><code>dc:date</code></a>, <a
href="#sec-opf-dcmes-optional-def"><code>dc:description</code></a>, <a
href="#sec-opf-dcmes-optional-def"><code>dc:format</code></a>, <a
href="#sec-opf-dcidentifier"><code>dc:identifier</code></a>, <a
href="#sec-opf-dclanguage"><code>dc:language</code></a>, <a
href="#sec-opf-dcmes-optional-def"><code>dc:publisher</code></a>, <a
href="#sec-opf-dcmes-optional-def"><code>dc:relation</code></a>, <a
href="#sec-opf-dcmes-optional-def"><code>dc:rights</code></a>, <a
href="#sec-opf-dcmes-optional-def"><code>dc:source</code></a>, <a
href="#sec-opf-dcsubject"><code>dc:subject</code></a>, <a href="#sec-opf-dctitle"
><code>dc:title</code></a>, <a href="#sec-opf-dctype"><code>dc:type</code></a>,
<a href="#sec-item-elem"><code>item</code></a>, <a href="#sec-itemref-elem"
><code>itemref</code></a>, <a href="#sec-link-elem"><code>link</code></a>, <a
href="#sec-manifest-elem"><code>manifest</code></a>, <a href="#sec-meta-elem"
><code>meta</code></a>, <a href="#sec-package-elem"><code>package</code></a> and
<a href="#sec-spine-elem"><code>spine</code></a>.</p>
</dd>
<dt id="attrdef-media-type"><code>media-type</code></dt>
<dd>
<p>A media type [[!RFC2046]] that specifies the type and format of the referenced
resource.</p>
<div class="example">
<pre><link rel="record"
href="http://example.org/meta/12389347?format=xmp"
media-type="application/xml"
properties="xmp"/></pre>
</div>
<p>Allowed on: <a href="#sec-item-elem"><code>item</code></a> and <a href="#sec-link-elem"
><code>link</code></a>.</p>
</dd>
<dt id="attrdef-properties"><code>properties</code></dt>
<dd>
<p>A space-separated list of <a href="#sec-property-datatype">property</a> values.</p>
<p>Refer to each element's definition for the <a href="#sec-metadata-default-vocab">reserved
vocabulary</a> that can be used with the attribute.</p>
<div class="example">
<pre><item id="nav"
href="nav.xhtml"
properties="nav"
media-type="application/xhtml+xml"/></pre>
</div>
<p>Allowed on: <a href="#sec-item-elem"><code>item</code></a>, <a href="#sec-itemref-elem"
><code>itemref</code></a> and <a href="#sec-link-elem"
><code>link</code></a>.</p>
</dd>
<dt id="attrdef-refines"><code>refines</code></dt>
<dd>
<p>Identifies the expression or resource augmented by the element. The value of the
attribute must be a relative IRI [[!RFC3987]] referencing the resource or element being
described.</p>
<p>The <code>refines</code> attribute is OPTIONAL depending on the type of metadata being
expressed. When omitted, the element defines a <a href="#primary-expression">primary
expression</a>.</p>
<p>Allowed on: <a href="#sec-link-elem"><code>link</code></a> and <a href="#sec-meta-elem"
><code>meta</code></a>.</p>
</dd>
<dt id="attrdef-xml-lang"><code>xml:lang</code></dt>
<dd>
<p>Specifies the language used in the contents and attribute values of the carrying element
and its descendants, as defined in section <a
href="https://www.w3.org/TR/2008/REC-xml-20081126/#sec-lang-tag">2.12 Language
Identification</a> of [[!XML]].</p>
<div class="example">
<pre><package … xml:lang="ja">
…
</package></pre>
</div>
<p>Allowed on: <a href="#sec-collection-elem"><code>collection</code></a>, <a
href="#sec-opf-dccontributor"><code>dc:contributor</code></a>, <a
href="#sec-opf-dcmes-optional-def"><code>dc:coverage</code></a>, <a
href="#sec-opf-dccreator"><code>dc:creator</code></a>, <a
href="#sec-opf-dcmes-optional-def"><code>dc:description</code></a>, <a
href="#sec-opf-dcmes-optional-def"><code>dc:publisher</code></a>, <a
href="#sec-opf-dcmes-optional-def"><code>dc:relation</code></a>, <a
href="#sec-opf-dcmes-optional-def"><code>dc:rights</code></a>, <a
href="#sec-opf-dcsubject"><code>dc:subject</code></a>, <a href="#sec-opf-dctitle"
><code>dc:title</code></a>, <a href="#sec-meta-elem"><code>meta</code></a> and
<a href="#sec-package-elem"><code>package</code></a>.</p>
</dd>
</dl>
</section>
<section id="sec-pkg-metadata">
<h3>Metadata</h3>
<section id="sec-metadata-elem">
<h4>The <code>metadata</code> Element</h4>
<p>The <code>metadata</code> element encapsulates meta information for the given
<a>Rendition</a>.</p>
<dl id="elemdef-opf-metadata" class="elemdef">
<dt>Element Name</dt>
<dd>
<p><code>metadata</code></p>
</dd>
<dt>Usage</dt>
<dd>
<p>REQUIRED first child of <a href="#elemdef-opf-package"><code>package</code></a>.</p>
</dd>
<dt>Attributes</dt>
<dd>
<p>None</p>
</dd>
<dt>Content Model</dt>
<dd>
<p>In any order:</p>
<ul class="nomark">
<li>
<p>
<a class="codelink" href="#elemdef-opf-dcidentifier"
><code>dc:identifier</code></a>
<code>[1 or more]</code></p>
</li>
<li>
<p>
<a href="#elemdef-opf-dctitle"><code>dc:title</code></a>
<code>[1 or more]</code></p>
</li>
<li>
<p>
<a href="#elemdef-opf-dclanguage"><code>dc:language</code></a>
<code>[1 or more]</code></p>
</li>
<li>
<p>
<a href="#sec-opf-dcmes-optional"><code>DCMES Optional Elements</code></a>
<code>[0 or more]</code></p>
</li>
<li>
<p>
<a href="#elemdef-meta"><code>meta</code></a>
<code>[1 or more]</code></p>
</li>
<li>
<p>
<a href="#sec-opf2-meta">OPF2 <code>meta</code></a>
<code>[0 or more]</code>
<a href="epub-spec.html#legacy" class="legacy">(legacy)</a></p>
</li>
<li>
<p>
<a href="#elemdef-opf-link"><code>link</code></a>
<code>[0 or more]</code></p>
</li>
</ul>
</dd>
</dl>
<p>The Package Document <code>metadata</code> element has two primary functions:</p>
<ol type="1">
<li>
<p>to provide a minimal set of meta information for Reading Systems to use to internally
catalogue an <a>EPUB Publication</a> and make it available to a user (e.g., to
present in a bookshelf).</p>
</li>
<li>
<p>to provide access to all rendering metadata needed to control the layout and display
of the Rendition's content (e.g., <a href="#sec-package-metadata-fxl">fixed-layout
properties</a>).</p>
</li>
</ol>
<p>The Package Document is not designed to provide complex metadata encoding capabilities. If
more detailed information about an EPUB Publication is needed, metadata records (e.g., that
conform to an international standard such as [[!ONIX]] or are created for custom purposes)
can be associated using the <a href="#sec-link-elem"><code>link</code></a> element. This
approach allows the metadata to be processed in its native form, avoiding the potential
problems and information loss caused by translating to use the minimal Package Document
structure.</p>
<p id="core-metadata-reqs">In keeping with this philosophy, the Package Document only has the
following minimal metadata requirements: it MUST include the [[!DC11]] <a
href="#sec-opf-dcidentifier"><code>title</code></a>, <a href="#elemdef-opf-dcidentifier"
><code>identifier</code></a> and <a href="#elemdef-opf-dclanguage"
><code>language</code></a> elements together with the [[!DCTERMS]] <a
href="#last-modified-date"><code>modified</code></a> property. All other metadata is
OPTIONAL.</p>
<aside class="example">
<p>The following example shows the minimal set of metadata that Authors have to include in
the Package Document.</p>
<pre><package … unique-identifier="pub-id">
…
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:identifier id="pub-id">urn:uuid:A1B0D67E-2E81-4DF5-9E67-A64CBE366809</dc:identifier>
<dc:title>Norwegian Wood</dc:title>
<dc:language>en</dc:language>
<meta property="dcterms:modified">2011-01-01T12:00:00Z</meta>
</metadata>
…
</package>
</pre>
</aside>
<p>The <a href="#sec-meta-elem"><code>meta</code></a> element provides a generic mechanism for
including metadata properties from any vocabulary. It is typically used to include rendering
metadata defined in EPUB specifications, but MAY be used for any metadata purposes.</p>
<div class="note">
<p>See [[EPUBAccessibility]] for accessibility metadata recommendations.</p>
</div>
</section>
<section id="sec-opf-dcmes-required">
<h4>DCMES Required Elements</h4>
<section id="sec-opf-dcidentifier">
<h5>The <code>identifier</code> Element</h5>
<p>The [[!DC11]] <code>identifier</code> element contains an identifier associated with the
given <a>Rendition</a>, such as a <abbr title="Universally Unique Identifier"
>UUID</abbr>, <abbr title="Digital Object Identfier">DOI</abbr> or <abbr
title="International Standard Book Number">ISBN</abbr>.</p>
<dl id="elemdef-opf-dcidentifier" class="elemdef">
<dt>Element Name</dt>
<dd>
<p>
<code>dc:identifier</code></p>
</dd>
<dt>Namespace</dt>
<dd>
<p><code>http://purl.org/dc/elements/1.1/</code></p>
</dd>
<dt>Usage</dt>
<dd>
<p>REQUIRED child of <a class="codelink" href="#elemdef-opf-metadata"
><code>metadata</code></a>.</p>
</dd>
<dt>Attributes</dt>
<dd>
<ul class="nomark">
<li>
<p>
<a href="#attrdef-id"><code>id</code></a>
<code>[optional]</code></p>
</li>
</ul>
</dd>
<dt>Content Model</dt>
<dd>
<p>Text</p>
</dd>
</dl>
<p>The <code>metadata</code> section MUST include an <code>identifier</code> element that
contains an unambiguous identifier for the Rendition. This identifier MUST be marked as
the <a>Unique Identifier</a> via the <code>package</code> element <a
href="#attrdef-package-unique-identifier"><code>unique-identifier</code></a>
attribute.</p>
<aside class="example">
<p>The following example shows the unique <code>identifier</code> element for an EPUB
Publication.</p>
<pre><package … unique-identifier="pub-id">
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:identifier id="pub-id">
urn:uuid:A1B0D67E-2E81-4DF5-9E67-A64CBE366809
</dc:identifier>
…
</metadata>
</package></pre>
</aside>
<p>The Unique Identifier for each Rendition MAY differ, and a Rendition MAY include
additional identifier elements.</p>
<p>To differentiate different versions of the same EPUB Publication, this specification
makes a distinction between the <a>Unique Identifier</a> for an EPUB Publication and the
<a>Release Identifier</a> that uniquely identifies a specific version of it.</p>
<p>To identify a specific version of a packaged EPUB Publication, a Release Identifier can
be constructed by combining the Unique Identifier with the <a href="#last-modified-date"
>last modified date</a> of the Rendition. For more information on the semantics and
requirements of the Release Identifier, refer to <a
href="#sec-metadata-elem-identifiers-pid">Release Identifier</a>.</p>
<aside class="example">
<p>The following example shows the two components of the Release Identifier.</p>
<pre><metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:identifier id="pub-id">
urn:uuid:A1B0D67E-2E81-4DF5-9E67-A64CBE366809
</dc:identifier>
<meta property="dcterms:modified">2016-01-01T00:00:01Z</meta>
…
</metadata></pre>
</aside>
<p>Whenever a Rendition is modified, it MUST include a new last modified date.</p>
<p>To determine whether an <code>identifier</code> conforms to an established system or has
been granted by an issuing authority, Reading Systems SHOULD check for an
<a href="#identifier-type"><code>identifier-type</code> property</a>.</p>
<aside class="example">
<p>The following example shows how an identifier can be additionally marked as a <a
href="https://doi.org">DOI</a> using the identifier-type property. Here, <a
href="https://ns.editeur.org/onix/en/5">ONIX codelist 5</a> is used to describe
the product identifier type.</p>
<pre><metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:identifier id="pub-id">urn:doi:10.1016/j.iheduc.2008.03.001</dc:identifier>
<meta refines="#pub-id" property="identifier-type" scheme="onix:codelist5">06</meta>
…
</metadata></pre>
</aside>
<p>Reading Systems MUST trim all leading and trailing <a
href="https://www.w3.org/TR/xml/#white">white space</a> [[!XML]] from the element
value before processing the value.</p>
<p>This specification imposes no additional restrictions or the requirements of the
identifier except that it MUST be at least one character in length after white space has
been trimmed. It is strongly encouraged that the identifier be a fully qualified URI,
however.</p>
</section>
<section id="sec-opf-dctitle">
<h5>The <code>title</code> Element</h5>
<p>The [[!DC11]] <code>title</code> element represents an instance of a name given to the
<a>EPUB Publication</a>.</p>
<dl id="elemdef-opf-dctitle" class="elemdef">
<dt>Element Name</dt>
<dd>
<p>
<code>dc:title</code></p>
</dd>
<dt>Namespace</dt>
<dd>
<p><code>http://purl.org/dc/elements/1.1/</code></p>
</dd>
<dt>Usage</dt>
<dd>
<p>REQUIRED child of <a class="codelink" href="#elemdef-opf-metadata"
><code>metadata</code></a>.</p>
</dd>
<dt>Attributes</dt>
<dd>
<ul class="nomark">
<li>
<p>
<a href="#attrdef-dir"><code>dir</code></a>
<code>[optional]</code></p>
</li>
<li>
<p>
<a href="#attrdef-id"><code>id</code></a>
<code>[optional]</code></p>
</li>
<li>
<p>
<a href="#attrdef-xml-lang"><code>xml:lang</code></a>
<code>[optional]</code></p>
</li>
</ul>
</dd>
<dt>Content Model</dt>
<dd>
<p>Text</p>
</dd>
</dl>
<p>The <code>metadata</code> section MUST include at least one <code>title</code> element
containing the title for the EPUB Publication.</p>
<aside class="example">
<p>The following example shows a basic title element.</p>
<pre><metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:title>Norwegian Wood</dc:title>
…
</metadata>
</pre>
</aside>
<p id="title-order"><a>Reading Systems</a> MUST recognize the first <code>title</code>
element in document order as the main title of the EPUB Publication (i.e., the primary
one to present to users). This specification does not define how to process additional
<code>title</code> elements.</p>
<aside class="example">
<p>The following example shows a multi-part title:</p>
<pre><metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:title>THE LORD OF THE RINGS</dc:title>
<dc:title>Part One: The Fellowship of the Ring</dc:title>
…
</metadata>
</pre>
<p>The same title could be expressed using a single <code>dc:title</code> element as
follows:</p>
<pre><metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:title>
THE LORD OF THE RINGS, Part One: The Fellowship of the Ring
</dc:title>
…
</metadata>
</pre>
</aside>
<p>The title for each <a>Rendition</a> MAY differ.</p>
<p>Reading Systems MUST trim all leading and trailing <a
href="https://www.w3.org/TR/xml/#white">white space</a> [[!XML]] before processing
the value.</p>
<p>This specification imposes no additional restrictions or requirements on the title except
that it MUST be at least one character in length after white space has been trimmed.</p>
</section>
<section id="sec-opf-dclanguage">
<h5>The <code>language</code> Element</h5>
<p>The [[!DC11]] <code>language</code> element specifies the language of the content of the
given <a>Rendition</a>. This value is not inherited by the individual resources of the
Rendition.</p>
<dl id="elemdef-opf-dclanguage" class="elemdef">
<dt>Element Name</dt>
<dd>
<p>
<code>dc:language</code></p>
</dd>
<dt>Namespace</dt>
<dd>
<p><code>http://purl.org/dc/elements/1.1/</code></p>
</dd>
<dt>Usage</dt>
<dd>
<p>REQUIRED child of <a class="codelink" href="#elemdef-opf-metadata"
><code>metadata</code></a>. Repeatable.</p>
</dd>
<dt>Attributes</dt>
<dd>
<p>
<a href="#attrdef-id"><code>id</code></a>
<code>[optional]</code></p>
</dd>
<dt>Content Model</dt>
<dd>
<p>Text</p>
</dd>
</dl>
<p>The <code>metadata</code> section MUST include at least one <code>language</code> element
with a value conforming to [[!BCP47]].</p>
<aside class="example">
<p>The following example shows an <a>EPUB Publication</a> is in U.S. English.</p>
<pre><metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
…
<dc:language>en-US</dc:language>
…
</metadata>
</pre>
</aside>
<p>Additional <code>language</code> elements MAY be included for multilingual Publications,
but each element's value MUST conform to [[!BCP47]]. The first <code>language</code>
element in document order is considered the primary language of the rendition.</p>
<p>Languages for each <a>Rendition</a> MAY differ.</p>
<p>Reading Systems MUST trim all leading and trailing <a
href="https://www.w3.org/TR/xml/#white">white space</a> [[!XML]] before processing
the value.</p>
</section>
</section>
<section id="sec-opf-dcmes-optional">
<h4>DCMES Optional Elements</h4>
<section id="sec-opf-dcmes-optional-def">
<h5>General Definition</h5>
<p>With the exception of <a href="#sec-opf-dcidentifier"><code>identifier</code></a>, <a
href="#sec-opf-dclanguage"><code>language</code></a> and <a href="#sec-opf-dctitle"
><code>title</code></a>, all other [[!DC11]] elements are designated as
OPTIONAL. These elements conform to the following generalized definition:</p>
<dl class="elemdef">
<dt>Element Name</dt>
<dd>
<p>
<code>contributor</code> | <code>coverage</code> | <code>creator</code> |
<code>date</code> | <code>description</code> | <code>format</code> |
<code>publisher</code> | <code>relation</code> | <code>rights</code> |
<code>source</code> | <code>subject</code> | <code>type</code></p>
</dd>
<dt>Namespace</dt>
<dd>
<p><code>http://purl.org/dc/elements/1.1/</code></p>
</dd>
<dt>Usage</dt>
<dd>
<p>OPTIONAL child of <a class="codelink" href="#elemdef-opf-metadata"
><code>metadata</code></a>. Repeatable.</p>
</dd>
<dt>Attributes</dt>
<dd>
<ul class="nomark">
<li>
<p><a href="#attrdef-dir"><code>dir</code></a>
<code>[optional]</code> – only allowed on <code>contributor</code>,
<code>coverage</code>, <code>creator</code>,
<code>description</code>, <code>publisher</code>,
<code>relation</code>, <code>rights</code> and
<code>subject</code>.</p>
</li>
<li>
<p><a href="#attrdef-id"><code>id</code></a>
<code>[optional]</code> – allowed on any element.</p>
</li>