11-23-2022, 09:17 PM | #1 |
Gregg Bell
Posts: 2,264
Karma: 3917588
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
|
Four Sigil questions
Hello Sigil friends. Nice to be here again. Those of you who celebrate it: Happy Thanksgiving!
I downloaded Doitsu's latest EpubCheck 0.4.6.2 and uploaded it to my Sigil plugins. But when I run the EpubCheck, it starts by saying: 'Running epub check 4.2.5' Question #1. Is this normal? I ran a FlightCrew validation test on an .epub and got the same error on all the HTML files: https://imgur.com/a/reC8EFU (The image is also attached.) (BTW the same .epub passed Doitsu's EpubCheck.) Question #2. What do I need to do about this error? A while back I changed all my language things (sorry, don't know what to call them) in all my ebooks from: <html xmlns="http://www.w3.org/1999/xhtml"> to: <html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-US"> Question #3. Was this a good change? Lastly, I noticed that in the above bracketed things "en-us" and "en-US" are different. Question #4. Does it affect the epub functionality to leave it as it is or should I change the "en-us" to "en-US" ? Thank you! |
11-23-2022, 09:54 PM | #2 |
Sigil Developer
Posts: 7,631
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Q1 Answer I will leave to Doitsu or others.
Q2 Answer: According to epub2 official spec and schemas (very old now) "lang" is not an allowed attribute on the html tag but xml:lang is allowed and is recognized and takes precedence. I think it is safe to ignore those errors as that rule has been relaxed over the years but FC has not changed with that interpretation of the rules. Q3 Answer: yes marking the language is a good thing in general. And especially true if multiple languages are used in the book. Q4 Answer: To be safest, both xml:lang and lang should have the same value and the language region should be properly capitalized. So for epub2 either remove the lang attribute leaving just the xml:lang attribute or keep them (ignoring the errors from FC) and make them all say "en-US" so they match just to be safe. Last edited by KevinH; 11-24-2022 at 10:35 AM. |
Advert | |
|
11-24-2022, 12:54 AM | #3 |
Grand Sorcerer
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Yes. 4.2.5 is the EPUBCheck version. 0.4.6.2 is the plugin version. (The plugin runs EPUBCheck in the background.)
|
11-25-2022, 02:12 PM | #4 | |
Gregg Bell
Posts: 2,264
Karma: 3917588
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
|
Quote:
Two more follow-up questions please. 1) Which is optimal, removing the lang attribute or making them all say "en-US"? 2) If I remove the lang attribute, is the below exactly how it should be? Code:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> Last edited by Gregg Bell; 11-25-2022 at 02:23 PM. Reason: Additional question. |
|
11-25-2022, 02:13 PM | #5 |
Gregg Bell
Posts: 2,264
Karma: 3917588
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
|
|
Advert | |
|
11-25-2022, 02:35 PM | #6 | |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Code:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US"> - - - Side Note: What this is saying is:
According to the specs, best practices are capitalizing the country. While most programs would work perfectly fine with the lowercase version, always better to err on the side of the "more correcter way". |
|
11-25-2022, 03:08 PM | #7 |
Gregg Bell
Posts: 2,264
Karma: 3917588
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
|
Thanks, Tex, but I tested the .epub with
Code:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> Code:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US"> Code:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-US"> Code:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> |
11-25-2022, 03:40 PM | #8 |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Epubcheck is the only one that matters, because it's:
FlightCrew was just from the early days of Sigil to help:
Now that you have Doitsu's fantastic plugin, that lets you easily run epubcheck just like you used to run FlightCrew. - - - So:
Very simple (and correct) books, both of them will show 0 errors. If you are using much newer (or more complicated code), FlightCrew might complain, because that type of stuff may not have existed (or been expected) way back then. - - - Side Note: On marking up your book's language with HTML lang + xml:lang... you can follow all the same advice given previously in:
The only thing I'd do differently now compared to back then is... capitalizing that "en-us" -> "en-US". Last edited by Tex2002ans; 11-25-2022 at 03:43 PM. |
11-25-2022, 05:07 PM | #9 |
Sigil Developer
Posts: 7,631
Karma: 5433388
Join Date: Nov 2009
Device: many
|
I agree. Use both properly and ignore Flightcrew on this issue. In the future, for both epub2 and epub3 validation I strongly recommend using Doitsu's epubcheck plugin in Sigil for validation.
|
11-25-2022, 06:05 PM | #10 |
Gregg Bell
Posts: 2,264
Karma: 3917588
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
|
Many thanks, Tex and Kevin. I appreciate it.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sigil newbie dictionary questions | michaelbr | Sigil | 8 | 12-06-2020 09:41 AM |
Questions of developing Sigil. | The_book | Sigil | 6 | 03-03-2020 12:11 PM |
Questions about Sigil INI | GrannyGrump | Sigil | 19 | 08-01-2017 08:07 AM |
questions about Sigil plugins | Gregg Bell | Sigil | 4 | 02-05-2017 08:04 PM |
Sigil metadata code questions | authorava | Sigil | 2 | 01-24-2017 03:21 PM |