-
Notifications
You must be signed in to change notification settings - Fork 59
/
docapis_old.opf
224 lines (186 loc) · 10 KB
/
docapis_old.opf
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
---
layout: null
---
{% assign sidebar = site.data[site.sidebar].folders %}
<?xml version="1.0" encoding="utf-8"?>
<!--
The unique identifier in <package unique-identifier="XYZ"> is a reference to
the identifier specified in <metadata> as <dc:Identifier id="XYZ">.
-->
<package xmlns="http://www.idpf.org/2007/opf" version="2.0" unique-identifier="BookId">
<!--
Metadata:
The required metadata element is used to provide information about the publication
as a whole.
For detailed info visit: http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#Section2.2
-->
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
<!-- Title [mandatory]: The title of the publication. This is the title that will appear on the "Home" screen. -->
<dc:title>{{site.title}}</dc:title>
<!-- Language [mandatory]: the language of the publication. The language codes used are the same as in XML
and HTML. The full list can be found here: http://www.w3.org/International/articles/language-tags/
Some common language strings are:
"en" English
"en-us" English - USA
"en-gb" English - United Kingdom
"fr" French
"fr-ca" French - Canada
"de" German
"es" Spanish
-->
<dc:language>en-us</dc:language>
<!-- Cover [mandatory]. The cover image must be specified in <manifest> and referenced from
this <meta> element with a name="cover" attribute.
-->
<meta name="cover" content="My_Cover" />
<!-- The ISBN of your book goes here -->
<dc:identifier id="BookId" opf:scheme="ISBN">{{site.isbn}}</dc:identifier>
<!-- The author of the book. For multiple authors, use multiple <dc:Creator> tags.
Additional contributors whose contributions are secondary to those listed in
creator elements should be named in contributor elements.
-->
<dc:creator>{{site.author}}</dc:creator>
<!-- Publisher: An entity responsible for making the resource available -->
<dc:publisher>{{site.publisher}}</dc:publisher>
<!-- Subject: A topic of the content of the resource. Typically, Subject will be
expressed as keywords, key phrases or classification codes that describe a topic
of the resource. The BASICCode attribute should contain the subject code
according to the BISG specification:
https://bisg.org/page/BISACEdition
-->
<dc:subject>{{site.subject}}</dc:subject>
<!-- Date: Date of publication in YYYY-MM-DD format. (Days and month can be omitted).
Standard to follow: http://www.w3.org/TR/NOTE-datetime
-->
<dc:date>{{ "now" | date: "%Y-%m-%d" }}</dc:date>
<!-- Description: A short description of the publication's content. -->
<dc:description>{{site.description}}</dc:description>
</metadata>
<!--
Manifest:
The required manifest must provide a list of all the files that are part of the
publication (e.g. Content Documents, NCX table of contents, image files, CSS style sheets).
Kindlegen however does not require CSS and images to be specified in the manifest if they
are referenced from the content HTML.
The manifest element must contain one or more item elements with the following media-type attributes:
text/x-oeb1-document HTML content files
application/x-dtbncx+xml NCX table of contents
image/jpeg JPEG image
image/GIF GIF image
For detailed info visit: http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#Section2.3
-->
<manifest>
<!-- HTML content files [mandatory] -->
<item id="titlepage" href="titlepage.xhtml" media-type="application/xhtml+xml"/>
<item id="item_tocstart" media-type="application/xhtml+xml" href="tocstart.html"></item>
{% for folder in sidebar %}
<item id="item_{{folder.jurl | remove: "/" | remove: ".html" }}" media-type="application/xhtml+xml" href="{{folder.jurl | remove: "/" }}"></item>
{% for folderitem in folder.folderitems %}
{% if folderitem.title %}
{% unless folderitem.type == "web" %}
<item id="item_{{folderitem.jurl | remove: "/" | remove: ".html" }}" media-type="application/xhtml+xml" href="{{folderitem.jurl | remove: "/" }}"></item>
{% endunless %}
{% endif %}
{% for subfolder in folderitem.subfolders %}
<item id="item_{{subfolder.jurl | remove: "/" | remove: ".html" }}" media-type="application/xhtml+xml" href="{{subfolder.jurl | remove: "/" }}"></item>
{% for subfolderitem in subfolder.subfolderitems %}
{% if subfolderitem.title %}
{% unless subfolderitem.type == "web" %}
<item id="item_{{subfolderitem.jurl | remove: "/" | remove: ".html" }}" media-type="application/xhtml+xml" href="{{subfolderitem.jurl | remove: "/" }}"></item>
{% endunless %}
{% endif %}
{% for subsubfolder in subfolderitem.subsubfolders %}
<item id="item_{{subsubfolder.jurl | remove: "/" }}" media-type="application/xhtml+xml" href="{{subsubfolder.jurl | remove: "/" }}"></item>
{% for subsubfolderitem in subsubfolder.subsubfolderitems %}
{% if subsubfolderitem.title %}
{% unless subsubfolderitem.type == "web" %}
<item id="item_{{subsubfolderitem.jurl | remove: "/" | remove: ".html" }}" media-type="application/xhtml+xml" href="{{subsubfolderitem.jurl | remove: "/" }}"></item>
{% endunless %}
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}
{% comment %}
(This section isn't necessary.)
<!-- IMAGES -->
{% assign image_files = site.static_files | where: "image", true %}
{% for myimage in image_files %}
{% unless myimage.extname contains "svg" %}
<item id="image{% increment imageCounter %}" media-type="image/{{myimage.extname | remove: "." }}" href="images{{ myimage.path | remove: "https://s3.us-west-1.wasabisys.com/idbwmedia.com/images/api" }}"/>
{% endunless %}
{% endfor %}
{% endcomment %}
<!-- stylesheets -->
<item id="css" href="assets/css/kindle.css" media-type="text/css"/>
<item id="css_syntax" href="assets/css/syntax.css" media-type="text/css"/>
<!-- table of contents [mandatory] -->
<item id="My_Table_of_Contents" media-type="application/x-dtbncx+xml" href="docapis.ncx"/>
<!-- cover image [mandatory] -->
<item id="My_Cover" media-type="image/png" href="images/{{site.cover_image}}"/>
</manifest>
<!--
Spine:
Following manifest, there must be one and only one spine element, which contains one
or more itemref elements. Each itemref references an document designated
in the manifest. The order of the itemref elements organizes the associated content
files into the linear reading order of the publication.
The toc attribute refers to the id ref of the NCX file specified in the manifest.
For detailed info visit:
http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#Section2.4
http://www.niso.org/workrooms/daisy/Z39-86-2005.html#NCX
-->
<spine toc="My_Table_of_Contents">
<!-- the spine defines the linear reading order of the course -->
{% for folder in sidebar %}
<itemref idref="item_{{folder.jurl | remove: "/" | remove: ".html" }}"/>
{% for folderitem in folder.folderitems %}
{% if folderitem.title %}
{% unless folderitem.type == "web" %}
<itemref idref="item_{{folderitem.jurl | remove: "/" | remove: ".html" }}"/>
{% endunless %}
{% endif %}
{% for subfolder in folderitem.subfolders %}
<itemref idref="item_{{subfolder.jurl | remove: "/" | remove: ".html" }}"/>
{% for subfolderitem in subfolder.subfolderitems %}
{% if subfolderitem.title %}
{% unless subfolderitem.type == "web" %}
<itemref idref="item_{{subfolderitem.jurl | remove: "/" | remove: ".html" }}"/>
{% endunless %}
{% endif %}
{% for subsubfolder in subfolderitem.subsubfolders %}
<itemref idref="item_{{subsubfolder.jurl | remove: "/" | remove: ".html" }}"/>
{% for subsubfolderitem in subsubfolder.subsubfolderitems %}
{% if subsubfolderitem.title %}
{% unless subsubfolderitem.type == "web" %}
<itemref idref="item_{{doc.subsubfolderitem | remove: "/" | remove: ".html" }}"/>
{% endunless %}
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}
</spine>
<!--
Guide:
Within the package there may be one guide element, containing one or more reference elements.
The guide element identifies fundamental structural components of the publication, to enable
Reading Systems to provide convenient access to them.
For detailed info visit: http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#Section2.6
The Kindle reading system support two special guide items which are both mandatory.
type="toc" [mandatory]: a link to the HTML table of contents
type="text" [mandatory]: a link to where the content of the course starts (typically after the front matter)
Kindle reading platforms need both thede guid items to provide a consistent user enxperience to the user.
It is good practice to include both a logical table of contents (NCX) and an HTML table of contents
(made of hyperlinks). The NCX enables various advanced navigation features but the HTML table of
contents can easily be discovered by the user by paging through the book. Both are useful.
-->
<guide>
<reference type="toc" title="Table of Contents" href="tocstart.html"></reference>
<reference type="text" title="Table of Contents" href="tocstart.html"></reference>
</guide>
</package>