-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update checking of the package rendering vocabulary
- deprecated properties are now reported as `OPF-086`, like for other deprecated properties, instead of `RSC-017`. This means the check relies on the `Property#isDeprecated` facility, instead of custom Schematron code. - deprecated property value is checked in custom Java code the `OPFHandler30#processMeta()` method. - verify that custom properties cannot be defined using the reserved "rendition" prefix. A new feature file is added for this single test, to match the spec section ordering. Fix #1327
- Loading branch information
Showing
6 changed files
with
135 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 65 additions & 12 deletions
77
src/main/java/com/adobe/epubcheck/vocab/RenditionVocabs.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/test/resources/epub3/D-vocabularies/files/rendition-property-unknown-error.opf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<package xmlns="http://www.idpf.org/2007/opf" version="3.0" unique-identifier="uid" | ||
xmlns:dc="http://purl.org/dc/elements/1.1/"> | ||
<metadata> | ||
<dc:identifier id="uid">NOID</dc:identifier> | ||
<dc:title>Title</dc:title> | ||
<dc:language>en</dc:language> | ||
<meta property="dcterms:modified">2019-01-01T12:00:00Z</meta> | ||
<meta property="rendition:unknown">error</meta> | ||
</metadata> | ||
<manifest> | ||
<item id="t001" href="contents.xhtml" properties="nav" media-type="application/xhtml+xml"/> | ||
</manifest> | ||
<spine> | ||
<itemref idref="t001"/> | ||
</spine> | ||
</package> |
24 changes: 24 additions & 0 deletions
24
src/test/resources/epub3/D-vocabularies/package-rendering-vocab.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Feature: EPUB 3 — Vocabularies — Package rendering vocabulary | ||
|
||
|
||
Checks conformance to the "Package rendering vocabulary" section of the EPUB 3.3 specification: | ||
https://www.w3.org/TR/epub-33/#app-rendering-vocab | ||
|
||
|
||
Background: | ||
Given EPUB test files located at '/epub3/D-vocabularies/files/' | ||
And EPUBCheck with default settings | ||
|
||
# Note: | ||
# The properties themselves are tested in the "layout.feature" file, | ||
# since all the properties are defined in that section and not in the | ||
# vocabulary appendix. | ||
|
||
# D.5.1 Package rendering vocabulary | ||
|
||
@spec @xref:sec-rendering-custom-properties | ||
Scenario: Report a custom rendition property using the 'rendition' prefix | ||
When checking file 'rendition-property-unknown-error.opf' | ||
Then error OPF-027 is reported | ||
And no other errors or warnings are reported | ||
|