-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathepub30-ocf.xhtml
1559 lines (1242 loc) · 148 KB
/
epub30-ocf.xhtml
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html [
<!ENTITY nbsp " ">
<!ENTITY copy "©">
<!ENTITY trade "™">
<!ENTITY reg "®">
]>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>EPUB Open Container Format (OCF) 3.0(日本語訳版)</title>
<link rel="stylesheet" type="text/css" href="css/epub-spec.css"/>
<link rel="stylesheet" type="text/css" href="css/translation-memo.css"/>
<link rel="stylesheet" href="js/google-code-prettify/prettify.css"/>
<meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"/>
<meta name="description" content="EPUB Open Container Format (OCF) 3.0 は、単一ファイルのコンテナに1つ以上の EPUBR Publication を構成する関連リソースのセットをカプセル化するためのファイル形式と処理モデルを定義する。"/>
<script src="http://www.google.com/jsapi/"></script>
<script src="js/ajax-loader.js"></script>
<script src="js/google-code-prettify/prettify.js"></script>
</head>
<body onload="prettyPrint()">
<div class="translation-attention">
<p>この文書は「<a href="http://www.idpf.org/epub/30/spec/epub30-ocf.html">EPUB Open Container Format (OCF) 3.0</a>」を日本語訳したものです。最新の文書は <a href="http://www.idpf.org/epub/30/spec/epub30-ocf.html">http://www.idpf.org/epub/30/spec/epub30-ocf.html</a> です。原文もしくは最新の情報を参照したい場合は、 <a href="http://www.idpf.org/epub/30/spec/epub30-ocf.html">EPUB Open Container Format (OCF) 3.0</a> を参照ください。</p>
<p>この日本語訳は参考です。公式な文書ではありません。翻訳・解釈の正確性を保証しておりません。</p>
<p><a href="#sec-terminology">1.2. 用語</a>にあげられている名称は本文中でも基本的に原文のままとした。</p>
<dl>
<dt>公開日:</dt>
<dd>2013-04-05</dd>
<dt>翻訳者:</dt>
<dd>Wataru Yoshimura</dd>
<dt>校正者:</dt>
<dd>Fumihiro Kato</dd>
</dl>
</div>
<div class="book" title="EPUB Open Container Format (OCF) 3.0">
<h1 class="title">EPUB Open Container Format (OCF) 3.0</h1>
<p class="identity"><span class="pubdate">2011年10月11日</span> <span class="releaseinfo">勧告仕様</span></p>
<dl class="printhistory"><dt>この版</dt>
<dd>
<a class="link" href="http://www.idpf.org/epub/30/spec/epub30-ocf-20111011.html">http://www.idpf.org/epub/30/spec/epub30-ocf-20111011.html</a></dd>
<dt>最新版</dt>
<dd>
<a class="link" href="http://www.idpf.org/epub/30/spec/epub30-ocf.html">http://www.idpf.org/epub/30/spec/epub30-ocf.html</a></dd>
<dt>前の版</dt>
<dd>
<a class="link" href="http://www.idpf.org/epub/30/spec/epub30-ocf-20110908.html">http://www.idpf.org/epub/30/spec/epub30-ocf-20110908.html</a></dd>
</dl>
<p class="diff">前回のドラフトからの変更点の差分は、<a class="link" href="http://code.google.com/p/epub-revision/source/diff?spec=svn3218&old=3183&r=3218&format=side&path=%2Ftrunk%2Fsrc%2Fspec%2Fepub30-ocf.xml">このリンク</a>で入手可能である。</p>
<p class="errata">この文書(いくらかの規範的な訂正を含むかもしれない)のために、<a class="link" href="http://idpf.org/epub/30/spec/epub30-ocf-errata/">正誤表</a>を参照されたい。</p>
<div class="legal">
<p class="copyright">Copyright © 2010, 2011 International Digital Publishing Forum<sup>™</sup></p>
<div class="legalnotice" title="Legal Notice"><a id="d57504e42"/><p>無断複写・転載を禁止する。本作品は合衆国法典第17編の下に保護されている。変更を伴うこの著作物の複製と頒布は、<a class="link" href="http://www.idpf.org">International Digital Publishing Forum (IDPF)</a> の書面による許可を得ない限り禁止されている。</p>
<p>EPUBは International Digital Publishing Forum の登録商標である。</p>
</div>
</div>
<div class="authorgroup">
<p class="bridgehead">Editors</p>
<p class="editor">James Pritchett, Learning Ally (formerly Recording for the Blind & Dyslexic) </p>
<p class="editor">Markus Gylling, DAISY Consortium </p>
</div>
<div class="toc"><p><strong>目次</strong></p>
<dl>
<dt><span class="chapter"><a href="#sec-overview">1. 概要</a></span></dt>
<dd>
<dl>
<dt><span class="section"><a href="#sec-overview-purpose-and-scope">1.1. 目的とスコープ</a></span></dt>
<dt><span class="section"><a href="#sec-terminology">1.2. 用語</a></span></dt>
<dt><span class="section"><a href="#sec-conformance">1.3. 適合性</a></span></dt>
<dt><span class="section"><a href="#ocf-conformance-content">1.4. コンテンツの適合性</a></span></dt>
<dt><span class="section"><a href="#ocf-conformance-rs">1.5. Reading System の適合性</a></span></dt>
</dl>
</dd>
<dt><span class="chapter"><a href="#sec-container-abstract">2. OCF 抽象コンテナ</a></span></dt>
<dd>
<dl>
<dt><span class="section"><a href="#sec-container-abstract-overview">2.1. 概要</a></span></dt>
<dt><span class="section"><a href="#sec-container-file-and-dir-structure">2.2. ファイルとディレクトリの構造</a></span></dt>
<dt><span class="section"><a href="#sec-container-iri">2.3. 他のコンポーネントを参照するための相対 IRI</a></span></dt>
<dt><span class="section"><a href="#sec-container-filenames">2.4. ファイル名</a></span></dt>
<dt><span class="section"><a href="#sec-container-metainf">2.5. META-INF</a></span></dt>
<dd>
<dl>
<dt><span class="section"><a href="#sec-container-metainf-container.xml">2.5.1. コンテナ - META-INF/container.xml</a></span></dt>
<dt><span class="section"><a href="#sec-container-metainf-encryption.xml">2.5.2. 暗号化 - META-INF/encryption.xml</a></span></dt>
<dt><span class="section"><a href="#sec-container-metainf-manifest.xml">2.5.3. マニフェスト - META-INF/manifest.xml</a></span></dt>
<dt><span class="section"><a href="#sec-container-metainf-metadata.xml">2.5.4. メタデータ - META-INF/metadata.xml</a></span></dt>
<dt><span class="section"><a href="#sec-container-metainf-rights.xml">2.5.5. 著作権管理 - META-INF/rights.xml</a></span></dt>
<dt><span class="section"><a href="#sec-container-metainf-signatures.xml">2.5.6. 電子署名 - META-INF/signatures.xml</a></span></dt>
</dl>
</dd>
</dl>
</dd>
<dt><span class="chapter"><a href="#physical-container-zip">3. OCF ZIP コンテナ</a></span></dt>
<dd>
<dl>
<dt><span class="section"><a href="#sec-container-zip-overview">3.1. 概要</a></span></dt>
<dt><span class="section"><a href="#sec-zip-container-zipreqs">3.2. ZIP ファイルの要件</a></span></dt>
<dt><span class="section"><a href="#sec-zip-container-mime">3.3. OCF ZIP コンテナのメディアタイプの識別</a></span></dt>
</dl>
</dd>
<dt><span class="chapter"><a href="#font-obfuscation">4. フォント難読化</a></span></dt>
<dd>
<dl>
<dt><span class="section"><a href="#fobfus-intro">4.1. 前置き</a></span></dt>
<dt><span class="section"><a href="#fobfus-algorithm">4.2. 難読化のアルゴリズム</a></span></dt>
<dt><span class="section"><a href="#fobfus-keygen">4.3. 難読化キーの生成</a></span></dt>
<dt><span class="section"><a href="#fobfus-specifying">4.4. 難読化されたリソースの指定</a></span></dt>
</dl>
</dd>
<dt><span class="appendix"><a href="#app-schemas">A. スキーマ</a></span></dt>
<dd>
<dl>
<dt><span class="section"><a href="#app-schema-container">A.1. <code class="filename">container.xml</code> スキーマ</a></span></dt>
<dt><span class="section"><a href="#app-schema-encryption">A.2. <code class="filename">encryption.xml</code> スキーマ</a></span></dt>
<dt><span class="section"><a href="#app-schema-signatures">A.3. <code class="filename">signatures.xml</code> スキーマ</a></span></dt>
</dl>
</dd>
<dt><span class="appendix"><a href="#example">B. 用例</a></span></dt>
<dt><span class="appendix"><a href="#app-media-type">C. <code>application/epub+zip</code> Media Type</a></span></dt>
<dt><span class="appendix"><a href="#app-contributors">D. 謝辞と貢献者</a></span></dt>
<dt><span class="bibliography"><a href="#references">参照・参考</a></span></dt>
</dl>
</div>
<div class="chapter" title="1 Overview" id="sec-overview">
<h2 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#sec-overview">></a> </span>1 概要</h2>
<div class="section" title="1.1 Purpose and Scope" id="sec-overview-purpose-and-scope">
<h3 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#sec-overview-purpose-and-scope">></a> </span>1.1 目的とスコープ</h3>
<p class="informative">このセクションは参考情報である。</p>
<p>この仕様、EPUB Open Container Format (OCF) 3.0 は、単一ファイルのコンテナに1つ以上の <a class="glossterm" href="#gloss-epub-publication" title="EPUB Publication (or Publication)">EPUB® Publication</a> を構成する関連リソースのセットをカプセル化するためのファイル形式と処理モデルを定義する。</p>
<p id="sibling-specs">この仕様は EPUB 3、XML および Web 標準に基づいて、デジタル出版物の交換や配信形式の第 3 版を構成する関連仕様のファミリーの1つである。それは EPUB 3 を構成する他の仕様を読み、調和して理解されることになっている:</p>
<div class="itemizedlist" id="epub-specs-listing">
<ul class="itemizedlist">
<li class="listitem"><p>EPUB 3 Overview <a class="biblioref" href="#refEPUB3Overview" title="EPUB 3 Overview">[<abbr>EPUB3Overview</abbr>]</a> は EPUB 3 文書の残りの部分に EPUB の有益な概要とロードマップを提供する。EPUB 3 Overview は最初に読んでおくべきである(should)。</p></li>
<li class="listitem"><p>EPUB Publications 3.0 <a class="biblioref" href="#refPublications3" title="EPUB Publications 3.0">[<abbr>Publications30</abbr>]</a> は出版レベルのセマンティクスと <a class="glossterm" href="#gloss-epub-publication" title="EPUB Publication (or Publication)">EPUB Publication</a> のための包括的な適合性要件を定義する。</p></li>
<li class="listitem"><p>EPUB Content Documents 3.0 <a class="biblioref" href="#refContentDocs3" title="EPUB Content Documents 3.0">[<abbr>ContentDocs30</abbr>]</a> は <a class="glossterm" href="#gloss-epub-publication" title="EPUB Publication (or Publication)">EPUB Publication</a> のコンテキストで使用するための XHTML、SVG と CSS のプロファイルを定義する。</p></li>
<li class="listitem"><p>EPUB Media Overlays 3.0 <a class="biblioref" href="#refOverlays3" title="EPUB Media Overlays 3.0">[<abbr>MediaOverlays30</abbr>]</a> はフォーマットとテキストとオーディオの同期のための処理モデルを定義する。</p></li>
</ul>
</div>
<p>OCF は、EPUB Publication に必要なコンテナ技術である。OCF は、以下のワークフローの役割を果たしてもよい(may):</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem"><p>デジタルの出版物を作り出す準備手順の間に、OCF は、異なる個人と(または)異なる団体の間で進行中の出版物を交換する時に、コンテナフォーマットを使用してもよい(may)。</p></li>
<li class="listitem"><p>出版社や変換企業から流通や販売チャンネルまで、デジタルの出版物を提供する場合、OCF は、転送フォーマットとして使用するのに推奨されるコンテナフォーマットである。</p></li>
<li class="listitem"><p>EPUB Reading System や <a class="glossterm" href="#gloss-user" title="User">User</a> に最終的な出版物を交付する時、OCF は、出版物を構成する資源の全てを保持するコンテナとして必須のフォーマットである。</p></li>
</ul>
</div>
<p>OCF 仕様書は、抽象的なファイルコレクションを構造化のための規則である“抽象コンテナ”を定義する。それはまた、ZIP アーカイブ内のこの抽象コンテナを表現するための規則である“物理コンテナ”を定義する。ZIP の物理コンテナのための規則は、<a class="biblioref" href="#refODF" title="ODF Open Document Format">[<abbr>ODF</abbr>]</a> によって使用される ZIP 技術に基いて構築される。OCF は、埋め込んだフォントを難読化をする機能を要求する EPUB Publication のための標準的な手法を定義する。</p>
<p>この仕様は Open Container Format (OCF) 2.0.1 <a class="biblioref" href="#refOCF2" title="Open Container Format 2.0.1">[<abbr>OCF2</abbr>]</a> に取って代わる。この仕様書と前身の違いについては <a class="biblioref" href="#refEPUB3Changes" title="EPUB 3 Differences from EPUB 2.0.1">[<abbr>EPUB3Changes</abbr>]</a> を参照されたい。</p>
</div>
<div class="section" title="1.2 Terminology" id="sec-terminology">
<h3 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#sec-terminology">></a> </span>1.2 用語</h3>
<div class="glosslist">
<dl>
<dt class="glossentry" title="EPUB Publication (or Publication)" id="gloss-epub-publication">EPUB Publication (or Publication)</dt>
<dd>
<p>(<span class="phrase">この仕様とその<a class="link" href="#sibling-specs">兄弟仕様</a></span>によって定義されるように)一組の相互関係のある<a class="glossterm" href="#gloss-publication-resource-cmt-or-foreign" title="Publication Resource">リソース</a>から成っていて、<a class="glossterm" href="#gloss-container" title="EPUB Container (or Container)">EPUB Container</a> でパッケージされている論理的な文書のエンティティ。</p>
</dd>
<dt class="glossentry" title="Publication Resource" id="gloss-publication-resource-cmt-or-foreign">Publication Resource</dt>
<dd>
<p>コンテンツまたは <a class="glossterm" href="#gloss-epub-publication" title="EPUB Publication (or Publication)">EPUB Publication</a> のロジックと表示に関する命令を含んでいるリソース。このリソースがない場合には、出版物は <a class="glossterm" href="#gloss-author" title="Author">Author</a> の意図したとおりに表示されないことがある。Publication Resource の例としては <a class="glossterm" href="#gloss-package-document" title="Package Document">Package Document</a>、<a class="glossterm" href="#gloss-content-document-epub" title="EPUB Content Document">EPUB Content Document</a>、<a class="glossterm" href="#gloss-stylesheet" title="EPUB Style Sheet (or Style Sheet)">EPUB Style Sheet</a>、音声、動画、画像、埋め込みフォントとスクリプトが含まれている。</p>
<p>Package Document 自身を除いて Publication Resource が <span class="phrase"><a class="link" href="epub30-publications.xhtml#sec-manifest-elem">manifest</a> <a class="biblioref" href="#refPublications3" title="EPUB Publications 3.0">[<abbr>Publications30</abbr>]</a></span> に記載されている必要があり(must)、<span class="phrase"><a class="link" href="epub30-publications.xhtml#sec-resource-locations">Publication Resource Locations</a> <a class="biblioref" href="#refPublications3" title="EPUB Publications 3.0">[<abbr>Publications30</abbr>]</a></span> で特に指定がない限り EPUB container ファイルにバンドルする必要がある。</p>
<p>Publication Resource でないリソースの例としては、Package Document の <span class="phrase"><a class="link" href="epub30-publications.xhtml#sec-link-elem">link</a> <a class="biblioref" href="#refPublications3" title="EPUB Publications 3.0">[<abbr>Publications30</abbr>]</a></span> 要素で識別されるものと <a class="glossterm" href="#gloss-container" title="EPUB Container (or Container)">EPUB Container</a> の外で解決するアウトバウンドのハイパーリンクで識別されるものが含まれている。(例えば <a class="biblioref" href="#refHTML5" title="HTML5: A vocabulary and associated APIs for HTML and XHTML">[<abbr>HTML5</abbr>]</a> の <code><a class="link" href="http://www.w3.org/TR/html5/Overview.html#the-a-element">a</a></code> 要素の <code>href</code> 属性)</p>
</dd>
<dt class="glossentry" title="EPUB Content Document" id="gloss-content-document-epub">EPUB Content Document</dt>
<dd>
<p>EPUB Content Document の定義(<a class="glossterm" href="#gloss-content-document-epub-xhtml" title="XHTML Content Document">XHTML</a> または <a class="glossterm" href="#gloss-content-document-epub-svg" title="SVG Content Document">SVG</a>)の1つに従う <a class="glossterm" href="#gloss-publication-resource-cmt-or-foreign" title="Publication Resource">Publication Resource</a>。</p>
<p>EPUB Content Document は <a class="glossterm" href="#gloss-core-media-type" title="Core Media Type">Core Media Type</a> であるため<span class="phrase"><a class="link" href="epub30-publications.xhtml#sec-fallback-processing-flow">フォールバック</a> <a class="biblioref" href="#refPublications3" title="EPUB Publications 3.0">[<abbr>Publications30</abbr>]</a></span> を提供することなく、<a class="glossterm" href="#gloss-epub-publication" title="EPUB Publication (or Publication)">EPUB Publication</a> に含まれていてもよい(may)。</p>
</dd>
<dt class="glossentry" title="XHTML Content Document" id="gloss-content-document-epub-xhtml">XHTML Content Document</dt>
<dd>
<p><span class="phrase"><a class="link" href="epub30-contentdocs.xhtml#sec-xhtml">XHTML Content Documents</a> <a class="biblioref" href="#refContentDocs3" title="EPUB Content Documents 3.0">[<abbr>ContentDocs30</abbr>]</a></span> で定義されている <a class="biblioref" href="#refHTML5" title="HTML5: A vocabulary and associated APIs for HTML and XHTML">[<abbr>HTML5</abbr>]</a> のプロファイルに準拠する <a class="glossterm" href="#gloss-content-document-epub" title="EPUB Content Document">EPUB Content Document</a>。</p>
<p>XHTML Content Document は、<a class="biblioref" href="#refHTML5" title="HTML5: A vocabulary and associated APIs for HTML and XHTML">[<abbr>HTML5</abbr>]</a> の <a class="link" href="http://www.w3.org/TR/html5/Overview.html#the-xhtml-syntax">XHTML syntax</a> を使用する。</p>
</dd>
<dt class="glossentry" title="SVG Content Document" id="gloss-content-document-epub-svg">SVG Content Document</dt>
<dd>
<p><span class="phrase"><a class="link" href="epub30-contentdocs.xhtml#sec-svg">SVG Content Documents</a> <a class="biblioref" href="#refContentDocs3" title="EPUB Content Documents 3.0">[<abbr>ContentDocs30</abbr>]</a></span> で表現された制約に準拠した <a class="glossterm" href="#gloss-content-document-epub" title="EPUB Content Document">EPUB Content Document</a>。</p>
</dd>
<dt class="glossentry" title="Core Media Type" id="gloss-core-media-type">Core Media Type</dt>
<dd>
<p><a class="glossterm" href="#gloss-publication-resource-cmt-or-foreign" title="Publication Resource">Publication Resource</a> 型のセットは、それに対するフォールバックは必須ではない。詳細については <span class="phrase"><a class="link" href="epub30-publications.html#sec-publication-resources">Publication Resources</a> <a class="biblioref" href="#refPublications3" title="EPUB Publications 3.0">[<abbr>Publications30</abbr>]</a></span> を参照されたい。</p>
</dd>
<dt class="glossentry" title="Package Document" id="gloss-package-document">Package Document</dt>
<dd>
<p><a class="glossterm" href="#gloss-epub-publication" title="EPUB Publication (or Publication)">EPUB Publication</a> について <span class="phrase"><a class="link" href="epub30-publications.xhtml#sec-package-documents">Package Documents</a> <a class="biblioref" href="#refPublications3" title="EPUB Publications 3.0">[<abbr>Publications30</abbr>]</a></span> で定められいる文献の構造化メタデータをもたらしている <a class="glossterm" href="#gloss-publication-resource-cmt-or-foreign" title="Publication Resource">Publication Resource</a>。</p>
</dd>
<dt class="glossentry" title="Manifestation" id="gloss-manifestation">Manifestation</dt>
<dd>
<p>知的内容の作品のデジタル(または物理的)な具体化。大幅な改修、要訳、翻訳または新しい manifestation の結果を別のデジタルや物理的な形状のコンテンツとして実現させるコンテツの変化。"インスタンス"または"アイテム"と呼ばれる manifestation の多くの単一だが、同一の複製であるかもしれない(may)。ISBN は manifestation の識別子の例であり、そしてその manifestation のすべてのインスタンスによって共有される。</p>
<p>manifestation のすべてのインスタンスは、ささいな修正や改訂が新しい manifestation や作業を引き起こすと判断されていないとして、ビット単位で同一である必要はない。</p>
</dd>
<dt class="glossentry" title="Unique Identifier" id="gloss-unique-identifier">Unique Identifier</dt>
<dd>
<p><code><span class="phrase"><a class="link" href="epub30-publications.xhtml#attrdef-package-unique-identifier">unique-identifier</a></span></code> 属性によって識別される Unique Identifier は <a class="glossterm" href="#gloss-epub-publication" title="EPUB Publication (or Publication)">EPUB Publication</a> のための主要な識別子である。Unique Identifier は一つまたは複数の EPUB standard に従って同じ作品の <a class="glossterm" href="#gloss-manifestation" title="Manifestation">Manifestation</a> によって共有さるかもしれず(may)、Manifestations の違いが <a class="glossterm" href="#gloss-epub-reading-system" title="EPUB Reading System (or Reading System)">EPUB Reading System</a> と自分自身との違いを考慮し、それらの違いに限定して同じコンテンツを表すには、ISBN の変更が必要になるかもしれない(may)。</p>
<p>Unique Identifier は ISBN よりも細分化される。しかしコンテンツの大幅な見直し、要訳などは新しい Unique Identifier が必要である。</p>
</dd>
<dt class="glossentry" title="EPUB Style Sheet (or Style Sheet)" id="gloss-stylesheet">EPUB Style Sheet (or Style Sheet)</dt>
<dd>
<p>CSS のプロファイルに準拠する CSS スタイルシートは <span class="phrase"><a class="link" href="epub30-contentdocs.xhtml#sec-css">EPUB Style Sheets</a> <a class="biblioref" href="#refContentDocs3" title="EPUB Content Documents 3.0">[<abbr>ContentDocs30</abbr>]</a></span> で定義されている。</p>
</dd>
<dt class="glossentry" title="Viewport" id="gloss-viewport">Viewport</dt>
<dd>
<p><a class="glossterm" href="#gloss-epub-publication" title="EPUB Publication (or Publication)">EPUB Publication</a> の内容が視覚的に <a class="glossterm" href="#gloss-user" title="User">User</a> に与えられる <a class="glossterm" href="#gloss-epub-reading-system" title="EPUB Reading System (or Reading System)">EPUB Reading System</a> の領域。</p>
</dd>
<dt class="glossentry" title="EPUB Container (or Container)" id="gloss-container">EPUB Container (or Container)</dt>
<dd>
<p><a class="xref" href="#physical-container-zip" title="3 OCF ZIP Container"><em>OCF ZIP コンテナ</em></a>で定義されている <a class="glossterm" href="#gloss-epub-publication" title="EPUB Publication (or Publication)">EPUB Publication</a> 用 ZIP ベースのパッケージングと配布のフォーマット。</p>
</dd>
<dt class="glossentry" title="OCF Processor" id="gloss-ocf-processor">OCF Processor</dt>
<dd>
<p><span class="phrase">本仕様書</span>に従って <a class="glossterm" href="#gloss-container" title="EPUB Container (or Container)">EPUB コンテナ</a>を処理するソフトウェア・アプリケーション。</p>
</dd>
<dt class="glossentry" title="Author" id="gloss-author">Author</dt>
<dd>
<p><a class="glossterm" href="#gloss-epub-publication" title="EPUB Publication (or Publication)">EPUB Publication</a>(必ずしも、それが含まれるコンテンツとリソースの作者であるというわけではありません)の制作に対して責任がある人または組織。</p>
</dd>
<dt class="glossentry" title="User" id="gloss-user">User</dt>
<dd>
<p><a class="glossterm" href="#gloss-epub-reading-system" title="EPUB Reading System (or Reading System)">EPUB Reading System</a> を使用して <a class="glossterm" href="#gloss-epub-publication" title="EPUB Publication (or Publication)">EPUB Publication</a> を消費する個人。</p>
</dd>
<dt class="glossentry" title="EPUB Reading System (or Reading System)" id="gloss-epub-reading-system">EPUB Reading System (or Reading System)</dt>
<dd>
<p>この仕様書と<a class="link" href="#sibling-specs">兄弟仕様</a>と方法の準拠で <a class="glossterm" href="#gloss-user" title="User">User</a> に提示するために <a class="glossterm" href="#gloss-epub-publication" title="EPUB Publication (or Publication)">EPUB Publication</a> を処理するシステム。</p>
</dd>
</dl>
</div>
</div>
<div class="section" title="1.3 Conformance Statements" id="sec-conformance">
<h3 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#sec-conformance">></a> </span>1.3 適合性</h3>
<p>キーワードは"MUST"、"MUST NOT"、"REQUIRED"、"SHALL"、"SHALL NOT"、"SHOULD"、"SHOULD NOT"、"RECOMMENDED"、"MAY"、そしてこの文書の"OPTIONAL"は <a class="biblioref" href="#refRFC2119" title="Key words for use in RFCs to Indicate Requirement Levels (RFC 2119)">[<abbr>RFC2119</abbr>]</a> の記述に従って解釈される。</p>
<p>この仕様のすべてのセクションは"このセクションは、有益である"有益なステータスラベルで識別される場合を除き、規範的である。セクションと付録に有益な状態のアプリケーションは、すべての子コンテンツおよびそれに含まれる可能性のサブセクションに適用される。</p>
<p>この仕様のすべての例は有効である。</p>
</div>
<div class="section" title="1.4 Content Conformance" id="ocf-conformance-content">
<h3 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#ocf-conformance-content">></a> </span>1.4 コンテンツの適合性</h3>
<div class="conformance-list">
<ul class="conformance-list">
<li class="listitem"><p id="confreq-ocf-content-abstr"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#confreq-ocf-content-abstr">></a> </span>OCF 抽象コンテナは、<a class="xref" href="#sec-container-abstract" title="2 OCF Abstract Container"><em>OCF 抽象コンテナ</em></a>で定義された適合性要件を満たさなければならない(must)。</p></li>
<li class="listitem"><p id="confreq-ocf-content-zip"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#confreq-ocf-content-zip">></a> </span>OCF ZIP コンテナ(また、<a class="glossterm" href="#gloss-container" title="EPUB Container (or Container)">EPUB Container</a> と呼ばれる)は、<a class="xref" href="#physical-container-zip" title="3 OCF ZIP Container"><em>OCF ZIP コンテナ</em></a>で定義された適合性要件を満たさなければならない(must)。</p></li>
</ul>
</div>
</div>
<div class="section" title="1.5 Reading System Conformance" id="ocf-conformance-rs">
<h3 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#ocf-conformance-rs">></a> </span>1.5 Reading System の適合性</h3>
<p><a class="glossterm" href="#gloss-epub-reading-system" title="EPUB Reading System (or Reading System)">EPUB Reading System</a> は、以下の基準全てを満たさなければならない(must):</p>
<div class="conformance-list">
<ul class="conformance-list">
<li class="listitem"><p id="confreq-ocf-rs-zip"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#confreq-ocf-rs-zip">></a> </span>それは、<a class="xref" href="#physical-container-zip" title="3 OCF ZIP Container"><em>OCF ZIP コンテナ</em></a>で表現されたすべての Reading System の適合性要件に適合する OCF ZIP コンテナを処理しなければならない(must)。</p></li>
<li class="listitem"><p id="confreq-ocf-fobfus"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#confreq-ocf-fobfus">></a> </span>それが <a class="glossterm" href="#gloss-viewport" title="Viewport">Viewport</a> を持つ場合、<a class="xref" href="#font-obfuscation" title="4 Font Obfuscation"><em>フォント難読化</em></a>で定義されたフォントの解読をサポートしなければならない(must)。</p></li>
</ul>
</div>
</div>
</div>
<div class="chapter" title="2 OCF Abstract Container" id="sec-container-abstract">
<h2 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#sec-container-abstract">></a> </span>2 OCF 抽象コンテナ</h2>
<div class="section" title="2.1 Overview" id="sec-container-abstract-overview">
<h3 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#sec-container-abstract-overview">></a> </span>2.1 概要</h3>
<p class="informative">このセクションは参考情報である。</p>
<p>OCF 抽象コンテナは、コンテナのコンテンツのためのファイルシステムモデルを定義している。ファイルシステムモデルは、コンテナのコンテンツのすべてに単一の共通のルートディレクトリを使用する。埋め込まれた出版物の(非リモートの)全てのリソースは、特定のファイルシステム構造はこのために強制はされないが、コンテナのルートディレクトリが率いるディレクトリツリー内に配置される。ファイルシステムモデルは、コンテナのルートディレクトリの直接の子で、以下の特別なファイルを補完するに利用する <code class="filename">META-INF</code> という名前の必須ディレクトリを包含する:</p>
<div class="variablelist">
<dl>
<dt class="varlistentry"><span class="term"><code class="filename">container.xml</code> <code class="option">[必須]</code></span></dt>
<dd><p>埋め込まれた各出版物のエントリポイントであるファイルを識別する。</p></dd>
<dt class="varlistentry"><span class="term"><code class="filename">signatures.xml</code> <code class="option">[省略可]</code> </span></dt>
<dd><p>様々な資産のためのデジタル署名が含まれている。</p></dd>
<dt class="varlistentry"><span class="term"><code class="filename">encryption.xml</code> <code class="option">[省略可]</code></span></dt>
<dd><p>出版物のリソースの暗号化に関する情報が含まれている。(このファイルは、<a class="link" href="#font-obfuscation" title="4 Font Obfuscation">フォント難読化</a>をする場合には、必要である。)</p></dd>
<dt class="varlistentry"><span class="term"><code class="filename">metadata.xml</code> <code class="option">[省略可]</code></span></dt>
<dd><p>コンテナに関するメタデータを格納するために使用する。</p></dd>
<dt class="varlistentry"><span class="term"><code class="filename">rights.xml</code> <code class="option">[省略可]</code></span></dt>
<dd><p>デジタル著作権に関する情報を格納するために使用する。</p></dd>
<dt class="varlistentry"><span class="term"><code class="filename">manifest.xml</code> <code class="option">[許可]</code></span></dt>
<dd><p>Open Document Format <a class="biblioref" href="#refODF" title="ODF Open Document Format">[<abbr>ODF</abbr>]</a> によって許可されるコンテナコンテンツのマニフェスト。</p></dd>
</dl>
</div>
<p><code class="filename">META-INF</code> の各ファイルのための完全な適合性要件は、<a class="xref" href="#sec-container-metainf" title="2.5 META-INF">META-INF</a> にある。</p>
</div>
<div class="section" title="2.2 File and Directory Structure" id="sec-container-file-and-dir-structure">
<h3 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#sec-container-file-and-dir-structure">></a> </span>2.2 ファイルとディレクトリの構造</h3>
<p>OCF 抽象コンテナのための仮想ファイルシステムは、コンテナのコンテンツのすべてに単一の共通のルートディレクトリを持たなければならない(must)。</p>
<p>OCF 抽象コンテナは、コンテナのルート・ディレクトリの直接の子である <code class="filename">META-INF</code> という名前のディレクトリを包含しなければならない(must)。このディレクトリのコンテンツのための要件は、<a class="xref" href="#sec-container-metainf" title="2.5 META-INF">META-INF</a> に記載されている。</p>
<p>ルートディレクトリにあるファイル名の <code class="filename">mimetype</code> は、<a class="xref" href="#physical-container-zip" title="3 OCF ZIP Container"><em>OCF ZIP コンテナ</em></a>で説明されているとおり、OCF ZIP コンテナによって使用するために予約済みである。</p>
<p>OCF 抽象コンテナ内の他の全てのファイルは、<code class="filename">META-INF</code> ディレクトリ内を除くコンテナのルートディレクトリから任意の場所の子孫でもよい(may)。</p>
<p>特定の出版物のそれぞれのコンテンツは、コンテナのルート配下の専用のディレクトリに格納されることを推奨する。</p>
</div>
<div class="section" title="2.3 Relative IRIs for Referencing Other Components" id="sec-container-iri">
<h3 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#sec-container-iri">></a> </span>2.3 他のコンポーネントを参照するための相対 IRI</h3>
<p>OCF 抽象コンテナ内のファイルは、相対 IRI 参照 (<a class="biblioref" href="#refRFC3987" title="Internationalized Resource Identifiers (IRIs) (RFC 3987)">[<abbr>RFC3987</abbr>]</a> と <a class="biblioref" href="#refRFC3986" title="Uniform Resource Identifier (URI): Generic Syntax (RFC 3986)">[<abbr>RFC3986</abbr>]</a>)経由して相互に参照しなければならない(must)。例えば、<code class="filename">chapter1.html</code> という名前のファイルが、同じディレクトリにある <code class="filename">image1.jpg</code> という名前の画像ファイルを参照する場合、<code class="filename">chapter1.html</code> はそのコンテンツの一部として以下のように含めてもよい(may):</p>
<div class="informalexample">
<pre class="synopsis"><img src="image1.jpg" alt="…" /></pre></div>
<p>相対 IRI 参照は、ベース IRI <a class="biblioref" href="#refRFC3986" title="Uniform Resource Identifier (URI): Generic Syntax (RFC 3986)">[<abbr>RFC3986</abbr>]</a> に与えられたファイル形式に関連のある言語仕様によって決定される。例えば、CSS 仕様は、CSS スタイルシートとプロパティ宣言のコンテクストでどのように相対 IRI 参照が動作するのかを定義する。いくつかの言語仕様が、RFC3987 に先行した RFC を参照することに注意されたい。その場合、以前の RFC は、特定の言語でコンテンツに適用される。</p>
<p>ほとんどの言語仕様とは異なり、<code class="filename">META-INF</code> ディレクトリ内の全てのファイルのためのベース IRI は、デフォルトのベース IRI として抽象コンテナのためにルートディレクトリを使用する。例えば、<code class="filename">META-INF/container.xml</code> が以下の内容の場合:</p>
<div class="informalexample">
<pre class="synopsis"><?xml version="1.0"?>
<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
<rootfiles>
<rootfile full-path="OEBPS/Great Expectations.opf"
media-type="application/oebps-package+xml" />
</rootfiles>
</container></pre></div>
<p>この場合、<code class="filename">OEBPS/Great Expectations.opf</code> のパスは OCF 抽象コンテナのためのルートディレクトリから相対であり、<code class="filename">META-INF</code> ディレクトリからの相対ではない。</p>
</div>
<div class="section" title="2.4 File Names" id="sec-container-filenames">
<h3 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#sec-container-filenames">></a> </span>2.4 ファイル名</h3>
<p><code class="literal">File Name</code> の用語は、ディレクトリまたは OCF 抽象コンテナのディレクトリ内の通常のファイルといった任意の型のファイルの名前を表現する。</p>
<p>OCF 抽象コンテナの特定のディレクトリの場合、<code class="literal">パス名</code>は、ディレクトリのファイル名を分割する <code class="literal">/</code> (<code>U+002F</code>) 文字と一緒に連結されたフルパス内にすべてのディレクトリのファイル名を保持する文字列である。OCF 抽象コンテナの特定のファイルの場合、パス名は、ディレクトリのファイル名を分割する <code class="literal">/</code> 文字と一緒に連結されたすべてのディレクトリのファイル名を保持する文字列に続いて、<code class="literal">/</code> 文字とファイルのファイル名となっている。</p>
<p>後に説明するファイル名の制約は、最も一般的に使用されているオペレーティング・システム上で変更なしに使用されているパス名とファイル名を考慮にいれて設計されている。本仕様書は、OCF ファイルとパス名を表すことのできない <a class="glossterm" href="#gloss-ocf-processor" title="OCF Processor">OCF Processor</a> の相互互換性を補う方法を指定しない。</p>
<p>OCF 抽象コンテナのコンテクストでは、ファイルとパス名は、以下の基準を満たさなければならない(must):</p>
<div class="conformance-list">
<ul class="conformance-list">
<li class="listitem"><p id="ocf-fn-encoding"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#ocf-fn-encoding">></a> </span>ファイル名は、 UTF-8 <a class="biblioref" href="#refUnicode5" title="The Unicode Consortium. The Unicode Standard, Version 5.0.0, defined by: The Unicode Standard, Version 5.0 (Boston, MA, Addison-Wesley, 2007. ISBN 0-321-48091-0)">[<abbr>Unicode</abbr>]</a> でエンコードされていなければならない(must)。</p></li>
<li class="listitem"><p id="ocf-fn-length"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#ocf-fn-length">></a> </span>ファイル名は、255バイトを超えてはならない(must not)。</p></li>
<li class="listitem"><p id="ocf-pn-length"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#ocf-pn-length">></a> </span>抽象コンテナ内の任意のディレクトリまたはファイルのパス名は、65535バイトを超えてはならない(must not)。</p></li>
<li class="listitem"><p id="ocf-fn-chars"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#ocf-fn-chars">></a> </span>ファイル名は、これらの文字は、一般的に使用されるオペレーティング・システムの間で一貫してサポートされない場合があり、以下の <a class="biblioref" href="#refUnicode5" title="The Unicode Consortium. The Unicode Standard, Version 5.0.0, defined by: The Unicode Standard, Version 5.0 (Boston, MA, Addison-Wesley, 2007. ISBN 0-321-48091-0)">[<abbr>Unicode</abbr>]</a> は使用してはならない(must not):</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem"><p>スラッシュ: <code class="literal">/</code> (<code>U+002F</code>)</p></li>
<li class="listitem"><p>クォーテーションマーク: <code class="literal">"</code> (<code>U+0022</code>)</p></li>
<li class="listitem"><p>アスタリスク: <code class="literal">*</code> (<code>U+002A</code>)</p></li>
<li class="listitem"><p>ピリオド: <code class="literal">.</code> (<code>U+002E</code>)</p></li>
<li class="listitem"><p>コロン: <code class="literal">:</code> (<code>U+003A</code>)</p></li>
<li class="listitem"><p>小なり記号: <code class="literal"><</code> (<code>U+003C</code>)</p></li>
<li class="listitem"><p>大なり記号: <code class="literal">></code> (<code>U+003E</code>)</p></li>
<li class="listitem"><p>クエスチョンマーク: <code class="literal">?</code> (<code>U+003F</code>)</p></li>
<li class="listitem"><p>バックスラッシュ: <code class="literal">\</code> (<code>U+005C</code>)</p></li>
<li class="listitem"><p>DEL (<code>U+007F</code>)</p></li>
<li class="listitem"><p>C0 領域 (<code>U+0000 … U+001F</code>)</p></li>
<li class="listitem"><p>C1 領域 (<code>U+0080 … U+009F</code>)</p></li>
<li class="listitem"><p>私用領域 (<code>U+E000 … U+F8FF</code>)</p></li>
<li class="listitem"><p>アラビア表示形Aの非文字 (<code>U+FDDO … U+FDEF</code>)</p></li>
<li class="listitem"><p>特殊用途文字 (<code>U+FFF0 … U+FFFF</code>)</p></li>
<li class="listitem"><p>タグと異体字セレクタ補助 (<code>U+E0000 … U+E0FFF</code>)</p></li>
<li class="listitem"><p>補助私用領域A (<code>U+F0000 … U+FFFFF</code>)</p></li>
<li class="listitem"><p>補助私用領域B (<code>U+100000 … U+10FFFF</code>) </p></li>
</ul>
</div>
</li>
<li class="listitem"><p id="ocf-fn-cs"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#ocf-fn-cs">></a> </span>ファイル名は、大文字と小文字が区別される。</p></li>
<li class="listitem"><p id="ocf-fn-cn"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#ocf-fn-cn">></a> </span>同じディレクトリ内にあるすべてのファイル名は、<a class="biblioref" href="#refUnicode5" title="The Unicode Consortium. The Unicode Standard, Version 5.0.0, defined by: The Unicode Standard, Version 5.0 (Boston, MA, Addison-Wesley, 2007. ISBN 0-321-48091-0)">[<abbr>Unicode</abbr>]</a> のセクション 3.13 で定義されているような正規化のケースに従い一意でなければならない(must)。</p></li>
<li class="listitem"><p id="ocf-fn-an"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#ocf-fn-an">></a> </span>同じディレクトリ内にあるすべてのファイル名は、NFC または NFD の正規化 <a class="biblioref" href="#refTR15" title="Unicode Normalization Forms">[<abbr>TR15</abbr>]</a> に従い一意であるべきである(should)。</p></li>
</ul>
</div>
<div class="note" title="note">
<h3 class="title">メモ</h3>
<p>いくつかの商用 ZIP ツールは、完全な Unicode の範囲をサポートしておらず、ファイル名のみ ASCII の範囲のみサポートするかもしれない(may)。これらの制限を持つ ZIP ツールを使うことを望むコンテンツ製作者は、ASCII の範囲にこれらのファイル名を制限することが最善であることに気づくかもしれない(may)。ファイルの名前は、解凍処理の中に保存することができない場合、そのファイルはコンテンツ内のURIにより参照されるときに行われた任意の名前に変換を相殺する必要がある。</p>
</div>
</div>
<div class="section" title="2.5 META-INF" id="sec-container-metainf">
<h3 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#sec-container-metainf">></a> </span>2.5 META-INF</h3>
<p>全ての OCF 抽象コンテナは、<code class="filename">META-INF</code> というディレクトリを包含しなければならない(must)。このディレクトリは、以下に指定されているファイルを含む。以下に定義されている以外のファイルは、<code class="filename">META-INF</code> ディレクトリに包含してもよく(may)、<a class="glossterm" href="#gloss-ocf-processor" title="OCF Processor">OCF Processor</a> は、そのようなファイルを検出したときに失敗してはならない(must not)。</p>
<div class="section" title="2.5.1 Container - META-INF/container.xml" id="sec-container-metainf-container.xml">
<h4 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#sec-container-metainf-container.xml">></a> </span>2.5.1 コンテナ - META-INF/container.xml</h4>
<p>全ての OCF コンテナは、<code class="filename">META-INF</code> ディレクトリ内に <code class="filename">container.xml</code> と呼ばれるファイルを包含しなければならない(must)。<code class="filename">container.xml</code> ファイルは、コンテナ内に包含されている EPUB Publication のためのルート・ファイルのメディアタイプとパスを識別しなければならない(must)。</p>
<p><code class="filename">container.xml</code> ファイルは暗号化してはならない(must not)。</p>
<p><code class="filename">container.xml</code> ファイルのスキーマは <a class="xref" href="#app-schema-container" title="A.1 Schema for container.xml"><code class="filename">container.xml</code> のためのスキーマ</a>で使用可能で、<code class="filename">container.xml</code> ファイルは、(このような要素のすべての属性と内容を含む)他の名前空間からのすべての要素と属性を除去した後に、このスキーマに応じて妥当でなければならない(must)。</p>
<p><code>rootfiles</code> 要素は、1つ以上の <code>rootfile</code> 要素を含まなければならず(must)、それぞれは、一意に単一の出版物を表す Package Document を参照しなければならない(must)。OCF に格納されている出版物は、同じ <a class="glossterm" href="#gloss-manifestation" title="Manifestation">Manifestation</a> の異なるレンダリングであるべきである(should)。</p>
<p id="container-default-rendition">OCF プロセッサは、含まれている出版物のデフォルトのレンダリングを表現するために <code>rootfiles</code> 要素内の最初の <code>rootfile</code> 要素を考慮しなければならない(must)。Reading System は、標準で一つ以外の任意のレンダリングを使用することは必須ではない。</p>
<div class="informalexample">
<p>以下のサンプルは、ルートファイルの <code class="filename">OEBPS/My Crazy Life.opf</code> (the Package Document) を持つ EPUB Publication のためのサンプル <code class="filename">container.xml</code> を示している:</p>
<pre class="synopsis"><?xml version="1.0"?>
<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
<rootfiles>
<rootfile full-path="OEBPS/My Crazy Life.opf"
media-type="application/oebps-package+xml" />
</rootfiles>
</container></pre></div>
<div class="informalexample">
<p>以下のサンプルは、同じコンテナ内にバンドルされている <em>The Sandman</em> の SVG と XHTML による表現を示している:</p>
<pre class="synopsis"><?xml version="1.0"?>
<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
<rootfiles>
<rootfile full-path="SVG/Sandman.opf"
media-type="application/oebps-package+xml" />
<rootfile full-path="XHTML/Sandman.opf"
media-type="application/oebps-package+xml" />
</rootfiles>
</container></pre></div>
<p><a class="glossterm" href="#gloss-package-document" title="Package Document">Package Document</a> 内に含まれる <code>manifest</code> 要素は、EPUB の処理に使用される唯一無二のマニフェストを指定する。ZIP アーカイブ内またはオプションの <code class="filename">manifest.xml</code> ファイルに含まれている補助的なマニフェスト情報を、EPUB の処理のために使用してはならない(must not)。ZIP アーカイブ内の任意の追加のファイルは、(すなわち、<code class="filename">META-INF</code> ファイルや出版物の代替の派生した翻訳物のように、Package Document の <code>manifest</code> 要素内にリストされていない ZIP アーカイブ内のファイルは)EPUB Publication の処理に使用してはならない(must not)。</p>
<p><code>full-path</code> 属性の値は、(<a class="biblioref" href="#refRFC3986" title="Uniform Resource Identifier (URI): Generic Syntax (RFC 3986)">RFC3986</a> で定義されている)<code class="literal">path-rootless</code> のみの形式から得る必要があり、(RFC 3986 で定義されている)<code class="literal">path component</code> を含まなければならない(must)。path component は、それらが使用されているコンテナのルートからの相対パスである。</p>
<p><a class="glossterm" href="#gloss-ocf-processor" title="OCF Processor">OCF Processor</a> は <code class="filename">container.xml</code> ファイル内にある外部の要素と属性を無視しなければならない(must)。</p>
</div>
<div class="section" title="2.5.2 Encryption - META-INF/encryption.xml" id="sec-container-metainf-encryption.xml">
<h4 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#sec-container-metainf-encryption.xml">></a> </span>2.5.2 暗号化 - META-INF/encryption.xml</h4>
<p>コンテナファイルシステムのルートレベルにある <code class="filename">META-INF</code> ディレクトリ内のオプションの <code class="filename">encryption.xml</code> ファイルは、コンテナのコンテンツの全ての暗号化情報を保持する。このファイルは、ルート要素の <code>encryption</code> の XML 文書である。<code>encryption</code> 要素は、<a class="biblioref" href="#refXMLENCCORE" title="XML Encryption Syntax and Processing Version 1.1">[<abbr>XML ENC Core</abbr>]</a> で定義されている <code>EncryptedKey</code> と <code>EncryptedData</code> 型の子要素を含む。各 <code>EncryptedData</code> 要素は、コンテナ内の一つ以上のファイルを暗号化する方法を説明している。encryption.xml は、リソースが暗号化されていることを示し、それが暗号化されている方法に関する情報を提供する示さなければならない(must)。それ故に、コンテナ内のいずれかのリソースが暗号化されているとき、<code class="filename">encryption.xml</code> は、リソースが暗号化されていることを示し、それが暗号化されている方法に関する情報を提供することを示さなければならない(must)。</p>
<p><code>EncryptedData</code> 要素が、暗号化された各ファイルを説明するのと同時に、<code>EncryptedKey</code> 要素は、コンテナ内で使用される各暗号化キーを説明する。各 <code>EncryptedData</code> 要素は、XML Encryption で説明されているように、<code>EncryptedKey</code> 要素を参照する。</p>
<p><code class="filename">encryption.xml</code> のスキーマは、<a class="xref" href="#app-schema-encryption" title="A.2 Schema for encryption.xml"><code class="filename">encryption.xml</code> のためのスキーマ</a>を使用でき、<code class="filename">encryption.xml</code> ファイルは、このスキーマに応じて妥当でなければならない(must)。</p>
<p>OCF は、独立して個々のファイルを暗号化し、これらはセキュリティとパフォーマンスのトレードオフだが、コンテナのコンテンツは一つ一つ復号化される。この方法による暗号化は、パッケージ全体のディレクトリの構造とファイルの命名を公開する。</p>
<p>OCF は、様々なアルゴリズムを使用できるように、暗号化のフレームワークを提供する XML Encryption <a class="biblioref" href="#refXMLENCCORE" title="XML Encryption Syntax and Processing Version 1.1">[<abbr>XML ENC Core</abbr>]</a> を使用する。XML Encryption は、任意のデータを暗号化し、結果を XML で表現するための処理を規定している。OCF 抽象コンテナは、非 XML データが含まれてもよく(may)、XML Encryption は、OCF 抽象コンテナに含まれるすべてのデータを暗号化するために使用できる。OCF 暗号化は、コンテナ内のファイル全体のみをサポートし、ファイルの一部の暗号化はサポートしない。<code class="filename">encryption.xml</code> ファイルは、(もし存在するなら)暗号化はしてはならない(must not)。</p>
<p>暗号化データは、OCF 抽象コンテナ内の非暗号化データを置き換える。<code class="filename">photo.jpeg</code> という名前の画像が暗号化されているとき、<code class="filename">photo.jpeg</code> リソースのコンテンツは、その暗号化されたコンテンツにより置き換えられるべきである(should)。ZIP コンテナに保持したとき、データのストリームは、暗号化する前に圧縮しなければならず(must)、デフレート圧縮を使用しなければならない(must)。ZIP ディレクトリ内では、暗号化されたフィルは、デフレートで圧縮するよりはむしろ格納するべきである(should)。</p>
<p>状況によっては、EPUB Publication により参照される埋め込みフォントのストレージを難読化して"親"出版物に繋げ、無制限使用のための抽出をより困難にする必要がある。これらのケースでは、<code class="filename">encryption.xml</code> は、<a class="xref" href="#font-obfuscation" title="4 Font Obfuscation"><em>フォント難読化</em></a>に従って必要なフォントのデコード情報を提供するために使用するべきである(should)。</p>
<p>以下のファイルは、デフォルトか特定の暗号化が求められているかどうかに関わらず暗号化してはならない(must):</p>
<table border="0" summary="Simple list" class="simplelist">
<tr>
<td><code class="filename">mimetype</code></td>
</tr>
<tr>
<td><code class="filename">META-INF/container.xml</code></td>
</tr>
<tr>
<td><code class="filename">META-INF/encryption.xml</code></td>
</tr>
<tr>
<td><code class="filename">META-INF/manifest.xml</code></td>
</tr>
<tr>
<td><code class="filename">META-INF/metadata.xml</code></td>
</tr>
<tr>
<td><code class="filename">META-INF/rights.xml</code></td>
</tr>
<tr>
<td><code class="filename">META-INF/signatures.xml</code></td>
</tr>
<tr>
<td><code class="filename">EPUB rootfile (the <a class="glossterm" href="#gloss-package-document" title="Package Document">Package Document</a>)</code></td>
</tr>
</table>
<p>署名済みリソースは、続けて XML 署名復号変換 <a class="biblioref" href="#refXMLSIGDecrypt" title="Decryption Transform for XML Signature">[<abbr>XML SIG Decrypt</abbr>]</a> を使用して暗号化してもよい(may)。この機能は、例えば署名後に暗号化したデータから署名する前に暗号化されたデータを識別する OCF エージェントなどのアプリケーションを可能にする。署名後に暗号化されたデータのみ、署名を検証するために使用する要約を計算する前に複合しなければならない(must)。</p>
<div class="informalexample">
<p>次の例では、<a class="biblioref" href="#refXMLENCCORE" title="XML Encryption Syntax and Processing Version 1.1">[<abbr>XML ENC Core</abbr>]</a> の <a class="link" href="http://www.w3.org/TR/2002/REC-xmlenc-core-20021210/#sec-eg-Symmetric-Key">Section 2.2.1 </a> から適合したリソース <code class="filename">image.jpeg</code> は、対象鍵アルゴリズム (AES) を使用する暗号化と、対象鍵は、ジョン・スミスのキーを持つ非対称鍵アルゴリズム (RSA) を使用してさらに暗号化される。</p>
<pre class="synopsis"><encryption
xmlns ="urn:oasis:names:tc:opendocument:xmlns:container"
xmlns:enc="http://www.w3.org/2001/04/xmlenc#"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<enc:EncryptedKey Id="EK">
<enc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
<ds:KeyInfo>
<ds:KeyName>John Smith</ds:KeyName>
</ds:KeyInfo>
<enc:CipherData>
<enc:CipherValue>xyzabc</enc:CipherValue>
</enc:CipherData>
</enc:EncryptedKey>
<enc:EncryptedData Id="ED1">
<enc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#kw-aes128"/>
<ds:KeyInfo>
<ds:RetrievalMethod URI="#EK"
Type="http://www.w3.org/2001/04/xmlenc#EncryptedKey"/>
</ds:KeyInfo>
<enc:CipherData>
<enc:CipherReference URI="image.jpeg"/>
</enc:CipherData>
</enc:EncryptedData>
</encryption></pre>
</div>
</div>
<div class="section" title="2.5.3 Manifest - META-INF/manifest.xml" id="sec-container-metainf-manifest.xml">
<h4 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#sec-container-metainf-manifest.xml">></a> </span>2.5.3 マニフェスト - META-INF/manifest.xml</h4>
<p><code class="filename">manifest.xml</code> という予約済みの名前を持つオプションのファイルを、コンテナファイルシステムのルートレベルにある <code class="filename">META-INF</code> ディレクトリに包含してもよい(may)。</p>
<p><code class="filename">manifest.xml</code> は、(ファイルが存在する場合)暗号化してはならない(must not)。</p>
</div>
<div class="section" title="2.5.4 Metadata - META-INF/metadata.xml" id="sec-container-metainf-metadata.xml">
<h4 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#sec-container-metainf-metadata.xml">></a> </span>2.5.4 メタデータ - META-INF/metadata.xml</h4>
<p><code class="filename">metadata.xml</code> という予約済みの名前を持つオプションのファイルを、コンテナファイルシステムのルートレベルにある <code class="filename">META-INF</code> ディレクトリに包含してもよい(may)。このファイルは、(もし存在するなら)コンテナレベルのメタデータのために使用しなければならない(must)。OCF 仕様のこのバージョンでは、任意のコンテナレベルのメタデータを指定しない。</p>
<p><code class="filename">META-INF/metadata.xml</code> ファイルが存在するとき、そのコンテンツは、このファイルの特定のフォーマットを指定する OCF の将来のバージョンとの衝突を回避するため名前空間で装飾された要素 <a class="biblioref" href="#refXMLNamespaces" title="Namespaces in XML (Third Edition)">[<abbr>XMLNS</abbr>]</a> にするべきである(should)。</p>
<p><code class="filename">metadata.xml</code> は、(ファイルが存在する場合)暗号化してはならない(must not)。</p>
</div>
<div class="section" title="2.5.5 Rights Management - META-INF/rights.xml" id="sec-container-metainf-rights.xml">
<h4 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#sec-container-metainf-rights.xml">></a> </span>2.5.5 著作権管理 - META-INF/rights.xml</h4>
<p>
<code class="filename">rights.xml</code> という予約済みの名前を持つオプションのファイルを、コンテナファイルシステムのルートレベルにある <code class="filename">META-INF</code> ディレクトリに包含してもよい(may)。このファイルは、権利者、仲介者、そして利用者の間で出版物の交換のための信頼できるデジタル著作権管理 (DRM) 情報のために予約されている。OCF 仕様のこのバージョンでは、DRM 情報に必要な形式を指定しないが、将来のバージョンでは、DRM 情報の特定の形式を指定するかもしれない。</p>
<p><code class="filename">META-INF/rights.xml</code> ファイルが存在するとき、そのコンテンツは、このファイルの特定のフォーマットを指定する OCF の将来のバージョンとの衝突を回避するため名前空間で装飾された要素 <a class="biblioref" href="#refXMLNamespaces" title="Namespaces in XML (Third Edition)">[<abbr>XMLNS</abbr>]</a> にするべきである(should)。</p>
<p><code class="filename">rights.xml</code> ファイルは、暗号化してはならない(must not)。</p>
<p><code class="filename">rights.xml</code> ファイルが存在しないとき、OCF コンテナは、コンテナの任意の部分を示す情報を提供しない権利が抑制される。</p>
</div>
<div class="section" title="2.5.6 Digital Signatures - META-INF/signatures.xml" id="sec-container-metainf-signatures.xml">
<h4 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#sec-container-metainf-signatures.xml">></a> </span>2.5.6 電子署名 - META-INF/signatures.xml</h4>
<p>コンテナファイルシステムのルートレベルにある <code class="filename">META-INF</code> ディレクトリ内のオプションの <code class="filename">signatures.xml</code> は、コンテナとコンテンツの電子署名を保持する。このファイルは、ルート要素の <code>signatures</code> の XML 文書である。<code>signatures</code> 要素は、<a class="biblioref" href="#refXMLDSIGCORE" title="XML-Signature Syntax and Processing Version 1.1">[<abbr>XML DSIG Core</abbr>]</a> で定義されている <code>Signature</code> 型の子要素を含んでいる。署名は、出版物と翻訳の全体または一部の出版物と代替えの翻訳に適用できる。XML Signature は、XML だけではなく、あらゆる種類のデータで署名を指定することができる。</p>
<p><code class="filename">signatures.xml</code> ファイルは、暗号化してはならない(must not)。</p>
<p><code class="filename">signatures.xml</code> ファイルが存在しないとき、OCF コンテナは、コンテナの任意の部分がコンテナレベルで電子署名されていることを示す情報を提供しない。しかしながら、それは、含まれている任意のオプションの代替え表現内に電子署名が存在している可能性がある。</p>
<p><code class="filename">signatures.xml</code> ファイルのスキーマは、<a class="xref" href="#app-schema-signatures" title="A.3 Schema for signatures.xml"><code class="filename">signatures.xml</code> のスキーマ</a>が利用でき、<code class="filename">signatures.xml</code> ファイルは、このスキーマに応じて妥当でなければならない(must)。</p>
<p>OCF エージェントが、コンテナ内のデータの署名を作るとき、それは、<code class="filename">signatures.xml</code> ファイル内に <code>signatures</code> 要素の最後の子 <code>Signature</code> 要素として新しい署名を加えるべきである(should)。</p>
<div class="note" title="note">
<h3 class="title">メモ</h3>
<p><code class="filename">signatures.xml</code> ファイルの各 <code>Signature</code> は、XML Signature の <code>Manifest</code> 要素とその <code>Reference</code> サブ要素を使用して、IRI の署名が適用されるデータによって識別される。単一で含まれるファイルは、個々にまたは統合して署名してもよい(may)。個々に署名された各ファイルは、独立して検証できるリソースのダイジェスト値が作られる。このアプローチでは、Signature 要素が大きくなってもよい(may)。ファイルが統合して署名されるとき、署名されたファイルのセットは、単一の XML Signature の <code>Manifest</code> 要素のリスト化され、一つ以上の <code>Signature</code> 要素によって参照することができる。</p>
</div>
<p>コンテナの任意または全てのファイルは、計算された署名情報を含んでいる <code class="filename">signatures.xml</code> ファイルを除外して、全体を署名することができる。<code class="filename">signatures.xml</code> ファイルを署名するべきか、またその署名方法は、署名者の目的に依存する(should)。</p>
<p>署名者が署名者の署名を無効にせずにコンテナに署名を追加したり削除したりできるようにしたい場合は、<code class="filename">signatures.xml</code> ファイルに署名するべきではない(should not)。</p>
<p>署名者が署名の任意の追加または削除をしたときに署名者の署名を無効にしたい場合は、(<a class="biblioref" href="#refXMLDSIGCORE" title="XML-Signature Syntax and Processing Version 1.1">[<abbr>XML DSIG Core</abbr>]</a> の<a class="link" href="http://www.w3.org/TR/2008/REC-xmldsig-core-20080610/#sec-EnvelopedSignature">セクション 6.6.4</a> で定義されている)Enveloped Signature 変換を作成済みの <code>Signature</code> を除いた全体の既存の署名ファイルに署名するために使用することができる。この変換は、既存の全ての署名を署名できるだろうが、パッケージに後で署名が追加されると無効になる。</p>
<p>署名者が、既存の署名の削除時に署名者の署名を無効にしたいが、署名の追加は許したいとき、既存の署名を署名するのに XPath 変換を使用することができる。(これは単に提案である。特定の XPath 変換は、OCF 仕様書の一部ではない。)</p>
<p>XML-Signature は、署名に任意のセマンティクスを紐付けないが、エージェントが、例えば、署名を表現する Signature 要素に情報を加えることにより、セマンティクスな情報を包含してもよい(may)。XML Signature は、追加情報を、(例えば、<code>SignatureProperties</code> 要素を使うことによる)署名に追加する方法を説明する。</p>
<div class="informalexample">
<p>以下の XML 表現は、<code class="filename">signatures.xml</code> フィルの例のコンテンツを示し、<a class="biblioref" href="#refXMLDSIGCORE" title="XML-Signature Syntax and Processing Version 1.1">[<abbr>XML DSIG Core</abbr>]</a> の<a class="link" href="http://www.w3.org/TR/2008/REC-xmldsig-core-20080610/#sec-Overview">セクション 2</a> で見つかるサンプルを基にしている。それはコンテナに、一つの署名を含んでおり、署名は、<code class="filename">OEBFPS/book.html</code> と <code class="filename">OEBFPS/images/cover.jpeg</code> の二つのリソースに提供される。</p>
<pre class="synopsis"><signatures xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
<Signature Id="sig" xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"/>
<Reference URI="#Manifest1">
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>j6lwx3rvEPO0vKtMup4NbeVu8nk=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>…</SignatureValue>
<KeyInfo>
<KeyValue>
<DSAKeyValue>
<P>…</P><Q>…</Q><G>…</G><Y>…</Y>
</DSAKeyValue>
</KeyValue>
</KeyInfo>
<Object>
<Manifest Id="Manifest1">
<Reference URI="OEBFPS/book.xml">
<Transforms>
<Transform
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue></DigestValue>
</Reference>
<Reference URI="OEBFPS/images/cover.jpeg">
<Transforms>
<Transform
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue></DigestValue>
</Reference>
</Manifest>
</Object>
</Signature>
</signatures></pre>
</div>
</div>
</div>
</div>
<div class="chapter" title="3 OCF ZIP Container" id="physical-container-zip">
<h2 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#physical-container-zip">></a> </span>3 OCF ZIP コンテナ</h2>
<div class="section" title="3.1 Overview" id="sec-container-zip-overview">
<h3 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#sec-container-zip-overview">></a> </span>3.1 概要</h3>
<p class="informative">このセクションは参考情報である。</p>
<p>OCF ZIP コンテナは、<a class="link" href="#sec-container-abstract" title="2 OCF Abstract Container">抽象コンテナ</a>の物理的な単一ファイルの明示である。</p>
</div>
<div class="section" title="3.2 ZIP File Requirements" id="sec-zip-container-zipreqs">
<h3 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#sec-zip-container-zipreqs">></a> </span>3.2 ZIP ファイルの要件</h3>
<p>OCF ZIP コンテナは、<a class="biblioref" href="#refZIP" title="ZIP File Format Specification">[<abbr>ZIP APPNOTE</abbr>]</a> によって規定されているような ZIP 形式を使用するが、以下の制約と説明に従う:</p>
<div class="conformance-list">
<ul class="conformance-list">
<li class="listitem">
<p id="confreq-zip-abstr"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#confreq-zip-abstr">></a> </span>OCF ZIPコンテナのコンテンツは、<a class="link" href="#sec-container-abstract" title="2 OCF Abstract Container">抽象コンテナ</a>に一致しなければならない(must)。</p>
</li>
<li class="listitem">
<p id="confreq-zip-mult"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#confreq-zip-mult">></a> </span>OCF ZIP コンテナは、ZIP ファイルが複数のストレージメディアを横断するために分割を許可している ZIP アプリケーションノートの機能を使用してはならない(must not)。<a class="glossterm" href="#gloss-ocf-processor" title="OCF Processor">OCF Processor</a> は、複数のストレージメディアを横断するよう分割している ZIP ファイルであることが明らかな任意の OCF ファイルをエラーとして処理しなければならない(must)。</p>
</li>
<li class="listitem">
<p id="confreq-zip-comp"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#confreq-zip-comp">></a> </span>OCF ZIP コンテナは、ZIP アーカイブに非圧縮ファイルかデフレート圧縮ファイルのみ包含しなければならない(must)。OCF Processor は、デフレート以外の圧縮技術を使用している任意の OCF コンテナをエラーとして処理しなければならない(must)。</p>
</li>
<li class="listitem">
<p id="confreq-zip-64"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#confreq-zip-64">></a> </span>OCF ZIP コンテナは、<a class="biblioref" href="#refZIP" title="ZIP File Format Specification">[<abbr>ZIP APPNOTE</abbr>]</a> のアプリケーションノートのサブセクション G に、セクション V の "Version 1" として定義されている ZIP64 拡張を使用してもよく(may)、コンテンツがそれらを要求するとき、それらの拡張のみ使用するべきである(should)。OCF Processor は、"Version 1" として定義されている ZIP64 拡張をサポートしなければならない(must)。</p>
</li>
<li class="listitem">
<p id="confreq-zip-enc"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#confreq-zip-enc">></a> </span>OCF ZIP コンテナは、ZIP フォーマットにより定義された暗号化機能を使用してはならず(must not)、代わりに、暗号化は、<a class="xref" href="#sec-container-metainf-encryption.xml" title="2.5.2 Encryption - META-INF/encryption.xml">暗号化 - META-INF/encryption.xml</a> で説明されている機能を使用しなければならない(must)。OCF Processor は、ZIP 暗号化機能を使用している任意の他の OCF ZIP コンテナをエラーとして処理しなければならない(must)。</p>
</li>
<li class="listitem">
<p id="confreq-zip-preserve"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#confreq-zip-preserve">></a> </span>OCF Processor は、OCF 抽象コンテナで定義されていない読み込みと保存の操作を通じて OCF ZIP コンテナからの情報を保つことを要求しない。具体的には、OCF Processor は、特定のオペレーティングシステム(例えば、<code>External file attributes</code> と <code>Extra field</code> など)に対応するファイルシステム情報を保持する CRC 値、コメントフィールド、フィールドを保存しない。</p>
</li>
<li class="listitem">
<p id="confreq-zip-utf8"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#confreq-zip-utf8">></a> </span>OCF ZIP コンテナは、UTF-8 <a class="biblioref" href="#refUnicode5" title="The Unicode Consortium. The Unicode Standard, Version 5.0.0, defined by: The Unicode Standard, Version 5.0 (Boston, MA, Addison-Wesley, 2007. ISBN 0-321-48091-0)">[<abbr>Unicode</abbr>]</a> を使用してファイルシステム名をエンコードしなければならない(must)。</p>
</li>
</ul>
</div>
<p>以下の制約は、OCF ZIP コンテナアーカイブ内の特定のフィールドに適用する:</p>
<div class="conformance-list">
<ul class="conformance-list">
<li class="listitem">
<p id="confreq-zip-fld-version"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#confreq-zip-fld-version">></a> </span>ローカルファイルヘッダーテーブルでは、OCF ZIP コンテナは、特定のファイルにより必要とされる最大バージョンレベルに合わせるために、<code>version needed to extract</code> フィールドの値を <code>10</code>、<code>20</code>、<code>45</code> に設定しなければならない(must)。(例えば、デフレートが必要な場合は <code>20</code>、ZIP64 が必要な場合は <code>45</code>)。OCF Processor は、他の任意の値をエラーとして処理しなければならない(must)。</p>
</li>
<li class="listitem">
<p id="confreq-zip-fld-comp"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#confreq-zip-fld-comp">></a> </span>ローカルファイルヘッダーテーブルでは、OCF ZIP コンテナは <code>compression</code> メソッドフィールドの値を <code>0</code> か <code>8</code> に設定しなければならない(must)。OCF Processor は、他の任意の値をエラーとして処理しなければならない(must)。</p>
</li>
<li class="listitem">
<p id="confreq-zip-fld-er"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#confreq-zip-fld-er">></a> </span>OCF Processor は、<code>Archive decryption header</code> または <code>Archive extra data record</code> を持つ OCF ZIP コンテナをエラーとして処理しなければならない(must)。</p>
</li>
</ul>
</div>
</div>
<div class="section" title="3.3 OCF ZIP Container Media Type Identification" id="sec-zip-container-mime">
<h3 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#sec-zip-container-mime">></a> </span>3.3 OCF ZIP コンテナのメディアタイプの識別</h3>
<p>OCF ZIP コンテナは、コンテナ内に最初のファイルとして <code class="filename">mimetype</code> ファイルを包含しなければならなず(must)、このファイルのコンテンツは、<code class="literal">application/epub+zip</code> 文字列の MIME タイプでなければならない(must)。</p>
<p><code class="filename">mimetype</code> ファイルのコンテンツは、どんな文字埋めや空白を含んではならず(must not)、Unicode signature (または Byte Order Mark) で開始してはならず(must not)、そしてMIME タイプ 文字列の大文字と小文字は、上記の通り正確でなければならない(must)。さらに <code class="filename">mimetype</code> ファイルは、圧縮で暗号化もしてはならず(must)、そして ZIP ヘッダにエキストラフィールドがあってはならない(must not)。</p>
<div class="note" title="note">
<h3 class="title">メモ</h3>
<p><code class="literal">application/epub+zip</code> メディアタイプについてのより詳細な情報は <a class="xref" href="#app-media-type" title="Appendix C. The application/epub+zip Media Type">付録 C, <em><code>application/epub+zip</code> Media Type</em></a> を参照されたい。</p>
</div>
</div>
</div>
<div class="chapter" title="4 Font Obfuscation" id="font-obfuscation">
<h2 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#font-obfuscation">></a> </span>4 フォント難読化</h2>
<div class="section" title="4.1 Introduction" id="fobfus-intro">
<h3 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#fobfus-intro">></a> </span>4.1 前置き</h3>
<p class="informative">このセクションは参考情報である。</p>
<p>OCF ZIP コンテナは、基本的に ZIP ファイルなので、一般的に入手可能な ZIP ツールを、パッケージから任意の非暗号化したコンテンツストリームを抽出するのに使用できる。一部のシステムでは、ZIP ファイルのコンテンツは、他の任意のネイティブコンテナ(例えば、フォルダなど)に表示されるかもしれない(may)。これを実現する能力はとても便利だが、サードパーティ製フォントの包含したい <a class="glossterm" href="#gloss-author" title="Author">Author</a> のために問題を引き起こすことがある。</p>
<p>多くの商業フォントは埋め込みを許可しているが、フォントの埋め込みは、出版物のその重要な部分を形成していることを意味し、コンテンツと一緒にオリジナルフォントファイルは提供しない。統合された ZIP のサポートは、現代的なオペレーティングシステムに偏在しおり、ZIP アーカイブ内に単純に配置したフォントは、他のコンテクストで再利用されることは意図しないフォントであることを意味するには不十分である。この不確定要素は、他の非常に便利な EPUB Publication のフォント埋め込みの機能を弱めることができる。</p>
<p>フォントの再利用を防ぐために、多くのフォントベンダーは、もしそれらのフォントが、出版物に何らかの方法で固定化されている場合、EPUB Publication 内のこれらのフォントの使用を許可するかもしれない(may)。フォントファイルが、コンピュータデバイスの組み込みツールを使ってオペレーショングシステム上で使用するため直接インストールできないならば、他の EPUB Publication によって直接使用することはできない。</p>
<p>フォントファイルのためのデジタル著作権管理や施工システムを提供することはこの文書の範囲を超える。その代わりに、任意の含まれているフォントへの一般的なアクセスを得るための最終的な OCF 受容者側の追加の作業として必要になる難読化の方法を定義する。これは、多くのフォントベンダーの要求を満たすであろうという IDPF の期待である。本文書や IDPF によって作られた要求ではなく、これが暗号化を構成するわけでも、フォントファイルが著作権侵害から安全であることを保証するわけでもない。定義されたメカニズムは、単に提供されたフォントのライセンスの詳細に気付いていない人に障害を提供する。これは、フォントへの完全なアクセスを得ようと考えているユーザーは防げないだろう。OCF コンテナが提供されると、RAW フォントファイルを抽出するために定義したアルゴリズムを適応することが可能である。個々のフォントライセンスの要件を満たすかどうかに関わらず、使用許諾者や被許諾者の課題は残る。
</p>
</div>
<div class="section" title="4.2 Obfuscation Algorithm" id="fobfus-algorithm">
<h3 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#fobfus-algorithm">></a> </span>4.2 難読化のアルゴリズム</h3>
<p>アルゴリズムは、フォントファイルを難読化するために、フォントファイルの最初の 1040 バイト (~1KB) の変更から成る。万一、ファイルが 1040 バイト に満たない場合、ファイル全体が変更される。アルゴリズムのキーは、<a class="xref" href="#fobfus-keygen" title="4.3 Generating the Obfuscation Key">難読化キーの生成</a>のセクションに指定されている手順を使用して生成される。元データを難読化するのに、RAW ファイルの最初のバイトとキーの最初のバイトの排他的論理和(XOR)の計算の結果は、埋め込まれたフォントファイルの最初のバイトとして格納される。この処理は、キー内の全てのバイトが使用されるまで、ソースとキーの次のバイトで繰り返される。ここで、キーの最初のバイトとソースの 21 バイト目から処理が始まり継続する。1040 バイトがこの方法で(またはソースの終わりに到達して)エンコードされたら、ソース内の残りのデータは、格納先に直接コピーされる。以下が擬似コードにおけるアルゴリズムである:</p>
<pre class="programlisting">set source to font file
set destination to obfuscated file
set keyData to key for font
set outer to 0
while outer < 52 and not (source at EOF)
set inner to 0
while inner < 20 and not (source at EOF)
read 1 byte from source //Assumes read advances file position
set sourceByte to result of read
set keyByte to byte inner of keyData
set obfuscatedByte to (sourceByte XOR keyByte)
write obfuscatedByte to destination
increment inner
end while
increment outer
end while
if not (source at EOF) then
read source to EOF
write result of read to destination
end if</pre>
<p>元のフォントデータを得るには、処理は単純に逆になる。つまり、ソースファイルは、難読化データと RAW フォントデータが格納されている格納先のファイルからなる。</p>
</div>
<div class="section" title="4.3 Generating the Obfuscation Key" id="fobfus-keygen">
<h3 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#fobfus-keygen">></a> </span>4.3 難読化キーの生成</h3>
<p>難読化アルゴリズムに用いられるキーは、EPUB Publications 3.0 仕様書から要求され、<span class="phrase"><a class="link" href="epub30-publications.xhtml#sec-opf-metadata-identifiers-uid">Unique Identifier</a> <a class="biblioref" href="#refPublications3" title="EPUB Publications 3.0">[<abbr>Publications30</abbr>]</a></span> に詳しく述べられている、コンテナ内にある出版物の一意識別子から得られる。キーを生成するために、コンテナに含まれる全ての出版物の一意識別子は、<code>container.xml</code> と各識別子の間に挿入されるスペース (Unicode コードポイント <code>U+0020</code>)に出現する出版物の順番で連結しなければならない(must)この文字列を生成する前に、XML 1.0 仕様書 <a class="biblioref" href="#refXML" title="Extensible Markup Language (XML) 1.0 (Fifth Edition)">[<abbr>XML</abbr>]</a> のセクション 2.3 によって定義されている全ての空白文字は、個々の識別子から削除される。具体的な Unicode コードポイント <code>U+0020</code>、<code>U+0009</code>、<code>U+000D</code> と <code>U+000A</code> は、連結されたスペース区切りの文字列を加える前に各識別子から削除しなければならない(must)。この文字列の UTF-8 表現の SHA-1 ダイジェストは、Secure Hash Standard <a class="biblioref" href="#refSHA1" title="Federal Information Processing Standards Publication 180-3: Secure Hash Standard (SHS)">[<abbr>SHA-1</abbr>]</a> で規定されているように生成するべきである(should)。このダイジェストは、その後、<a class="xref" href="#fobfus-algorithm" title="4.2 Obfuscation Algorithm">難読化のアルゴリズム</a>に記載されているアルゴリズムのためのキーとして直接使用される。</p>
</div>
<div class="section" title="4.4 Specifying Obfuscated Resources" id="fobfus-specifying">
<h3 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#fobfus-specifying">></a> </span>4.4 難読化されたリソースの指定</h3>
<p>全ての OCF 抽象コンテナの暗号化データは、ここに記載されている方法を使用して難読化したフォントを包含する出版物に添付する <code class="filename">encryption.xml</code> ファイル(<a class="xref" href="#sec-container-metainf-encryption.xml" title="2.5.2 Encryption - META-INF/encryption.xml">暗号化 - META-INF/encryption.xml</a> を参照)に記入しなければならない(must)。<code class="filename">encryption.xml</code> ファイル内のそのような難読化したフォントのために、<code>EncryptedData</code> の子要素である <code>EncryptionMethod</code> 要素は、<code>http://www.idpf.org/2008/embedding</code> 値を持つ <code>Algorithm</code> 属性を持たなければならない(must)。この属性の存在は、本仕様書に記載されているアルゴリズムの使用を示している。このアプローチを使用して難読化された全てのリソースは、<code>CipherData</code> 要素に記載しなければならない(must)。</p>
<div class="informalexample">
<p>この <code class="filename">encryption.xml</code> ファイルの例は、次のようになるかもしれない:</p>
<pre class="synopsis"><encryption 
xmlns="urn:oasis:names:tc:opendocument:xmlns:container" 
xmlns:enc="http://www.w3.org/2001/04/xmlenc#">
<enc:EncryptedData> 
<enc:EncryptionMethod Algorithm="http://www.idpf.org/2008/embedding"/> 
<enc:CipherData> 
<enc:CipherReference URI="OEBPS/Fonts/BKANT.TTF"/> 
</enc:CipherData> 
</enc:EncryptedData> 
</encryption> 
</pre>
</div>
<p>他の出版物へ埋め込みフォントのささいな複製を防ぐために、明示的なキーを、<code class="filename">encryption.xml</code> ファイルに提供してはならない(must not)。Reading system は、パッケージの <a class="glossterm" href="#gloss-unique-identifier" title="Unique Identifier">Unique Identifier</a> からキーを得なければならない(must)。</p>
</div>
</div>
<div class="appendix" title="Appendix A. Schemas" id="app-schemas">
<div class="titlepage"><div><div>
<h2 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#app-schemas">></a> </span>付録 A. スキーマ</h2></div>
</div>
</div>
<p>この付録内のスキーマは、規範である。</p>
<div class="section" title="A.1 Schema for container.xml" id="app-schema-container">
<h3 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#app-schema-container">></a> </span>A.1 <code class="filename">container.xml</code> のスキーマ</h3>
<p><code class="filename">container.xml</code> ファイルのスキーマは、<a class="link" href="http://www.idpf.org/epub/30/schema/ocf-container-30.rnc">http://www.idpf.org/epub/30/schema/ocf-container-30.rnc</a> が利用可能である。</p>
</div>
<div class="section" title="A.2 Schema for encryption.xml" id="app-schema-encryption">
<h3 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#app-schema-encryption">></a> </span>A.2 <code class="filename">encryption.xml</code> のスキーマ</h3>
<p><code class="filename">encryption.xml</code> ファイルのスキーマは、<a class="link" href="http://www.idpf.org/epub/30/schema/ocf-encryption-30.rnc">http://www.idpf.org/epub/30/schema/ocf-encryption-30.rnc</a> が利用可能である。それは、<a class="biblioref" href="#refXMLSecRngSchemas" title="XML Security RELAX NG Schemas">[<abbr>XML Sec RNG Schemas</abbr>]</a> のスキーマに基づいている。</p>
</div>
<div class="section" title="A.3 Schema for signatures.xml" id="app-schema-signatures">
<h3 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#app-schema-signatures">></a> </span>A.3 <code class="filename">signatures.xml</code> のスキーマ</h3>
<p><code class="filename">signatures.xml</code> ファイルのスキーマは、<a class="link" href="http://www.idpf.org/epub/30/schema/ocf-signatures-30.rnc">http://www.idpf.org/epub/30/schema/ocf-signatures-30.rnc</a> が利用可能である。それは、<a class="biblioref" href="#refXMLSecRngSchemas" title="XML Security RELAX NG Schemas">[<abbr>XML Sec RNG Schemas</abbr>]</a> のスキーマに基づいている。</p>
</div>
</div>
<div class="appendix" title="Appendix B. Example" id="example">
<div class="titlepage"><div><div>
<h2 class="title"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#example">></a> </span>付録 B. 用例</h2></div>
</div>
</div>
<p>次の例は、ZIP コンテナ内の署名と暗号化された EPUB Publication を含むための、OCF フォーマットを使用した実例である。</p>
<div class="example" title="Example B.1. Ordered list of files in the ZIP Container" id="example-files"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#example-files">></a> </span>
<p class="title"><strong>用例 B.1. ZIP コンテナ内ファイルのソートしたリスト</strong></p>
<div class="example-contents">
<pre class="synopsis">mimetype
META-INF/container.xml
META-INF/signatures.xml
META-INF/encryption.xml
OEBPS/As You Like It.opf
OEBPS/book.html
OEBPS/nav.html
OEBPS/toc.ncx
OEBPS/images/cover.png</pre>
</div>
</div>
<br class="example-break"/>
<div class="example" title="Example B.2. The contents of the mimetype file" id="example-mimetype"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#example-mimetype">></a> </span>
<p class="title"><strong>用例 B.2. <code class="filename">mimetype</code> ファイル</strong>の内容</p>
<div class="example-contents">
<pre class="synopsis">application/epub+zip</pre>
</div>
</div>
<br class="example-break"/>
<div class="example" title="Example B.3. The contents of the META-INF/container.xml file" id="example-container"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#example-container">></a> </span>
<p class="title"><strong>用例 B.3. <code class="filename">META-INF/container.xml</code> ファイル</strong>の内容</p>
<div class="example-contents">
<pre class="synopsis"><?xml version="1.0"?>
<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
<rootfiles>
<rootfile full-path="OEBPS/As You Like It.opf"
media-type="application/oebps-package+xml" />
</rootfiles>
</container></pre>
</div>
</div>
<br class="example-break"/>
<div class="example" title="Example B.4. The contents of the META-INF/signatures.xml file" id="example-signatures"><span class="link-marker"><a class="hidden-reveal" title="Link here" href="#example-signatures">></a> </span>
<p class="title"><strong>用例 B.4. <code class="filename">META-INF/signatures.xml</code> ファイル</strong>の内容</p>
<div class="example-contents">
<pre class="synopsis"><signatures xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
<Signature Id="AsYouLikeItSignature" xmlns="http://www.w3.org/2000/09/xmldsig#">
<!-- SignedInfo is the information that is actually signed. In this case -->
<!-- the SHA1 algorithm is used to sign the canonical form of the XML -->
<!-- documents enumerated in the Object element below -->
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"/>
<Reference URI="#AsYouLikeIt">
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>…</DigestValue>
</Reference>
</SignedInfo>
<!-- The signed value of the digest above using the DSA algorithm -->
<SignatureValue>…</SignatureValue>
<!-- The key to use to validate the signature -->
<KeyInfo>
<KeyValue>
<DSAKeyValue>
<P>…</P>
<Q>…</Q>
<G>…</G>
<Y>…</Y>
</DSAKeyValue>
</KeyValue>
</KeyInfo>
<!-- The list documents to sign. Note that the canonical form of XML -->
<!-- documents is signed while the binary form of the other documents -->
<!-- is used -->
<Object>
<Manifest Id="AsYouLikeIt">
<Reference URI="OEBPS/As You Like It.opf">
<Transforms>
<Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue></DigestValue>
</Reference>
<Reference URI="OEBPS/book.html">
<Transforms>
<Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
</Transforms>