Skip to content

Commit 035effa

Browse files
committed
fix: declaring prefixes for default vocabs is an error
This commit reverts `OPF-007b` to being an error. Fixes #1306
1 parent 1bae7f7 commit 035effa

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/main/java/com/adobe/epubcheck/messages/DefaultSeverities.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ private void initialize()
199199
severities.put(MessageId.OPF_006, Severity.ERROR);
200200
severities.put(MessageId.OPF_007, Severity.WARNING);
201201
severities.put(MessageId.OPF_007a, Severity.ERROR);
202-
severities.put(MessageId.OPF_007b, Severity.WARNING);
202+
severities.put(MessageId.OPF_007b, Severity.ERROR);
203203
severities.put(MessageId.OPF_008, Severity.ERROR);
204204
severities.put(MessageId.OPF_009, Severity.ERROR);
205205
severities.put(MessageId.OPF_010, Severity.ERROR);

src/test/java/com/adobe/epubcheck/vocab/VocabTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ public void testUnderscorePrefix()
375375
@Test
376376
public void testDefaultDeclaredPrefix()
377377
{
378-
expectedWarnings.add(MessageId.OPF_007b);
378+
expectedErrors.add(MessageId.OPF_007b);
379379
Map<String, Vocab> actual = testVocabs(
380380
"default: http://example.org/default# hello: http://example.org/hello#");
381381
assertThat(actual.entrySet().size(), is(PREDEF_VOCABS.keySet().size() + 1));

src/test/resources/epub3/D-vocabularies/vocabulary-association.feature

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ Feature: EPUB 3 — Vocabularies — Vocabulary association
2727

2828
@spec @xref:sec-prefix-attr
2929
Scenario: default vocabularies must not be assigned a prefix
30-
Note: This should be an error, but is currently reported as a warning
31-
See issue 522: https://github.com/w3c/epubcheck/issues/522
3230
When checking file 'property-prefix-declaration-default-vocabs-error.opf'
33-
Then warning OPF-007b is reported 4 times (once for each default vocabulary)
31+
Then error OPF-007b is reported 4 times (once for each default vocabulary)
3432
And no other errors or warnings are reported
3533

3634
@spec @xref:sec-prefix-attr

0 commit comments

Comments
 (0)