Skip to content

Commit d916df0

Browse files
committed
fix: allow flow content for ins and del XHTML 1.1 elements (EPUB 2.0.1)
See https://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_editmodule Fix #1522
1 parent 0573214 commit d916df0

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

src/main/resources/com/adobe/epubcheck/schema/20/rng/xhtml/edit.rng

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<define name="del">
66
<element name="del">
77
<ref name="del.attlist"/>
8-
<ref name="Inline.model"/>
8+
<ref name="Flow.model"/>
99
</element>
1010
</define>
1111

@@ -18,7 +18,7 @@
1818
<element name="ins">
1919
<ref name="Common.attrib"/>
2020
<ref name="ins.attlist"/>
21-
<ref name="Inline.model"/>
21+
<ref name="Flow.model"/>
2222
</element>
2323
</define>
2424

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4+
<head>
5+
<title>Minimal EPUB</title>
6+
</head>
7+
<body>
8+
<del datetime="2011-09-02">
9+
<h1>Title Old</h1>
10+
</del>
11+
<ins datetime="2011-09-02">
12+
<h1>Title New</h1>
13+
</ins>
14+
<p>Call me Ishmael.</p>
15+
</body>
16+
</html>

src/test/resources/epub2/ops-content-document-xhtml.feature

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ Feature: EPUB 2 ▸ Open Publication Structure ▸ XHTML Document Checks
7676
Scenario: Verify attributes allowed on `ins` and `del` are not restricted (issue 293)
7777
When checking document 'edit-attributes-valid.xhtml'
7878
Then no errors or warnings are reported
79+
80+
Scenario: Verify `ins` and `del` elements can contain block content
81+
See https://github.com/w3c/epubcheck/issues/1522
82+
When checking document 'edit-block-content-valid.xhtml'
83+
Then no errors or warnings are reported
7984

8085
### Identifiers
8186

0 commit comments

Comments
 (0)