Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 03-21-2025, 07:22 PM   #16
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: 8,761
Karma: 5706256
Join Date: Nov 2009
Device: many
And some checkers want there to be an xml:lang attribute on the opf package tag as well as they use it to determine the language of the metadata itself.

But if the entire Book's language is specified by one dc:language tag, I am not sure why that is not enough for metadata as well. There are already alt:lang attributes if more than one metadata language is used.

Last edited by KevinH; 03-21-2025 at 07:29 PM.
KevinH is offline   Reply With Quote
Old 03-21-2025, 08:55 PM   #17
Bozzka
Member
Bozzka began at the beginning.
 
Posts: 16
Karma: 10
Join Date: May 2021
Location: Italy
Device: MacBook Air
Quote:
Originally Posted by Karellen View Post
That tag looks a bit messed up.
You have spaces around the en value which should be removed.
I am pretty sure tags need to be all lower case. Language should be language.
Try fixing that and the let us know what the error message is.

thanks for replying so quickly :-
I hope it's possible to paste something here...
as you can see there are no spaces
so...what do you think?

<package xmlns="http://www.idpf.org/2007/opf" version="3.0" unique-identifier="uuid_id" prefix="calibre: https://calibre-ebook.com">
<metadata xmlnspf="http://www.idpf.org/2007/opf" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:calibre="http://calibre.kovidgoyal.net/2009/metadata">
<dc:title id="id-1">Memories</dc:title>
<dc:language>en</dc:language>
<dc:creator id="id-2">Pamela B</dc:creator>
<dc:identifier>calibre:105</dc:identifier>
<dc:identifier>uuid:09c7549e-e1fb-4d69-a91b-ba773704398b</dc:identifier>
<dc:identifier id="uuid_id">uuid:09c7549e-e1fb-4d69-a91b-ba773704398b</dc:identifier>
<meta name="generator" content="Adobe InDesign"/>
<dc:date>2025-02-24T23:00:00+00:00</dc:date>
....


1 error
Add the missing OPF xml:lang attribute
The language must be specified (xml:lang in OPF package)
Learn more: Language
content.opf


thank you...
Bozzka is offline   Reply With Quote
Advert
Old 03-21-2025, 09:29 PM   #18
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by Bozzka View Post
1 error
Add the missing OPF xml:lang attribute
The language must be specified (xml:lang in OPF package)
Learn more: Language
content.opf
The code you posted looks fine.
What is giving the error? Is it CheckBook or epubCheck, or are you using another checker? Maybe something online?

Using the advice from @KevinH try adding this to the end of the <package> tag... xml:lang="en"

Last edited by Karellen; 03-21-2025 at 10:53 PM. Reason: wrote metadata instead of package. fix to avoid confusion.
Karellen is offline   Reply With Quote
Old 03-21-2025, 10:21 PM   #19
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: 8,761
Karma: 5706256
Join Date: Nov 2009
Device: many
As I tried to explain, add the attribute: xml:lang="en" to the package tag in the OPF.

ie. make the package tag look like this:

Code:
<package xmlns="http://www.idpf.org/2007/opf" version="3.0" unique-identifier="uuid_id" xml:lang="en" prefix="calibre: https://calibre-ebook.com">
KevinH is offline   Reply With Quote
Old 03-21-2025, 10:53 PM   #20
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,186
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Bozzka View Post
Does anyone know, please, how to fix the problem without having to redo the file Epub2 to Epub3?
Some Path? I prefer to change the content . opf file manually, if it's possible

I use caliber.
I fix all accessible metadata problem, but Daisy does not accept
my <dc: Language> en </ dc: Language>,
the error message is:
Add The Missing OPF XML: Lang Attribute
The Language Must Be Specfied (XML: Lang in OPF Package)
- also if this line is present

Thank you very much, I know you know everything ... :-) so maybe someone knows.
If you are going to edit the .opf file manually, please use the correct syntax. In your sample, you have extra spaces and upper case.

Code:
<dc:language>en</dc:language>
For finer granularity

Code:
<dc:language>en-ca</dc:language>
Oddly the ca can be upper or lower case and does not throw an error.

For ePub3, the title, identifier, language and modified elements from the Dublin Core set are needed. If they are not present, epubcheck will throw an error message.

Quote:
<package version="3.0" unique-identifier="ISBN" prefix="schema: http://schema.org/ rendition: http://www.idpf.org/vocab/rendition/# ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/" xmlns="http://www.idpf.org/2007/opf">
does not have an xml:lang element and epubcheck is happy with it.

