Skip to content

Commit

Permalink
fix: report duplicate landmarks nav entries as ERROR
Browse files Browse the repository at this point in the history
They were previously reported as WARNING.

Close #298
  • Loading branch information
rdeltour committed Mar 13, 2019
1 parent 05e5ac2 commit d7be97c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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</assert>
]) le 1">Another landmark was found with the same epub:type and same reference to '<value-of select="$current_href_normalized"/>'</assert>
</rule>
</pattern>

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/adobe/epubcheck/nav/NavCheckerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down

0 comments on commit d7be97c

Please sign in to comment.