From 348d1bb60227a537b9f757a1ad7f8c104332f37b Mon Sep 17 00:00:00 2001 From: Romain Deltour Date: Thu, 11 Jul 2019 18:52:06 +0200 Subject: [PATCH] feat: revert the spine/toc nav order check to a WARNING As agreed on the 2019-07-11 EPUB CG call: https://www.w3.org/2019/07/11-epub3cg-minutes.html Changes the behavior introduced in #999 Fixes #1036 --- .../com/adobe/epubcheck/messages/DefaultSeverities.java | 2 +- .../com/adobe/epubcheck/api/Epub30CheckExpandedTest.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/adobe/epubcheck/messages/DefaultSeverities.java b/src/main/java/com/adobe/epubcheck/messages/DefaultSeverities.java index 9b3cfc384..91397148f 100644 --- a/src/main/java/com/adobe/epubcheck/messages/DefaultSeverities.java +++ b/src/main/java/com/adobe/epubcheck/messages/DefaultSeverities.java @@ -154,7 +154,7 @@ private void initialize() severities.put(MessageId.NAV_008, Severity.USAGE); severities.put(MessageId.NAV_009, Severity.ERROR); severities.put(MessageId.NAV_010, Severity.ERROR); - severities.put(MessageId.NAV_011, Severity.ERROR); + severities.put(MessageId.NAV_011, Severity.WARNING); // NCX severities.put(MessageId.NCX_001, Severity.ERROR); diff --git a/src/test/java/com/adobe/epubcheck/api/Epub30CheckExpandedTest.java b/src/test/java/com/adobe/epubcheck/api/Epub30CheckExpandedTest.java index 3b405189b..66a43d3be 100644 --- a/src/test/java/com/adobe/epubcheck/api/Epub30CheckExpandedTest.java +++ b/src/test/java/com/adobe/epubcheck/api/Epub30CheckExpandedTest.java @@ -213,7 +213,7 @@ public void testValidateNav_TocInReadingOrder() public void testValidateNav_TocWrongOrderInSpine() { // test that toc nav links MUST be in spine order - expectedErrors.add(MessageId.NAV_011); + expectedWarnings.add(MessageId.NAV_011); testValidateDocument("invalid/nav-toc-unordered-spine"); } @@ -221,7 +221,7 @@ public void testValidateNav_TocWrongOrderInSpine() public void testValidateNav_TocWrongOrderOfFragments() { // test that toc nav links MUST be in document order - expectedErrors.addAll(Collections.nCopies(2, MessageId.NAV_011)); + expectedWarnings.addAll(Collections.nCopies(2, MessageId.NAV_011)); testValidateDocument("invalid/nav-toc-unordered-fragments"); } @@ -236,7 +236,7 @@ public void testValidateNav_PageListInReadingOrder() public void testValidateNav_PageListWrongOrderInSpine() { // test that page-list nav links MUST be in spine order - expectedErrors.add(MessageId.NAV_011); + expectedWarnings.add(MessageId.NAV_011); testValidateDocument("invalid/nav-page-list-unordered-spine"); } @@ -244,7 +244,7 @@ public void testValidateNav_PageListWrongOrderInSpine() public void testValidateNav_PageListWrongOrderOfFragments() { // test that page-list nav links MUST be in document order - expectedErrors.add(MessageId.NAV_011); + expectedWarnings.add(MessageId.NAV_011); testValidateDocument("invalid/nav-page-list-unordered-fragments"); }