Skip to content

Commit

Permalink
feat: add new MO-only aside epub:type value
Browse files Browse the repository at this point in the history
The new `aside` value was added as a result of w3c/epub-specs#1226
  • Loading branch information
rdeltour committed Feb 25, 2019
1 parent ed6f1c4 commit 4404fff
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public static enum EPUB_TYPES implements PropertyStatus
ANNOREF(DEPRECATED),
ANNOTATION(DEPRECATED),
APPENDIX,
ASIDE(DISALLOWED_ON_CONTENT_DOCS),
ASSESSMENT,
BACKMATTER,
BIBLIOENTRY,
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/adobe/epubcheck/ops/OPSCheckerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ public void testEPUBTypeDeprecated()
@Test
public void testEPUBTypeDisallowed()
{
expectedErrors.addAll(Collections.nCopies(6, MessageId.OPF_087));
expectedErrors.addAll(Collections.nCopies(7, MessageId.OPF_087));
testValidateDocument("xhtml/invalid/epubtype-disallowed.xhtml", "application/xhtml+xml",
EPUBVersion.VERSION_3);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,10 @@ public void testValidateDocumentInvalidOverlay008_Issue568()
Collections.addAll(expectedErrors, MessageId.RSC_005);
testValidateDocument("invalid/overlay-008.smil");
}

@Test
public void testEPUBTypeAside()
{
testValidateDocument("valid/epubtype-aside.smil");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<smil version="3.0" xmlns="http://www.w3.org/ns/SMIL" xmlns:epub="http://www.idpf.org/2007/ops">
<body epub:type="aside">
<par id="par1">
<text src="chapter1.xhtml#sentence1"/>
<audio src="chapter1_audio.mp3" clipBegin="0s" clipEnd="10s"/>
</par>
</body>
</smil>
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@
<li epub:type="list-item">item</li>
</ul>
<figure epub:type="figure"> Figure </figure>
<aside epub:type="aside">
<h2>Aside</h2>
</aside>
</body>
</html>

0 comments on commit 4404fff

Please sign in to comment.