File tree Expand file tree Collapse file tree 4 files changed +8
-7
lines changed
main/java/com/adobe/epubcheck/xml
java/com/adobe/epubcheck/ocf Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,10 @@ public void process()
162162 report .message (MessageId .PKG_008 , EPUBLocation .of (context ), context .path );
163163 } catch (SAXException e )
164164 {
165- report .message (MessageId .RSC_005 , EPUBLocation .of (context ), e .getMessage ());
165+ // All errors should have already been reported by the error handler
166+ if (report .getFatalErrorCount () == 0 ) {
167+ report .message (MessageId .RSC_016 , EPUBLocation .of (context ), e .getMessage ());
168+ }
166169 }
167170 }
168171
Original file line number Diff line number Diff line change @@ -151,14 +151,16 @@ public void testRetrieveVersionNoVersionAttribute()
151151 @ Test
152152 public void testRetrieveVersionNoEqualSign ()
153153 {
154- Collections .addAll (expectedErrors , MessageId .RSC_005 , MessageId .RSC_005 );
154+ Collections .addAll (expectedErrors , MessageId .RSC_005 );
155+ Collections .addAll (expectedFatals , MessageId .RSC_016 );
155156 retrieveData ("noEqual.opf" );
156157 }
157158
158159 @ Test
159160 public void testRetrieveVersionValueWithoutQuotes ()
160161 {
161- Collections .addAll (expectedErrors , MessageId .RSC_005 , MessageId .RSC_005 );
162+ Collections .addAll (expectedErrors , MessageId .RSC_005 );
163+ Collections .addAll (expectedFatals , MessageId .RSC_016 );
162164 retrieveData ("valueWithoutQuotes.opf" );
163165 }
164166
Original file line number Diff line number Diff line change 392392 Scenario : a not well-formed Package Document is reported
393393 When checking file 'conformance-xml-malformed-error.opf'
394394 Then fatal error RSC-016 is reported (parsing error)
395- And error RSC-005 is reported (schema error)
396395 And no other errors or warnings are reported
397396
398397 @spec @xref:sec-xml-constraint
399398 Scenario : using a not-declared namespace is not allowed
400399 When checking file 'conformance-xml-undeclared-namespace-error.opf'
401400 Then fatal error RSC-016 is reported (parsing error)
402- And error RSC-005 is reported (schema error)
403401 And no other errors or warnings are reported
404402
405403 Scenario : Verify an attribute value with leading/trailing whitespace is allowed (issue 332)
Original file line number Diff line number Diff line change @@ -91,14 +91,12 @@ Feature: EPUB 3 — Content Documents — XHTML
9191 Scenario : Report entity references not ending with a semicolon
9292 When checking document 'entities-no-semicolon-error.xhtml'
9393 Then fatal error RSC-016 is reported
94- And error RSC-005 is reported
9594 And the message contains 'must end with the \' ;\' delimiter'
9695 And no other errors or warnings are reported
9796
9897 Scenario : Report unknown entity references
9998 When checking document 'entities-unknown-error.xhtml'
10099 Then fatal error RSC-016 is reported
101- And error RSC-005 is reported
102100 And the message contains 'was referenced, but not declared'
103101 And no other errors or warnings are reported
104102
You can’t perform that action at this time.
0 commit comments