Skip to content

Commit

Permalink
report non-matching identifiers in OPF and NCX as an error again
Browse files Browse the repository at this point in the history
resolves #669
refs #329
  • Loading branch information
tofi86 committed Oct 25, 2017
1 parent b9f3024 commit 515682d
Show file tree
Hide file tree
Showing 17 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static Map<MessageId, Severity> getDefaultSeverities()
map.put(MessageId.NAV_009, Severity.ERROR);

// NCX
map.put(MessageId.NCX_001, Severity.USAGE);
map.put(MessageId.NCX_001, Severity.ERROR);
map.put(MessageId.NCX_002, Severity.ERROR);
map.put(MessageId.NCX_003, Severity.USAGE);
map.put(MessageId.NCX_004, Severity.USAGE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public void testIssue329_IDSpaces()
@Test
public void testIssue329_NonMatchingId()
{
// expectedWarnings.add(MessageId.NCX_001); // Now USAGE
expectedErrors.add(MessageId.NCX_001);
testValidateDocument("invalid/ncx-uid-nomatch");
}

Expand Down
Binary file modified src/test/resources/20/epub/ContainerNotOPF20.epub
Binary file not shown.
Binary file modified src/test/resources/20/epub/EmptyDir20.epub
Binary file not shown.
Binary file modified src/test/resources/20/epub/MetaInfNotOPF20.epub
Binary file not shown.
Binary file modified src/test/resources/20/epub/Non8601Date20.epub
Binary file not shown.
Binary file modified src/test/resources/20/epub/NullDate20.epub
Binary file not shown.
Binary file modified src/test/resources/20/epub/OPFIllegalElement20.epub
Binary file not shown.
Binary file modified src/test/resources/20/epub/PageMap20.epub
Binary file not shown.
Binary file modified src/test/resources/20/epub/Test20.epub
Binary file not shown.
Binary file modified src/test/resources/20/epub/Unmanifested20.epub
Binary file not shown.
Binary file modified src/test/resources/20/epub/UnmanifestedGuideItems20.epub
Binary file not shown.
Binary file modified src/test/resources/20/epub/invalid/issue170.epub
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
version="2005-1"
xml:lang="en">
<head>
<meta name="dtb:uid" content="urn:uuid:4ADD6D78-8F7E-4BCB-BB03-EB07560F46E7"/>
<meta name="dtb:uid" content="urn:uuid:6179D963-C94E-459B-A7A4-4139D120998E"/>
<meta name="dtb:depth" content="1"/>
<meta name="dtb:totalPageCount" content="0"/>
<meta name="dtb:maxPageNumber" content="0"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://www.idpf.org/2007/opf" version="2.0" unique-identifier="uid">
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
<dc:identifier id="uid">urn:uuid:4ADD6D78-8F7E-4BCB-BB03-EB07560F46E7</dc:identifier>
<dc:identifier id="uid">urn:uuid:6179D963-C94E-459B-A7A4-4139D120998E</dc:identifier>
<dc:title>Lorem Ipsum - alt</dc:title>
<dc:language>la</dc:language>
<dc:date>2012-10-17</dc:date>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@
"id" : "ncx",
"fileName" : "OPS/toc.ncx",
"media_type" : "application/x-dtbncx+xml",
"compressedSize" : 326,
"uncompressedSize" : 624,
"compressedSize" : 329,
"uncompressedSize" : 642,
"compressionMethod" : "Deflated",
"checkSum" : "913b6f1c2783e126ab6b175bd8547e236d2736d9228503c1470e1213957d85e",
"checkSum" : "9e69dbe536e1f03e2447556f7159dec1b7eca4785f45436aa753313d5729b0a9",
"isSpineItem" : false,
"spineIndex" : null,
"isLinear" : false,
Expand Down

0 comments on commit 515682d

Please sign in to comment.