-
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.
feat: check that 'page-list' and 'landmarks' nav are flat lists
EPUB 3.3 clarifies that authors should not use nested lists for 'page-list' and 'landmarks' nav. This commit: - reports a schema warning for nested 'page-list' or 'landmarks' nav (implemented in schematron) - add tests Fix #1279
- Loading branch information
Showing
4 changed files
with
75 additions
and
8 deletions.
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
26 changes: 26 additions & 0 deletions
26
src/test/resources/epub3/files/navigation-document/nav-landmarks-nested-warning.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,26 @@ | ||
<!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> | ||
<nav epub:type="landmarks"> | ||
<h2>Guide</h2> | ||
<ol> | ||
<li><a epub:type="toc" href="#toc">Table of Contents</a> | ||
<ol> | ||
<li><a epub:type="loi" href="#index">Illustrations</a></li> | ||
</ol> | ||
</li> | ||
<li><a epub:type="bodymatter" href="content.html#bodymatter">Content</a></li> | ||
</ol> | ||
</nav> | ||
</body> | ||
</html> |
26 changes: 26 additions & 0 deletions
26
src/test/resources/epub3/files/navigation-document/nav-page-list-nested-warning.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,26 @@ | ||
<!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> | ||
<nav epub:type="page-list"> | ||
<h2>Pagebreaks of the print version, third edition</h2> | ||
<ol> | ||
<li><a href="chap1.xhtml#p1">Page 1</a> | ||
<ol> | ||
<li><a href="chap1.xhtml#p1-a">Page 1-a</a></li> | ||
</ol> | ||
</li> | ||
<li><a href="chap1.xhtml#p2">Page 2</a></li> | ||
</ol> | ||
</nav> | ||
</body> | ||
</html> |
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