-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathlpf.html
1169 lines (1005 loc) · 47.4 KB
/
lpf.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" xml:lang="zh-hant" data-lt-installed="true" lang="zh-hant"><head><meta charset="utf-8"><meta name="generator" content="ReSpec 25.4.1"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><style>/* --- EXAMPLES --- */
span.example-title {
text-transform: none;
}
aside.example, div.example, div.illegal-example {
padding: 0.5em;
margin: 1em 0;
position: relative;
clear: both;
}
div.illegal-example { color: red }
div.illegal-example p { color: black }
aside.example, div.example {
padding: .5em;
border-left-width: .5em;
border-left-style: solid;
border-color: #e0cb52;
background: #fcfaee;
}
aside.example div.example {
border-left-width: .1em;
border-color: #999;
background: #fff;
}
aside.example div.example span.example-title {
color: #999;
}
em.rfc2119 {
font-style: normal;
font-weight: bold;
}
</style><style>/* --- ISSUES/NOTES --- */
.issue-label {
text-transform: initial;
}
.warning > p:first-child { margin-top: 0 }
.warning {
padding: .5em;
border-left-width: .5em;
border-left-style: solid;
}
span.warning { padding: .1em .5em .15em; }
.issue.closed span.issue-number {
text-decoration: line-through;
}
.warning {
border-color: #f11;
border-width: .2em;
border-style: solid;
background: #fbe9e9;
}
.warning-title:before{
content: "⚠"; /*U+26A0 WARNING SIGN*/
font-size: 1.3em;
float: left;
padding-right: .3em;
margin-top: -0.3em;
}
li.task-list-item {
list-style: none;
}
input.task-list-item-checkbox {
margin: 0 0.35em 0.25em -1.6em;
vertical-align: middle;
}
.issue a.respec-gh-label {
padding: 5px;
margin: 0 2px 0 2px;
font-size: 10px;
text-transform: none;
text-decoration: none;
font-weight: bold;
border-radius: 4px;
position: relative;
bottom: 2px;
border: none;
display: inline-block;
}
</style><style>/* dfn popup panel that list all local references to a dfn */
dfn {
cursor: pointer;
}
.dfn-panel {
position: absolute;
left: var(--left); /* set via JS */
top: var(--top); /* set via JS */
z-index: 35;
height: auto;
width: max-content;
max-width: 300px;
max-height: 500px;
overflow: auto;
padding: 0.5em 0.75em;
font: small Helvetica Neue, sans-serif, Droid Sans Fallback;
background: #dddddd;
color: black;
border: outset 0.2em;
}
.dfn-panel * {
margin: 0;
}
.dfn-panel > b {
display: block;
}
.dfn-panel ul a [href] {
color: black;
}
.dfn-panel a:not(:hover) {
text-decoration: none !important;
border-bottom: none !important;
}
.dfn-panel a [href] :hover {
border-bottom-width: 1px;
}
.dfn-panel > b + b {
margin-top: 0.25em;
}
.dfn-panel ul {
padding: 0;
}
.dfn-panel li {
list-style: inside;
}
.dfn-panel.docked {
display: inline-block;
position: fixed;
left: 0.5em;
top: unset;
bottom: 2em;
margin: 0 auto;
/* 0.75em from padding (x2), 0.5em from left position, 0.2em border (x2) */
max-width: calc(100vw - 0.75em * 2 - 0.5em - 0.2em * 2);
max-height: 30vh;
}
</style>
<title>輕量封裝格式(Lightweight Packaging Format, LPF)</title>
<link href="https://www.w3.org/TR/2020/NOTE-lpf-20200319/common/css/common.css" rel="stylesheet" type="text/css">
<style id="respec-mainstyle">/*****************************************************************
* ReSpec specific CSS
*****************************************************************/
@keyframes pop {
0% {
transform: scale(1, 1);
}
25% {
transform: scale(1.25, 1.25);
opacity: 0.75;
}
100% {
transform: scale(1, 1);
}
}
/* Override code highlighter background */
.hljs {
background: transparent !important;
}
/* --- INLINES --- */
h1 abbr,
h2 abbr,
h3 abbr,
h4 abbr,
h5 abbr,
h6 abbr,
a abbr {
border: none;
}
dfn {
font-weight: bold;
}
a.internalDFN {
color: inherit;
border-bottom: 1px solid #99c;
text-decoration: none;
}
a.externalDFN {
color: inherit;
border-bottom: 1px dotted #ccc;
text-decoration: none;
}
a.bibref {
text-decoration: none;
}
.respec-offending-element:target {
animation: pop 0.25s ease-in-out 0s 1;
}
.respec-offending-element,
a [href] .respec-offending-element {
text-decoration: red wavy underline;
}
@supports not (text-decoration: red wavy underline) {
.respec-offending-element:not(pre) {
display: inline-block;
}
.respec-offending-element {
/* Red squiggly line */
background: url(data:image/gif;base64,R0lGODdhBAADAPEAANv///8AAP///wAAACwAAAAABAADAEACBZQjmIAFADs=)
bottom repeat-x;
}
}
#references :target {
background: #eaf3ff;
animation: pop 0.4s ease-in-out 0s 1;
}
cite .bibref {
font-style: normal;
}
code {
color: #c63501;
}
th code {
color: inherit;
}
a [href] .orcid {
padding-left: 4px;
padding-right: 4px;
}
a [href] .orcid > svg {
margin-bottom: -2px;
}
/* --- TOC --- */
.toc a,
.tof a {
text-decoration: none;
}
a .secno,
a .figno {
color: #000;
}
ul.tof,
ol.tof {
list-style: none outside none;
}
.caption {
margin-top: 0.5em;
font-style: italic;
}
/* --- TABLE --- */
table.simple {
border-spacing: 0;
border-collapse: collapse;
border-bottom: 3px solid #005a9c;
}
.simple th {
background: #005a9c;
color: #fff;
padding: 3px 5px;
text-align: left;
}
.simple th a {
color: #fff;
padding: 3px 5px;
text-align: left;
}
.simple th [scope="row"] {
background: inherit;
color: inherit;
border-top: 1px solid #ddd;
}
.simple td {
padding: 3px 10px;
border-top: 1px solid #ddd;
}
.simple tr:nth-child(even) {
background: #f0f6ff;
}
/* --- DL --- */
.section dd > p:first-child {
margin-top: 0;
}
.section dd > p:last-child {
margin-bottom: 0;
}
.section dd {
margin-bottom: 1em;
}
.section dl.attrs dd,
.section dl.eldef dd {
margin-bottom: 0;
}
#issue-summary > ul,
.respec-dfn-list {
column-count: 2;
}
#issue-summary li,
.respec-dfn-list li {
list-style: none;
}
details.respec-tests-details {
margin-left: 1em;
display: inline-block;
vertical-align: top;
}
details.respec-tests-details > * {
padding-right: 2em;
}
details.respec-tests-details [open] {
z-index: 999999;
position: absolute;
border: thin solid #cad3e2;
border-radius: 0.3em;
background-color: white;
padding-bottom: 0.5em;
}
details.respec-tests-details [open] > summary {
border-bottom: thin solid #cad3e2;
padding-left: 1em;
margin-bottom: 1em;
line-height: 2em;
}
details.respec-tests-details > ul {
width: 100%;
margin-top: -0.3em;
}
details.respec-tests-details > li {
padding-left: 1em;
}
a [href] .self-link:hover {
opacity: 1;
text-decoration: none;
background-color: transparent;
}
h2,
h3,
h4,
h5,
h6 {
position: relative;
}
aside.example .marker > a.self-link {
color: inherit;
}
h2 > a.self-link,
h3 > a.self-link,
h4 > a.self-link,
h5 > a.self-link,
h6 > a.self-link {
border: none;
color: inherit;
font-size: 83%;
height: 2em;
left: -1.6em;
opacity: 0.5;
position: absolute;
text-align: center;
text-decoration: none;
top: 0;
transition: opacity 0.2s;
width: 2em;
}
h2 > a.self-link::before,
h3 > a.self-link::before,
h4 > a.self-link::before,
h5 > a.self-link::before,
h6 > a.self-link::before {
content: "§";
display: block;
}
@media (max-width: 767px) {
dd {
margin-left: 0;
}
/* Don't position self-link in headings off-screen */
h2 > a.self-link,
h3 > a.self-link,
h4 > a.self-link,
h5 > a.self-link,
h6 > a.self-link {
left: auto;
top: auto;
}
}
@media print {
.removeOnSave {
display: none;
}
}
</style><meta name="description" content="This section is non-normative."><link rel="canonical" href="https://www.w3.org/TR/lpf/"><style>/*
Adapted from Atom One Light by Daniel Gamage for ReSpec, with better color contrast
Original One Light Syntax theme from https://github.com/atom/one-light-syntax
base: #fafafa
mono-1: #383a42
mono-2: #686b77
mono-3: #a0a1a7
hue-1: #0184bb
hue-2: #4078f2
hue-3: #a626a4
hue-4: #50a14f
hue-5: #e45649
hue-5-2: #c91243
hue-6: #986801
hue-6-2: #c18401
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
color: #383a42;
background: #fafafa;
}
.hljs-comment,
.hljs-quote {
color: #717277;
font-style: italic;
}
.hljs-doctag,
.hljs-keyword,
.hljs-formula {
color: #a626a4;
}
.hljs-section,
.hljs-name,
.hljs-selector-tag,
.hljs-deletion,
.hljs-subst {
color: #ca4706;
font-weight: bold;
}
.hljs-literal {
color: #0b76c5;
}
.hljs-string,
.hljs-regexp,
.hljs-addition,
.hljs-attribute,
.hljs-meta-string {
color: #42803C;
}
.hljs-built_in,
.hljs-class .hljs-title {
color: #9a6a01;
}
.hljs-attr,
.hljs-variable,
.hljs-template-variable,
.hljs-type,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-number {
color: #986801;
}
.hljs-symbol,
.hljs-bullet,
.hljs-link,
.hljs-meta,
.hljs-selector-id,
.hljs-title {
color: #336ae3;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
.hljs-link {
text-decoration: underline;
}
</style><style>var {
position: relative;
cursor: pointer;
}
var [data-type] ::before,
var [data-type] ::after {
position: absolute;
left: 50%;
top: -6px;
opacity: 0;
transition: opacity 0.4s;
pointer-events: none;
}
/* the triangle or arrow or caret or whatever */
var [data-type] ::before {
content: "";
transform: translateX(-50%);
border-width: 4px 6px 0 6px;
border-style: solid;
border-color: transparent;
border-top-color: #000;
}
/* actual text */
var [data-type] ::after {
content: attr(data-type);
transform: translateX(-50%) translateY(-100%);
background: #000;
text-align: center;
/* additional styling */
font-family: "Dank Mono", "Fira Code", monospace;
font-style: normal;
padding: 6px;
border-radius: 3px;
color: #daca88;
text-indent: 0;
font-weight: normal;
}
var [data-type] :hover::after,
var [data-type] :hover::before {
opacity: 1;
}
</style><link rel="publication" href="#wp_manifest"><script type="application/ld+json" id="wp_manifest">{
"@context": [
"https://schema.org",
"https://www.w3.org/ns/wp-context"
] ,
"type": "TechArticle",
"accessMode": [
"textual",
"diagramOnVisual"
] ,
"accessModeSufficient": [
"textual"
] ,
"resources": [
{
"type": "LinkedResource",
"url": "https://www.w3.org/StyleSheets/TR/2016/logos/W3C",
"encodingFormat": "image/svg+xml",
"description": "W3C Logo"
},
{
"type": "LinkedResource",
"url": "https://www.w3.org/StyleSheets/TR/2016/base.css",
"rel": "stylesheet",
"encodingFormat": "text/css",
"description": "Generic CSS file for W3C TR documents"
},
{
"type": "LinkedResource",
"url": "https://www.w3.org/StyleSheets/TR/2016/W3C-WG-NOTE",
"rel": "stylesheet",
"encodingFormat": "text/css",
"description": "CSS file depending on the status of the document"
},
{
"type": "LinkedResource",
"url": "https://www.w3.org/StyleSheets/TR/2016/logos/WG-Note",
"encodingFormat": "image/svg+xml",
"description": "Sidebar logo reflecting the status of the document"
}
] ,
"links": [
{
"type": "LinkedResource",
"url": "https://www.w3.org/Consortium/Legal/privacy-statement-20140324",
"encodingFormat": "text/html",
"rel": "privacy-policy"
},
{
"type": "LinkedResource",
"url": "https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document",
"encodingFormat": "text/html",
"rel": "license describedby"
},
{
"type": "LinkedResource",
"url": "http://www.w3.org/Consortium/Legal/ipr-notice#Copyright",
"encodingFormat": "text/html",
"rel": "copyright"
}
] ,
"id": "https://www.w3.org/TR/lpf/",
"url": "https://www.w3.org/TR/2020/NOTE-lpf-20200319/",
"datePublished": "2020-03-19",
"editor": [
{
"type": "Person",
"name": "Laurent Le Meur",
"affiliation": {
"type": "Organization",
"name": "EDRLab",
"url": "https://www.edrlab.org"
}
}
]
}</script><script id="initialUserConfig" type="application/json">{
"postProcess": [
null,
null
] ,
"wg": "Publishing Working Group",
"wgURI": "https://www.w3.org/publishing/groups/publ-wg/",
"wgPublicList": "public-publ-wg",
"edDraftURI": "https://w3c.github.io/lpf/",
"specStatus": "WG-NOTE",
"noRecTrack": true,
"shortName": "lpf",
"copyrightStart": "2018",
"editors": [
{
"name": "Laurent Le Meur",
"company": "EDRLab",
"companyURL": "https://www.edrlab.org",
"w3cid": 91888
}
] ,
"formerEditors": [] ,
"processVersion": 2018,
"includePermalinks": true,
"permalinkEdge": true,
"permalinkHide": false,
"diffTool": "http://www.aptest.com/standards/htmldiff/htmldiff.pl",
"github": {
"repoURL": "https://github.com/w3c/lpf",
"branch": "master"
},
"localBiblio": {
"ISO21320": {
"date": "2015",
"href": "https://www.iso.org/standard/60101.html",
"publisher": "ISO",
"status": "International Standard",
"title": "Document Container File - ISO/IEC 21320",
"isoNumber": "ISO/IEC 21320-1:2015",
"id": "iso21320"
}
},
"publishDate": "2020-03-19",
"publishISODate": "2020-03-19T00:00:00.000Z",
"generatedSubtitle": "Working Group Note 19 March 2020"
}</script><link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2016/W3C-WG-NOTE.css"></head>
<body class="h-entry">
<div class="note" role="note" id="translation-disclaimer">
<div role="heading" class="note-title marker">
<span>注意</span>
</div>
<p class="">
本文件為<abbr title="World Wide Web Consortium">W3C</abbr>於2020年03月19日發布之<a href="https://www.w3.org/TR/2020/NOTE-lpf-20200319/">Lightweight Packaging Format (LPF)</a>的翻譯版本。此翻譯版本係由<a href="http://www.dpublishing.org.tw/">台灣數位出版聯盟(Taiwan Digital Publishing Forum, TDPF)</a>自願翻譯,譯者盡可能維持英文原文本意與翻譯品質,唯翻譯內容仍可能有所錯誤。如有發現錯誤或不妥之處,請透過<a href="https://github.com/dpublishing/audiobooks-specs-tc">GitHub</a>與譯者聯繫、修正或建立issue。
</p>
<p class="">
本翻譯文件僅供參考,唯一的正式版本請以<abbr title="World Wide Web Consortium">W3C</abbr>網站發布之<a href="https://www.w3.org/TR/2020/NOTE-lpf-20200319/">英文原文版</a>為準。
</p>
<p class="">
翻譯版本最後更新日期:2022年01月23日
</p>
</div>
<div class="head">
<a class="logo" href="https://www.w3.org/"><img alt="W3C" src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" width="72" height="48"></a> <h1 id="title" class="title">輕量封裝格式<br>(Lightweight Packaging Format, LPF)</h1>
<h2>
W3C工作小組備忘 <time class="dt-published" datetime="2020-03-19">2020年03月19日</time>
</h2>
<dl>
<dt>此版本:</dt><dd>
<a class="u-url" href="https://www.w3.org/TR/2020/NOTE-lpf-20200319/">https://www.w3.org/TR/2020/NOTE-lpf-20200319/</a>
</dd><dt>最新發佈版本:</dt><dd>
<a href="https://www.w3.org/TR/lpf/">https://www.w3.org/TR/lpf/</a>
</dd>
<dt>前一版本:</dt>
<dd><a href="https://www.w3.org/TR/2019/NOTE-lpf-20191205/">https://www.w3.org/TR/2019/NOTE-lpf-20191205/</a></dd>
<dt>最新編輯草稿:</dt><dd><a href="https://w3c.github.io/lpf/">https://w3c.github.io/lpf/</a></dd>
<dt>編輯者:</dt>
<dd class="p-author h-card vcard" data-editor-id="91888"><span class="p-name fn">Laurent Le Meur</span>
(<a class="p-org org h-org h-card" href="https://www.edrlab.org">EDRLab</a>)
</dd>
<dt>參與協助:</dt><dd>
<a href="https://github.com/w3c/lpf/">GitHub w3c/lpf</a>
</dd><dd>
<a href="https://github.com/w3c/lpf/issues/">提出問題</a>
</dd><dd>
<a href="https://github.com/w3c/lpf/commits/master">版本紀錄</a>
</dd><dd>
<a href="https://github.com/w3c/lpf/pulls/">修改要求</a>
</dd>
</dl>
<p class="copyright">
<a href="https://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a>
©
2018-2020
<a href="https://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="https://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>,
<a href="https://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="https://www.keio.ac.jp/">Keio</a>,
<a href="https://ev.buaa.edu.cn/">Beihang</a>).
W3C <a href="https://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
<a href="https://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a rel="license" href="https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document">permissive document license</a> rules
apply.
</p>
<hr title="Separator for header">
</div>
<section class="informative introductory" id="abstract"><h2>概要</h2><p><em>本節不具規範性。</em></p>
<p>本規格定義了一個檔案格式,以及將構成一份<a href="#dfn-publication" class="internalDFN" data-link-type="dfn">數位出版品</a>之組成資源與相關詮釋資料集封裝成單一檔案容器的處理模型。</p>
</section>
<section class="informative introductory" id="sotd"><h2>本文件狀態</h2><p><em>
本節解釋了本文件在其發布時的狀態。其他文件可能取代本文件。<abbr title="World Wide Web Consortium">W3C</abbr>的當前出版品清單以及本技術報告的最新版本可於位在https://www.w3.org/TR/之<a href="https://www.w3.org/TR/"><abbr title="World Wide Web Consortium">W3C</abbr>技術報告索引</a>中獲得。</em></p>
<p>本文件由<a href="https://www.w3.org/publishing/groups/publ-wg/">出版工作小組</a>以工作小組備忘形式發布。</p>
<p>推薦使用<a href="https://github.com/w3c/lpf/issues/">GitHub Issues</a>對本規格進行討論。此外,你也可以將意見寄送到我們的郵寄列表。請寄送到<a href="mailto:[email protected]">[email protected]</a>(<a href="https://lists.w3.org/Archives/Public/public-publ-wg/">郵件封存紀錄</a>)。</p>
<p>作為工作小組備忘的出版品並不意味著受到<abbr title="World Wide Web Consortium">W3C</abbr>會員所背書。這是一份草稿文件並且可能隨時受其他文件更新、取代或者淘汰。將本文件作為進行中工作以外的文件來引用是不合適的。</p>
<p data-deliverer="100074">本文件是由在<a href="https://www.w3.org/Consortium/Patent-Policy/"><abbr title="World Wide Web Consortium">W3C</abbr>專利政策</a>下運作的小組所製作。</p>
<p>此小組不預期本文件會成為<abbr title="World Wide Web Consortium">W3C</abbr>推薦規格。</p>
<p>本文件受<a id="w3c_process_revision" href="https://www.w3.org/2019/Process-20190301/">2019年3月1日<abbr title="World Wide Web Consortium">W3C</abbr>流程文件</a>所規範。</p>
</section>
<nav id="toc" role="doc-toc"><h2 class="introductory" id="table-of-contents">目錄</h2><ol class="toc">
<li class="tocline"><a class="tocxref" href="#sec-introduction"><bdi class="secno">1. </bdi>導論</a></li>
<li class="tocline"><a class="tocxref" href="#sec-terminology"><bdi class="secno">2. </bdi>術語</a></li>
<li class="tocline"><a class="tocxref" href="#conformance"><bdi class="secno">3. </bdi>一致性</a></li>
<li class="tocline"><a class="tocxref" href="#sec-zip"><bdi class="secno">4. </bdi>封裝格式</a></li>
<li class="tocline"><a class="tocxref" href="#sec-compression"><bdi class="secno">5. </bdi>資源壓縮</a></li>
<li class="tocline"><a class="tocxref" href="#sec-structure"><bdi class="secno">6. </bdi>檔案與目錄結構</a></li>
<li class="tocline"><a class="tocxref" href="#sec-obtaining-manifest"><bdi class="secno">7. </bdi>取得出版品宣告</a></li>
<li class="tocline"><a class="tocxref" href="#app-media-type"><bdi class="secno">A. </bdi><code>application/lpf+zip</code>媒體類別</a></li>
<li class="tocline"><a class="tocxref" href="#ack"><bdi class="secno">B. </bdi>致謝</a></li>
<li class="tocline"><a class="tocxref" href="#references"><bdi class="secno">C. </bdi>參考資料</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#normative-references"><bdi class="secno">C.1 </bdi>規範性文件</a></li>
<li class="tocline"><a class="tocxref" href="#informative-references"><bdi class="secno">C.2 </bdi>參考性文件</a></li></ol></li></ol></nav>
<section class="informative" id="sec-introduction">
<h2 id="x1-introduction"><bdi class="secno">1. </bdi>導論<a class="self-link" aria-label="§" href="#sec-introduction"></a></h2><p><em>本節不具規範性。</em></p>
<p>一份數位出版品封裝檔是用於:</p>
<ul>
<li>
<p>在不同個人及(或)不同組織間交換製作中的封裝出版品。</p>
</li>
<li>
<p>出版社或者轉換業者提供已完成的封裝出版品給不同的分發商或者銷售管道。</p>
</li>
<li>
<p>提供封裝出版品給使用者(user)或者使用者代理程式(user agent)。</p>
</li>
</ul>
<p>本規格是基於已受驗證的技術且允許數位出版品能被以簡單的方式進行封裝,因此其名稱使用了「輕量」的術語。</p>
</section>
<section class="informative" id="sec-terminology">
<h2 id="x2-terminology"><bdi class="secno">2. </bdi>術語<a class="self-link" aria-label="§" href="#sec-terminology"></a></h2><p><em>本節不具規範性。</em></p>
<p>本文件使用了定義於<abbr title="World Wide Web Consortium">W3C</abbr>備忘「Web上的出版與連結」 [<cite><a class="bibref" data-link-type="biblio" href="#bib-publishing-linking" title="Publishing and Linking on the Web">publishing-linking</a></cite>] 中的術語,特別是包含了<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>。</p>
<p>此外,以下術語定義供本規格所使用:</p>
<dl class="termlist">
<dt><dfn id="dfn-codec" data-dfn-type="dfn">編碼內容類型(Codec content types)</dfn></dt>
<dd>
<p>本質為二進位格式性質的內容類型,例如為了壓縮最佳化所設計或者提供最佳化串流能力的影片及聲音等媒體類型。</p>
</dd>
<dt><dfn id="dfn-non-codec" data-dfn-type="dfn">非編碼內容類型(Non-Codec content types)</dfn></dt>
<dd>
<p>因其內在資料結構特性而利於壓縮的內容類型,例如基於字元與字串之檔案格式(如HTML、CSS…等)。</p>
</dd>
<dt><dfn id="dfn-package" data-lt="Packages|Package" data-dfn-type="dfn">封裝檔(Package)</dfn></dt>
<dd>
<p>由構成數位出版品的一組組成資源與相關詮釋資料集所形成的單一檔案容器。</p>
</dd>
<dt><dfn id="dfn-primary-entry-page" data-dfn-type="dfn">主要進入頁面(Primary Entry Page)</dfn></dt>
<dd>
<p>數位出版品的首選起始資源,在某些案例中可用於發現其出版品宣告。</p>
</dd>
<dt><dfn id="dfn-publication" data-lt="Digital Publications|Digital Publication" data-dfn-type="dfn">數位出版品(Digital Publication)</dfn></dt>
<dd>
<p>由一組組成資源與相關詮釋資料所組織在一起而型成的一個具獨特性的可識別群組。</p>
</dd>
<dt><dfn id="dfn-web-publication-manifest" data-lt="Publication Manifests|Publication Manifest" data-dfn-type="dfn" data-plurals="publication manifests">出版品宣告(Publication Manifest)</dfn></dt>
<dd>
<p>採用 [<cite><a class="bibref" data-link-type="biblio" href="#bib-pub-manifest" title="Publication Manifest">pub-manifest</a></cite>] 中對數位出版品的定義並以 [<cite><a class="bibref" data-link-type="biblio" href="#bib-json-ld" title="JSON-LD 1.0">JSON-LD</a></cite>] 形式呈現描述的數位出版品資源清單宣告。</p>
</dd>
<dt><dfn id="dfn-root-directory" data-lt="Root Directories|Root Directory" data-dfn-type="dfn">根目錄(Root Directory)</dfn></dt>
<dd>
<p>封裝檔案系統的基底目錄。</p>
</dd>
</dl>
<p>每個術語僅在第一次於章節出現中時才會連結到其定義。</p>
</section>
<section class="informative" id="conformance"><h2 id="x3-conformance"><bdi class="secno">3. </bdi>一致性<a class="self-link" aria-label="§" href="#conformance"></a></h2><p><em>本節不具規範性。</em></p><p>除了標註為不具規範性的章節外,本規格中所有製作指引、圖表、範例與注意事項亦不具規範性。其餘本規格中的內容則均為具規範性。</p>
<p>本文件中出現之關鍵字<em class="rfc2119">可以(MAY)</em>、<em class="rfc2119">必需(MUST)</em>、<em class="rfc2119">應該(SHOULD)</em>之解釋以<a href="https://tools.ietf.org/html/bcp14">BCP 14</a> [<cite><a class="bibref" data-link-type="biblio" href="#bib-rfc2119" title="Key words for use in RFCs to Indicate Requirement Levels">RFC2119</a></cite>] [<cite><a class="bibref" data-link-type="biblio" href="#bib-rfc8174" title="Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words">RFC8174</a></cite>] 所描述為準,同時也僅在出現時以全大寫(中文為粗體)顯示。</p>
</section>
<section class="informative" id="sec-zip">
<h2 id="x4-packaging-format"><bdi class="secno">4. </bdi>封裝格式<a class="self-link" aria-label="§" href="#sec-zip"></a></h2><p><em>本節不具規範性。</em></p>
<p>為了將構成數位出版品的組成資源與相關詮釋資料集封裝起來,本規格採用定義在ISO/IEC 21320-1:2015 ( [<cite><a class="bibref" data-link-type="biblio" href="#bib-iso21320" title="Document Container File - ISO/IEC 21320">ISO21320</a></cite>] 與 [<cite><a class="bibref" data-link-type="biblio" href="#bib-zip" title=".ZIP File Format Specification">zip</a></cite>] )中之ZIP格式。</p>
</section>
<section class="informative" id="sec-compression">
<h2 id="x5-compression-of-resources"><bdi class="secno">5. </bdi>資源壓縮<a class="self-link" aria-label="§" href="#sec-compression"></a></h2><p><em>本節不具規範性。</em></p>
<p>當資源儲存於封裝檔中時,<a href="#dfn-non-codec" class="internalDFN" data-link-type="dfn">非編碼內容類型</a>的資源<em class="rfc2119" title="SHOULD">應該</em>被壓縮且<em class="rfc2119" title="MUST">必需</em>使用Deflate壓縮演算法。這項實踐確保檔案實體能在封裝檔中以較小的尺寸存放。</p>
<p><a href="#dfn-codec" class="internalDFN" data-link-type="dfn">編碼內容類型資源</a><em class="rfc2119" title="SHOULD">應該</em>以無壓縮的方式儲存。因為在這情況下,壓縮會在產製過程中產生不必要的處理成本(尤其是大型資源檔案)並且可能會影響使用聲音/影片時的播放效能。</p>
<div class="note" role="note" id="issue-container-generatedID"><div role="heading" class="note-title marker" id="h-note" aria-level="3"><span>注意事項</span></div><div class="">
<p>在一些情況下,壓縮與某些加密方案結合使用時可能會阻礙使用者代理的「處理部分內容請求」能力(例如,HTTP位元範圍),這是因為在技術上難以在媒體播放前就確認整個資源的長度(例如,HTTP Content-Length標頭)。</p>
</div></div>
</section>
<section class="informative" id="sec-structure">
<h2 id="x6-file-and-directory-structure"><bdi class="secno">6. </bdi>檔案與目錄結構<a class="self-link" aria-label="§" href="#sec-structure"></a></h2><p><em>本節不具規範性。</em></p>
<p><a href="#dfn-package" class="internalDFN" data-link-type="dfn">封裝檔</a><em class="rfc2119" title="MUST">必需</em>在其<a href="#dfn-root-directory" class="internalDFN" data-link-type="dfn">根目錄</a>中包含至少一個以下檔案:</p>
<ul>
<li>名為<code>publication.json</code>的檔案,其內容<em class="rfc2119" title="MUST">必需</em>為<a href="#dfn-web-publication-manifest" class="internalDFN" data-link-type="dfn">出版品宣告</a>所定義的格式。</li>
<li>名為<code>index.html</code>的檔案,其<em class="rfc2119" title="MUST">必需</em>符合數位出版品對<a href="#dfn-primary-entry-page" class="internalDFN" data-link-type="dfn">主要進入頁面</a>的需求。</li>
</ul>
<p>根目錄本質上為虛擬的:使用者代理進行封裝檔的解封裝時,產生或不產生存放內容的實體根目錄均可。</p>
<p>這兩個檔案的內容<em class="rfc2119" title="MUST">必需</em>不被加密。</p>
<p>封裝檔也<em class="rfc2119" title="MUST">必需</em>包含所有在該數位出版品範圍中的資源,也就是從預設閱讀順序和出版品宣告所列的資源清單組合中獲得的所有資源集合。</p>
<p>這些資源檔案<em class="rfc2119" title="MAY">可以</em>置放在根目錄下的任何子資料夾,或者放在根目錄中。</p>
<p>封裝檔中的內容<em class="rfc2119" title="MUST">必需</em>透過相對URL字串 [<cite><a class="bibref" data-link-type="biblio" href="#bib-url" title="URL Standard">url</a></cite>] 以參照到這些內容。</p>
<div class="note" role="note" id="issue-container-generatedID-0"><div role="heading" class="note-title marker" id="h-note-0" aria-level="3"><span>注意事項</span></div><div class="">
<p> [<cite><a class="bibref" data-link-type="biblio" href="#bib-zip" title=".ZIP File Format Specification">zip</a></cite>] 規格對檔案與資料夾名稱允許使用的字元有些限制。當使用這類名稱時,作者必須小心使用這些字元,以使得在跨作業系統時能得到廣泛的互通性。</p>
</div></div>
</section>
<section class="informative" id="sec-obtaining-manifest">
<h2 id="x7-obtaining-a-publication-manifest"><bdi class="secno">7. </bdi>取得出版品宣告<a class="self-link" aria-label="§" href="#sec-obtaining-manifest"></a></h2><p><em>本節不具規範性。</em></p>
<p>若封裝檔在其根目錄中包含<code>publication.json</code>檔案時,出版品宣告可於開啟及分析該檔案時取得。</p>
<p>除此之外,如果封裝檔在其根目錄中包含<code>index.html</code>檔案時,出版品宣告可透過以下步驟取得:</p>
<ol>
<li>假定由封裝檔中解出<code>index.html</code>檔案的內容為<code>document</code>。</li>
<li>如果其不包含<code>text/html</code>或<code>application/xhtml+xml</code>媒體類型(media type),結束此演算法。</li>
<li>將<code>document</code>之樹狀結構中,第一個<code>rel</code>屬性值為<code>publication</code>的<code>link</code>元素設為<var>manifest link</var>。</li>
<li>如果<var>manifest link</var>為<code>null</code>,結束此演算法。</li>
<li>如果<var>manifest link</var>的<code>href</code>屬性值為空字串,結束此演算法。</li>
<li>
<p>如果<var>manifest link</var>的<code>href</code>屬性值存在<a href="https://url.spec.whatwg.org/#concept-url-fragment">片段識別符號(fragment)</a>且可識別出<code>document</code>中的某個識別碼<var>id</var>時:</p>
<ol>
<li>將樹狀構結中第一個<code>id</code>屬性與<var>id</var>相同且<code>type</code>屬性為<code>application/ld+json</code>的<code>script</code>元素設為<var>embedded manifest script</var>。</li>
<li>如果<var>embedded manifest script</var>為<code>null</code>,結束此演算法。</li>
<li>將<var>embedded manifest script</var>的<a href="https://dom.spec.whatwg.org/#concept-child-text-content">子節點文字內容</a>存為<var>manifest text</var>。</li>
</ol>
<details>
<summary>解釋</summary>
<p>此分支流程用於當宣告內嵌於主要進入頁面時的情況。本演算法用來確認<code>script</code>元素的位置並且取出宣告。</p>
</details>
</li>
<li>否則:<ol>
<li>將<var>manifest URL</var>設為<code>href</code>屬性的值。</li>
<li>如果<var>manifest URL</var>不是一個相對的URL字串,中止這些步驟。</li>
<li>利用<var>manifest URL</var>從封裝檔中將宣告取出。</li>
<li>開啟並且讀取宣告檔案,其檔案內容即為<var>manifest text</var>。</li>
</ol>
<details>
<summary>解釋</summary>
<p>此分支流程用於當宣告位在獨立檔案時的情況。其展示了從封裝檔中取得宣告的標準程序。</p>
</details>
</li>
</ol>
<p>如果封裝檔中同時存在<code>index.html</code>與<code>publication.json</code>,則主要進入頁面<em class="rfc2119" title="SHOULD">應該</em>包含對<code>publication.json</code>檔案之參照,其規則請參照本章節之定義。</p>
<aside class="example" id="example-1"><div class="marker">
<a class="self-link" href="#example-1">範例<bdi> 1</bdi></a>
</div>
<p>這是一份在根目錄下,簡單地在主要進入頁面中透過 [<cite><a class="bibref" data-link-type="biblio" href="#bib-html" title="HTML Standard">HTML</a></cite>] <code>link</code>元素參照的出版品宣告。</p>
<pre aria-busy="false"><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">link</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"publication.json"</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"publication"</span>/></span></code></pre>
<p>在主要進入頁面中嵌入出版品宣告的範例可參見 [<cite><a class="bibref" data-link-type="biblio" href="#bib-audiobooks" title="Audiobooks">有聲書</a></cite>] 規格。</p></aside>
</section>
<section class="appendix informative" id="app-media-type">
<h2 id="a-the-application-lpf-zip-media-type"><bdi class="secno">A. </bdi><code>application/lpf+zip</code>媒體類別<a class="self-link" aria-label="§" href="#app-media-type"></a></h2><p><em>本節不具規範性。</em></p>
<p>本附錄註冊了<code>application/lpf+zip</code>媒體類型供輕量封裝格式使用。</p>
<p>輕量封裝格式(Lightweight Packaging Format, LPF)為一個基於 [<cite><a class="bibref" data-link-type="biblio" href="#bib-zip" title=".ZIP File Format Specification">zip</a></cite>] 封存格式之容器技術,用於將構成數位出版品的組成資源與相關詮釋資料集封裝成一個單一檔案容器。LPF和其相關標準由<abbr title="World Wide Web Consortium">W3C</abbr>所維護及定義。</p>
<dl class="variablelist">
<dt>MIME媒體類別名稱:</dt>
<dd>
<p><code>application</code></p>
</dd>
<dt>MIME子類別名稱:</dt>
<dd>
<p><code>lpf+zip</code></p>
</dd>
<dt>必要參數:</dt>
<dd>
<p>無</p>
</dd>
<dt>選擇性參數:</dt>
<dd>