File tree Expand file tree Collapse file tree 3 files changed +34
-2
lines changed
main/resources/com/adobe/epubcheck/schema/30 Expand file tree Collapse file tree 3 files changed +34
-2
lines changed Original file line number Diff line number Diff line change 287287 <let name =" ref" value =" ./normalize-space(@media-overlay)" />
288288 <let name =" item" value =" //opf:manifest/opf:item[normalize-space(@id) = $ref]" />
289289 <let name =" item-media-type" value =" normalize-space($item/@media-type)" />
290+ <let name =" media-type" value =" normalize-space(@media-type)" />
290291 <assert test =" $item-media-type = 'application/smil+xml'" >media overlay items must be of
291292 the "application/smil+xml" type (given type was "<value-of select =" $item-media-type"
292293 />")</assert >
294+ <assert test =" $media-type='application/xhtml+xml' or $media-type='image/svg+xml'"
295+ >The media-overlay attribute is only allowed on XHTML and SVG content documents.</assert >
293296 </rule >
294297 </pattern >
295298
322325 <rule context =" opf:meta[normalize-space(@property)='media:playback-active-class']" >
323326 <report test =" @refines" > @refines must not be used with the media:playback-active-class property</report >
324327 </rule >
325- </pattern >
326-
328+ </pattern >
329+
327330
328331
329332 <!-- EPUB 3.2 New Checks -->
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <package xmlns =" http://www.idpf.org/2007/opf" version =" 3.0" unique-identifier =" uid"
3+ xmlns:dc=" http://purl.org/dc/elements/1.1/" >
4+ <metadata >
5+ <dc : title >Title</dc : title >
6+ <dc : language >en</dc : language >
7+ <dc : identifier id =" uid" >NOID</dc : identifier >
8+ <meta property =" dcterms:modified" >2019-01-01T12:00:00Z</meta >
9+ <!-- Media Overlays Duration Properties -->
10+ <meta property =" media:duration" >0:01:30.200</meta >
11+ <meta refines =" #mo001" property =" media:duration" >0:01:30.200</meta >
12+ </metadata >
13+ <manifest >
14+ <item id =" t001" href =" contents.xhtml" properties =" nav" media-type =" application/xhtml+xml" media-overlay =" mo001" />
15+ <item id =" img001" href =" cover.jpg" media-type =" image/jpeg" media-overlay =" mo001" />
16+ <item id =" mo001" href =" mediaoverlay_001.smil" media-type =" application/smil+xml" />
17+ </manifest >
18+ <spine >
19+ <itemref idref =" t001" />
20+ </spine >
21+ </package >
Original file line number Diff line number Diff line change @@ -23,6 +23,12 @@ Feature: EPUB 3 ▸ Media Overlays ▸ Package Document Checks
2323 And the message contains 'must be of the "application/smil+xml" type'
2424 And no other errors or warnings are reported
2525
26+ Scenario : Report use of the media-overlay attribute on non-EPUB Content Documents
27+ When checking file 'mediaoverlays-non-contentdoc-error.opf'
28+ Then error RSC-005 is reported
29+ And the message contains 'media-overlay attribute is only allowed'
30+ And no other errors or warnings are reported
31+
2632 ## 3.5.2 Package Metadata
2733
2834 Scenario : the entire publication duration must be defined
@@ -36,6 +42,8 @@ Feature: EPUB 3 ▸ Media Overlays ▸ Package Document Checks
3642 Then error RSC-005 is reported
3743 And the message contains "item media:duration meta element not set"
3844 And no other errors or warnings are reported
45+
46+
3947
4048 # C. Media Overlays Metadata Vocabulary
4149 # see https://www.w3.org/publishing/epub32/epub-mediaoverlays.html#app-overlays-vocab
You can’t perform that action at this time.
0 commit comments