Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 11-23-2022, 09:17 PM   #1
Gregg Bell
Gregg Bell
Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.
 
Gregg Bell's Avatar
 
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!
Attached Thumbnails
Click image for larger version

Name:	2022-11-23 19_27_29-ThePerfectLawyer11.23.22.epub - epub2.0 - Sigil [std]FlightCrew.png
Views:	90
Size:	70.1 KB
ID:	197968  
Gregg Bell is offline   Reply With Quote
Old 11-23-2022, 09:54 PM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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.
KevinH is online now   Reply With Quote
Advert
Old 11-24-2022, 12:54 AM   #3
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,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Gregg Bell View Post
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?
Yes. 4.2.5 is the EPUBCheck version. 0.4.6.2 is the plugin version. (The plugin runs EPUBCheck in the background.)
Doitsu is offline   Reply With Quote
Old 11-25-2022, 02:12 PM   #4
Gregg Bell
Gregg Bell
Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.
 
Gregg Bell's Avatar
 
Posts: 2,264
Karma: 3917588
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
Quote:
Originally Posted by KevinH View Post
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.
Fab, Kevin. Thank you very much.

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">
Thanks.

Last edited by Gregg Bell; 11-25-2022 at 02:23 PM. Reason: Additional question.
Gregg Bell is offline   Reply With Quote
Old 11-25-2022, 02:13 PM   #5
Gregg Bell
Gregg Bell
Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.
 
Gregg Bell's Avatar
 
Posts: 2,264
Karma: 3917588
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
Quote:
Originally Posted by Doitsu View Post
Yes. 4.2.5 is the EPUBCheck version. 0.4.6.2 is the plugin version. (The plugin runs EPUBCheck in the background.)
Thanks, Doitsu.
Gregg Bell is offline   Reply With Quote
Advert
Old 11-25-2022, 02:35 PM   #6
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Gregg Bell View Post
1) Which is optimal, removing the lang attribute or making them all say "en-US"?
Make everything just say en-US:

Code:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
The problem in Post #1 was you accidentally had 1 "en-us" + 1 "en-US".

- - -

Side Note: What this is saying is:
  • This HTML is "US/American English"!

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".
Tex2002ans is offline   Reply With Quote
Old 11-25-2022, 03:08 PM   #7
Gregg Bell
Gregg Bell
Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.
 
Gregg Bell's Avatar
 
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">
instead of

Code:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
And when I ran Flight Crew, there were no errors, so it would seem to me that is optimal. Is there a reason you think

Code:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-US">
is preferable to

Code:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
?
Gregg Bell is offline   Reply With Quote
Old 11-25-2022, 03:40 PM   #8
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Epubcheck is the only one that matters, because it's:
  • The only checker actual stores (B&N, Amazon, Kobo, etc.) use.
  • It's following the actual EPUB specs.
  • It's consistently updated/maintained.

FlightCrew was just from the early days of Sigil to help:
  • validate + catch some basic errors in one-button press.
  • jump to the exact line # by double-clicking on the error.

Now that you have Doitsu's fantastic plugin, that lets you easily run epubcheck just like you used to run FlightCrew.

- - -

So:
  • If epubcheck complains, definitely take a look + fix the problem.
  • If FlightCrew complains, take a closer look. It may or may not be an actual issue.

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.
Tex2002ans is offline   Reply With Quote
Old 11-25-2022, 05:07 PM   #9
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
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.
KevinH is online now   Reply With Quote
Old 11-25-2022, 06:05 PM   #10
Gregg Bell
Gregg Bell
Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.Gregg Bell ought to be getting tired of karma fortunes by now.
 
Gregg Bell's Avatar
 
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.
Gregg Bell is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 08:39 AM.


MobileRead.com is a privately owned, operated and funded community.