View Single Post
Old 02-11-2018, 12:36 PM   #52
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,755
Karma: 24032915
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by KevinH View Post
We should be able to add an xmlns definition to the html tag even for epub2 to make this legal.
Theoretically, this should work, but epubcheck seems to ignore custom namespaces. For example, it's also not possible to use epub:type attributes in epub2 books even if you add a xmlns:epub="http://www.idpf.org/2007/ops" namespace. (BTW, I also tested this with other tags.)

BTW, I used the following epub2 XHTML test file:
Spoiler:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:aaa="http://www.w3.org/2005/07/aaa" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
<title></title>
</head>
<body epub:type="chapter" aaa:role="doc-chapter">
<p></p>
</body>
</html>


and got the following error messages:

Quote:
ERROR (RSC-005) at "meta2_test.epub/OEBPS/Text/Section0001.xhtml" (line 9, col 50):
Error while parsing file 'attribute "epub:type" not allowed here; expected attribute "class", "dir", "id", "lang", "style", "title" or "xml:lang"'.

ERROR (RSC-005) at "meta2_test.epub/OEBPS/Text/Section0001.xhtml" (line 9, col 50):
Error while parsing file 'attribute "aaa:role" not allowed here; expected attribute "class", "dir", "id", "lang", "style", "title" or "xml:lang"'.
Doitsu is offline   Reply With Quote