-
Notifications
You must be signed in to change notification settings - Fork 402
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow the 'glossary' manifest item property
The `glossary` manifest item property is defined in the EPUB dictionaries and Glossaries 1.0 specification: http://idpf.org/epub/dict/epub-dict.html#sec-2.5.3 This fix allows the property to be defined on XHTML manifest items when the content contains an element with a `glossary` `epub:type` attribute. Fixes #1170
- Loading branch information
Showing
15 changed files
with
142 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...ries/files/epub/glossary-single-package-property-not-defined-error/EPUB/content_001.xhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:epub="http://www.idpf.org/2007/ops"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Minimal EPUB</title> | ||
</head> | ||
<body> | ||
<h2>Glossary</h2> | ||
<section epub:type="glossary"> | ||
<dl> | ||
<dt id="term">term</dt> | ||
<dd>definition</dd> | ||
</dl> | ||
</section> | ||
</body> | ||
</html> |
14 changes: 14 additions & 0 deletions
14
...dictionaries/files/epub/glossary-single-package-property-not-defined-error/EPUB/nav.xhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en" lang="en"> | ||
<head> | ||
<meta charset="utf-8"/> | ||
<title>Minimal Nav</title> | ||
</head> | ||
<body> | ||
<nav epub:type="toc"> | ||
<ol> | ||
<li><a href="content_001.xhtml">content 001</a></li> | ||
</ol> | ||
</nav> | ||
</body> | ||
</html> |
17 changes: 17 additions & 0 deletions
17
...ctionaries/files/epub/glossary-single-package-property-not-defined-error/EPUB/package.opf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<package xmlns="http://www.idpf.org/2007/opf" version="3.0" xml:lang="en" unique-identifier="q"> | ||
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/"> | ||
<dc:title id="title">Minimal EPUB 3.0</dc:title> | ||
<dc:language>en</dc:language> | ||
<dc:identifier id="q">NOID</dc:identifier> | ||
<meta property="dcterms:modified">2017-06-14T00:00:01Z</meta> | ||
</metadata> | ||
<manifest> | ||
<item id="content_001" href="content_001.xhtml" media-type="application/xhtml+xml"/> | ||
<item id="nav" href="nav.xhtml" media-type="application/xhtml+xml" properties="nav"/> | ||
<item id="skm" href="search.xml" properties="glossary search-key-map" media-type="application/vnd.epub.search-key-map+xml"/> | ||
</manifest> | ||
<spine> | ||
<itemref idref="content_001" /> | ||
</spine> | ||
</package> |
8 changes: 8 additions & 0 deletions
8
...ictionaries/files/epub/glossary-single-package-property-not-defined-error/EPUB/search.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<search-key-map xml:lang="en" xmlns="http://www.idpf.org/2007/ops"> | ||
<search-key-group href="content_001.xhtml#term"> | ||
<match value="term"> | ||
<value value="term"/> | ||
</match> | ||
</search-key-group> | ||
</search-key-map> |
6 changes: 6 additions & 0 deletions
6
...ries/files/epub/glossary-single-package-property-not-defined-error/META-INF/container.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<container xmlns="urn:oasis:names:tc:opendocument:xmlns:container" version="1.0"> | ||
<rootfiles> | ||
<rootfile full-path="EPUB/package.opf" media-type="application/oebps-package+xml"/> | ||
</rootfiles> | ||
</container> |
1 change: 1 addition & 0 deletions
1
.../epub-dictionaries/files/epub/glossary-single-package-property-not-defined-error/mimetype
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
application/epub+zip |
16 changes: 16 additions & 0 deletions
16
src/test/resources/epub-dictionaries/files/epub/glossary-single-valid/EPUB/content_001.xhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:epub="http://www.idpf.org/2007/ops"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Minimal EPUB</title> | ||
</head> | ||
<body> | ||
<h2>Glossary</h2> | ||
<section epub:type="glossary"> | ||
<dl> | ||
<dt id="term">term</dt> | ||
<dd>definition</dd> | ||
</dl> | ||
</section> | ||
</body> | ||
</html> |
14 changes: 14 additions & 0 deletions
14
src/test/resources/epub-dictionaries/files/epub/glossary-single-valid/EPUB/nav.xhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="en" lang="en"> | ||
<head> | ||
<meta charset="utf-8"/> | ||
<title>Minimal Nav</title> | ||
</head> | ||
<body> | ||
<nav epub:type="toc"> | ||
<ol> | ||
<li><a href="content_001.xhtml">content 001</a></li> | ||
</ol> | ||
</nav> | ||
</body> | ||
</html> |
17 changes: 17 additions & 0 deletions
17
src/test/resources/epub-dictionaries/files/epub/glossary-single-valid/EPUB/package.opf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<package xmlns="http://www.idpf.org/2007/opf" version="3.0" xml:lang="en" unique-identifier="q"> | ||
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/"> | ||
<dc:title id="title">Minimal EPUB 3.0</dc:title> | ||
<dc:language>en</dc:language> | ||
<dc:identifier id="q">NOID</dc:identifier> | ||
<meta property="dcterms:modified">2017-06-14T00:00:01Z</meta> | ||
</metadata> | ||
<manifest> | ||
<item id="content_001" href="content_001.xhtml" media-type="application/xhtml+xml" properties="glossary"/> | ||
<item id="nav" href="nav.xhtml" media-type="application/xhtml+xml" properties="nav"/> | ||
<item id="skm" href="search.xml" properties="glossary search-key-map" media-type="application/vnd.epub.search-key-map+xml"/> | ||
</manifest> | ||
<spine> | ||
<itemref idref="content_001" /> | ||
</spine> | ||
</package> |
8 changes: 8 additions & 0 deletions
8
src/test/resources/epub-dictionaries/files/epub/glossary-single-valid/EPUB/search.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<search-key-map xml:lang="en" xmlns="http://www.idpf.org/2007/ops"> | ||
<search-key-group href="content_001.xhtml#term"> | ||
<match value="term"> | ||
<value value="term"/> | ||
</match> | ||
</search-key-group> | ||
</search-key-map> |
6 changes: 6 additions & 0 deletions
6
src/test/resources/epub-dictionaries/files/epub/glossary-single-valid/META-INF/container.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<container xmlns="urn:oasis:names:tc:opendocument:xmlns:container" version="1.0"> | ||
<rootfiles> | ||
<rootfile full-path="EPUB/package.opf" media-type="application/oebps-package+xml"/> | ||
</rootfiles> | ||
</container> |
1 change: 1 addition & 0 deletions
1
src/test/resources/epub-dictionaries/files/epub/glossary-single-valid/mimetype
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
application/epub+zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters