Skip to content

Commit 6a3d2a6

Browse files
committed
feat: "xmp" is no longer a valid package link property
The following entries were removed from the metadata link vocabulary in EPUB 3.3, due to low usage report: - the "acquire" relationship - the "xmp" property This commit removes the "xmp" from the link property vocabulary, so any use of it will be reported as an error. It keeps the "acquire" property in the relationship vocabulary, for backward compatibility notably with the EPUB Previews specification were it is defined. Close #1457
1 parent 2c76420 commit 6a3d2a6

File tree

5 files changed

+32
-25
lines changed

5 files changed

+32
-25
lines changed

src/main/java/com/adobe/epubcheck/vocab/PackageVocabs.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ public static enum ITEMREF_PROPERTIES
8282

8383
public static enum LINKREL_PROPERTIES implements PropertyStatus
8484
{
85-
ACQUIRE,
85+
ACQUIRE, // note: no longer defined in EPUB 3.3, but still accepted for
86+
// backward compatibility with the EPUB Previews specification
8687
ALTERNATE,
8788
MARC21XML_RECORD(DEPRECATED),
8889
MODS_RECORD(DEPRECATED),
@@ -123,7 +124,6 @@ public boolean isDeprecated()
123124
public static enum LINK_PROPERTIES
124125
{
125126
ONIX,
126-
XMP;
127127
}
128128

129129
private PackageVocabs()

src/main/resources/com/adobe/epubcheck/messages/MessageBundle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ OPF_086_SUG.marc21xml-record=the "record" keyword and the media-type "applicatio
190190
OPF_086_SUG.mods-record=the "record" keyword and the media-type "application/mods+xml"
191191
OPF_086_SUG.onix-record=the "record" keyword with the properties attribute value "onix"
192192
OPF_086_SUG.xml-signature=no signature-identifying link
193-
OPF_086_SUG.xmp-record=the "record" keyword with the properties attribute value "xmp"
193+
OPF_086_SUG.xmp-record=the "record" keyword
194194
OPF_086b=epub:type value "%1$s" is deprecated. Consider using %2$s instead.
195195
OPF_086b_SUG.default=a custom prefixed value
196196
OPF_086b_SUG.annoref=open annotations
Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<package xmlns="http://www.idpf.org/2007/opf" version="3.0" xml:lang="en" unique-identifier="q">
3-
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
4-
<dc:title id="title">Minimal EPUB 3.0</dc:title>
5-
<dc:language>en</dc:language>
6-
<dc:identifier id="q">NOID</dc:identifier>
7-
<meta property="dcterms:modified">2017-06-14T00:00:01Z</meta>
8-
<link href="file:example" rel="acquire" media-type="text/html"/>
9-
</metadata>
10-
<manifest>
11-
<item id="content_001" href="content_001.xhtml" media-type="application/xhtml+xml"/>
12-
<item id="nav" href="nav.xhtml" media-type="application/xhtml+xml" properties="nav"/>
13-
</manifest>
14-
<spine>
15-
<itemref idref="content_001" />
16-
</spine>
17-
</package>
2+
<package xmlns="http://www.idpf.org/2007/opf" version="3.0" xml:lang="en" unique-identifier="q"
3+
prefix="test: https://example.org">
4+
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
5+
<dc:title id="title">Minimal EPUB 3.0</dc:title>
6+
<dc:language>en</dc:language>
7+
<dc:identifier id="q">NOID</dc:identifier>
8+
<meta property="dcterms:modified">2017-06-14T00:00:01Z</meta>
9+
<link href="file:example" rel="test:rel" media-type="text/html"/>
10+
</metadata>
11+
<manifest>
12+
<item id="content_001" href="content_001.xhtml" media-type="application/xhtml+xml"/>
13+
<item id="nav" href="nav.xhtml" media-type="application/xhtml+xml" properties="nav"/>
14+
</manifest>
15+
<spine>
16+
<itemref idref="content_001"/>
17+
</spine>
18+
</package>

src/test/resources/epub3/D-vocabularies/files/link-rel-record-properties-valid.opf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
<dc:identifier id="uid">NOID</dc:identifier>
88
<meta property="dcterms:modified">2019-01-01T12:00:00Z</meta>
99
<link rel="record" href="onix.xml" media-type="application/xml" properties="onix"/>
10-
<link rel="record" href="xmp.xml" media-type="application/xml" properties="xmp"/>
1110
<link rel="record" href="other.xml" media-type="application/xml" properties="my:type"/>
1211
</metadata>
1312
<manifest>

src/test/resources/epub3/D-vocabularies/metadata-link.feature

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ Feature: EPUB 3 — Vocabularies — Metadata link vocabulary
1515

1616
#### D.4.1.1 acquire
1717

18-
@spec @xref:sec-acquire
1918
Scenario: an 'acquire' link can identify the full version of the publication
19+
Note:
20+
the 'acquire' relationship was removed in EPUB 3.3:
21+
see https://github.com/w3c/epub-specs/issues/2489
22+
it is still accepted, for backward compatibility.
2023
When checking file 'link-rel-acquire-valid.opf'
2124
Then no errors or warnings are reported
2225

@@ -69,10 +72,6 @@ Feature: EPUB 3 — Vocabularies — Metadata link vocabulary
6972
Then error OPF-094 is reported
7073
And no other errors or warnings are reported
7174

72-
Scenario: a 'record' link type can be further identified with a 'properties' attribute
73-
When checking file 'link-rel-record-properties-valid.opf'
74-
And no errors or warnings are reported
75-
7675
@spec @xref:sec-record
7776
Scenario: a 'record' link cannot refine another property or resource
7877
When checking file 'link-rel-record-refines-error.opf'
@@ -117,3 +116,11 @@ Feature: EPUB 3 — Vocabularies — Metadata link vocabulary
117116
And error OPF-093 is reported
118117
# note: 'media-type' is now required, even on deprecated properties
119118
And no other errors or warnings are reported
119+
120+
121+
### D.4.2 Link properties
122+
123+
@spec @xref:sec-link-properties
124+
Scenario: a 'record' link type can be further identified with a 'properties' attribute
125+
When checking file 'link-rel-record-properties-valid.opf'
126+
And no errors or warnings are reported

0 commit comments

Comments
 (0)