google-code-export / epubcheck

Automatically exported from code.google.com/p/epubcheck
MIT License
0 stars 0 forks source link

Some problems with (X)HTML 5 specification #274

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
VERSION:

3.0

STEPS TO REPRODUCE:

1. check with epubcheck the attached file (it's the printable version of the 
"autism" page of wikipedia, converted to epub with Calibre)
2. read the errors ^^

RESULT:

epubcheck reports the errors:

a. attribute "class" not allowed here [in "html" tags]
b. element "script" missing required attribute "type"
c. value of attribute "dir" is invalid ["auto"]
d. attribute "srcset" not allowed here [in "img" tags]
e. attribute "role" not allowed here [in "div" tags]

EXPECTED:

None of these errors should be displayed. In (X)HTML 5: 

a. "class" attribute is allowed in any tag
b. attribute "type" is no longer required for "script" tags
c. attribute "dir" can have value "auto"
d. "srcset" is a proposed html extension for images: 
http://www.w3.org/html/wg/drafts/srcset/w3c-srcset/
e. "role" attribute seems to be reintroduced in HTML 5: 
http://www.w3.org/TR/role-attribute/

Original issue reported on code.google.com by lucasmal...@gmail.com on 30 May 2013 at 11:15

Attachments:

GoogleCodeExporter commented 9 years ago
You generated an EPUB 2 containing XHTML 1.1 content using Calibre, so all the 
errors are valid.

You need to convert the content to EPUB3/XHTML5 if you want it to validate as 
such.

Original comment by mgarrish on 25 Jun 2013 at 2:16

GoogleCodeExporter commented 9 years ago
Right. In this case epubcheck, I think, should alert about the inconsistency 
between the epub version and the doctype of XHTML files, since it's preferable 
that you'll convert the epub 2 to an epub 3 instead of convert all xhtml 5 
documents to a previous xhtml specification.

In theory this is another issue, you can close this bug and open another one if 
you want :)

Original comment by elbar...@gmail.com on 25 Jun 2013 at 7:13

GoogleCodeExporter commented 9 years ago
But no doctype was specified in these files that I found, so epubcheck is doing 
exactly what it should for an epub declared as 2.0 in the OPF.

If the html5 doctype had been specified, then I agree it would be useful to at 
least report an unexpected doctype.

Original comment by mgarrish on 25 Jun 2013 at 12:19

GoogleCodeExporter commented 9 years ago
Well, the fact the doctype is removed is a calibre bug. Anyway I think 
epubcheck should alert you the doctype is missing, since html 5 specs requires 
it: 
http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#the-doct
ype

Original comment by elbar...@gmail.com on 7 Jul 2013 at 11:23

GoogleCodeExporter commented 9 years ago
THIS ISSUE MOVED TO GITHUB:
https://github.com/IDPF/epubcheck/issues/

Original comment by rdeltour@gmail.com on 7 Nov 2013 at 10:49