From d7be97c52ef6941c9f686331dfb99b7fdd36c04c Mon Sep 17 00:00:00 2001 From: Romain Deltour Date: Wed, 13 Mar 2019 01:50:00 +0100 Subject: [PATCH] fix: report duplicate landmarks nav entries as ERROR They were previously reported as WARNING. Close #298 --- .../resources/com/adobe/epubcheck/schema/30/epub-nav-30.sch | 2 +- src/test/java/com/adobe/epubcheck/nav/NavCheckerTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/epub-nav-30.sch b/src/main/resources/com/adobe/epubcheck/schema/30/epub-nav-30.sch index 452b52c2f..a51a45ba3 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/epub-nav-30.sch +++ b/src/main/resources/com/adobe/epubcheck/schema/30/epub-nav-30.sch @@ -38,7 +38,7 @@ count(ancestor::html:nav//html:ol//html:a[ tokenize(lower-case(@epub:type),'\s+') = $current_type_normalized and normalize-space(lower-case(@href)) = $current_href_normalized - ]) le 1">WARNING: Duplicate 'a' elements with the same 'epub:type' and 'href' attributes inside 'landmarks' nav element + ]) le 1">Another landmark was found with the same epub:type and same reference to '' diff --git a/src/test/java/com/adobe/epubcheck/nav/NavCheckerTest.java b/src/test/java/com/adobe/epubcheck/nav/NavCheckerTest.java index 9c5f54ad5..509f2e785 100644 --- a/src/test/java/com/adobe/epubcheck/nav/NavCheckerTest.java +++ b/src/test/java/com/adobe/epubcheck/nav/NavCheckerTest.java @@ -187,7 +187,7 @@ public void testValidateDocumentNavLandmarks002() public void testValidateDocumentNavLandmarksDuplicates() { // Multiple occurrences of the 'landmarks' nav element - Collections.addAll(expectedWarnings, MessageId.RSC_017, MessageId.RSC_017); + Collections.addAll(expectedErrors, MessageId.RSC_005, MessageId.RSC_005); testValidateDocument("invalid/nav-landmarks-duplicates.xhtml"); }