Last edited by DNSB; 03-21-2025 at 11:02 PM.
DNSB is online now   Reply With Quote
Advert
Old 03-21-2025, 11:14 PM   #21
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,186
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Rather interesting result after deliberately introducing errors in the .opf file.

I added a space after the colon in the dc:language element and ran epubcheck expecting to get an error message. As soon as I clicked on epubcheck, the line changed. Pasted the modified line back and the same thing happens when I switch away from the .opf file for any reason.
Quote:
before:
<dc:identifier id="EbookISBN">9780391234567</dc:identifier>
<dc: language>en</dc:language>
<meta property="dcterms:modified">2025-03-21T00:16:26Z</meta>
<dc:date>2019-05-09</dc:date>
Quote:
after:
<dc:identifier id="EbookISBN">9780391234567</dc:identifier>
<dc:>en</dc:>
<meta property="dcterms:modified">2025-03-21T00:16:26Z</meta>
<dc:date>2019-05-09</dc:date>
I hadn't noticed this happening before but I haven't made a habit of deliberately introducing an error in the .opf file.
DNSB is online now   Reply With Quote
Old 03-22-2025, 01:31 AM   #22
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,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Bozzka View Post
Add The Missing OPF XML: Lang Attribute
The Language Must Be Specfied (XML: Lang in OPF Package)
This looks like a DAISY ACE warning not an EPUBCheck error:

Add the following attribute to the package tag in your .opf file, if the main language is US English:

Code:
<package version="3.0" unique-identifier="BookId" 
prefix="rendition: http://www.idpf.org/vocab/rendition/#" 
xml:lang="en-US" xmlns="http://www.idpf.org/2007/opf">
Obviously, the language code should match the main language code defined via:

Code:
<dc:language>en-US</dc:language>
@KevinH To reproduce this issue, please install the latest version of Daisy ACE and my ACE validator plugin.
Then download and open this simple epub3 test file, remove the package xml:lang attribute and run the ACE validator plugin.

This'll produce the following "serious" ACE warning:
  • The language must be specified (xml:lang in OPF package)
  • Ensures the OPF XML language is provided
  • Add the missing OPF xml:lang attribute
Here's the corresponding DAISY ACE KB entry.

I'm pretty sure that this is a recent change, because, IIRC, previous ACE versions didn't complain about missing package xml:lang attributes.

You might want to consider updating your ePub3-itizer and Access-Aide plugins.
Doitsu is offline   Reply With Quote
Old 03-22-2025, 09:18 AM   #23
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: 8,761
Karma: 5706256
Join Date: Nov 2009
Device: many
The Access-Aide plugin already adds the xml:lang attribute on the package tag. I added that fix in Access-Aide 1.0.0

Since it is an Accessibility check issue, not an epubcheck spec issue, I did not add it to the ePub3-itizer plugin.
KevinH is offline   Reply With Quote
Old 03-22-2025, 08:27 PM   #24
Bozzka
Member
Bozzka began at the beginning.
 
Posts: 16
Karma: 10
Join Date: May 2021
Location: Italy
Device: MacBook Air
Red face

thank you all for your help, it was important and urgent for me,
but I knew I could count on your help,

in fact they are the "new" rules and therefore important for everyone who wants to publish epub, more and more frequently the platforms ask to respect the ACE rules otherwise they do not accept the books.

So, I summarize because maybe someone else will need it:
- the fact remains that each xhtml page must have the reference to the language, such as xml:lang="en-US" (or other language) in <html
- in the content.opf page too, xml:lang="en-US" must be inserted as Doitsu wrote
- in the same page all the accessMode and accessibilitySummary references must be put
- certain settings for the fonts used are also needed

I can't remember anything else, it took me two days to fix these requests (not all the online pages of epub checker have already inserted ACE),

thanks again to everyone
Bozzka
Bozzka is offline   Reply With Quote
Old 03-24-2025, 08:20 AM   #25
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,750
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Duplicate answer given
JSWolf is online now   Reply With Quote
Reply

Tags
accessible, epub2, epub3, world book day


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre-generated epub (from .docx) gives "e21027" "multiple opf files" on KindleGen GhostRider Conversion 2 08-28-2024 10:14 AM
Bugs "Sanity Check epub" and "Failed Release date" on V 0.91 qkiazd Sigil 5 12-03-2015 04:01 AM
Recipe for EPUB subscribers of "Tagesspiegel" and "Handelsblatt"? F.W. Recipes 0 05-14-2013 11:16 AM
epub "padding left" to mobi "block quote" conversion issue 1611mac Conversion 3 01-11-2012 02:10 PM


All times are GMT -4. The time now is 07:18 PM.


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