|
|
#1 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 365
Karma: 518
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
<u> fails EpubCheck
I just had a failure on EpubCheck (5.3.0) due to some underlined text marked up with the <u> </u> tags in an epub2 file.
Code:
Col: 38: ERROR(RSC-005): Error while parsing file: element "u" not allowed anywhere; expected the element end-tag, text or element "a", "abbr", "acronym", "applet", "b", "bdo", "big", "br", "cite", "code", "del", "dfn", "em", "i", "iframe", "img", "ins", "kbd", "map", "noscript", "ns:svg", "object", "q", "samp", "script", "small", "span", "strong", "sub", "sup", "tt" or "var" (with xmlns:ns="http://www.w3.org/2000/svg") Sigil still inserts these tags as formatting for underlining: in Format > Underline. Has there been a change in epub spec? Should Sigil add a warning not to use <u> in epub2 files? |
|
|
|
|
|
#2 | |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,675
Karma: 6774048
Join Date: Nov 2009
Device: many
|
No, the u tag is valid. It was briefly dropped/deprecated before html5 but saner minds prevailed and it was kept.
If you prefer to use a different tag, then create and use a clip. Quote:
Perhaps you are using an older version of epubcheck? Or maybe epubcheck is holding to the XHtml 1.1 spec too literally. Either way you can use a span with a class the does underlining and create your own clip if you want. Not sure how much longer support for epub2 will remain. Even the original spec is hard to find anymore! Last edited by KevinH; Yesterday at 10:41 AM. |
|
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,675
Karma: 6774048
Join Date: Nov 2009
Device: many
|
I took a look at the Sigil 0.8 branch which was before any epub3 support was added to Sigil at all, and the code back at the height of epub2 used the u tag and epubcheck at the time and our own syntax checker Flightcrew (now retired) had no problems with it at all.
My guess is this is an epubcheck bug being overly literal with changes from Xhtml 1.0 to XHtml 1.1 when the u tag was deprecated but never removed. Also not sure how maintained the epub2 specific code in epubcheck really is anymore? My guess is no one there really cares about epub2 anymore when they are resource constrained just trying to support epub3. So maybe just bitrot? So if newer epubcheck now objects to the u tag under epub2, and you are constantly editing epub2s, I would just use my own clip. Last edited by KevinH; Yesterday at 11:01 AM. |
|
|
|
|
|
#4 | |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 365
Karma: 518
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Quote:
I've never used the <u> tags for underlining - any time I've wanted to underline, I've used CSS, but on this occasion, a friend asked me to look at his epub2 book and the first thing I did was to run it thro the epubcheck plugin. The error message surprised me. When I found that <u> provoked an error, I checked in an epub3 book and found that it passed in epub3. Not a problem for me and probably of little interest to others since epub3 is gradually taking over. Last edited by philja; Yesterday at 11:07 AM. |
|
|
|
|
|
|
#5 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,675
Karma: 6774048
Join Date: Nov 2009
Device: many
|
According to the XHtml 1.1 schema, they removed b, i, u, and a few other tags because they felt they were purely styling, and so did not understand that semantically there are times for an underline to not mean anything specific (ie not a title, etc). This got immediately reversed in html5 as there were legitimate meaning for those tags.
So fwiw, you may run into similar issues with epub2 with b and i tag usage as well although they are more common and may have exceptions. Did that epub2 by chance use a doctype that specified xhtml 1.0 or use the word transitional at all? Both would have allowed the u tag. Last edited by KevinH; Yesterday at 11:29 AM. |
|
|
|
| Advert | |
|
|
|
|
#6 | |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 365
Karma: 518
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Quote:
Last edited by philja; Yesterday at 11:37 AM. |
|
|
|
|
|
|
#7 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,675
Karma: 6774048
Join Date: Nov 2009
Device: many
|
Thanks for that info. Even an old spec like epub2 keeps changing.
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Cover Image required by iTunes in the GUIDE, fails epubcheck 3 | Oxford-eBooks | ePub | 5 | 12-09-2011 01:17 PM |
| Epub works fine on Reader, fails epubcheck spectacularly | jmatthew | ePub | 3 | 01-05-2011 06:03 AM |
| Calibre epub works fine on Reader, fails epubcheck spectacularly | jmatthew | Calibre | 2 | 01-04-2011 03:12 PM |
| epub date error fails epubcheck 1.05 | dkata | Calibre | 2 | 09-13-2010 04:21 AM |
| Web-based epubcheck upgraded to epubcheck 1.0.5 | kjk | ePub | 4 | 02-09-2010 09:53 PM |