![]() |
#1 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Nov 2023
Device: Sigil
|
non-conforming meta element name="Sigil version"
It seems that Sigil adds a non-conforming meta element to the metadata in the opf file.
It adds (at least in the Linux flatpack Version 2.0.1, Qt 5.15.10 that I have): <meta name="Sigil version" content="2.0.1"/> From the ePub 3.3 specification of metadata contents, the meta element can only have attributes:
Is there a way to have Sigil insert a correct meta element, e.g. creator with a role: <dc:creator id="software">Sigil 2.0.1</dc:creator> <meta refines="#software" property="role" scheme="marc:relators">oth</meta> or any other correct syntax? I see this previous question from 2016, with an answer that basically says to build the code yourself, or use an output plugin. For the "build it yourself" choice, I've done that on Linux, patching together various instructions (what a mess that is, but that's a different thread), but sadly, I see no icons in the UI so it's not a usable version. Would the second "output plugin" option really work? There is only half an interface: Code:
# metadata get/set def getmetadataxml(self): # returns a utf-8 encoded metadata xml fragement return self._w.getmetadataxml() Any suggestions? |
![]() |
![]() |
![]() |
#2 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 744
Karma: 2296998
Join Date: Jan 2017
Location: Poland
Device: Various
|
The simplest workaround for today: use SIGIL_DISABLE_VERSION_META environment to disable the addition of this entry to the metadata.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 27,831
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
As the person who volunteers his time to keep the Linux build instructions as up to date as possible, you'll want to tread lightly in that different thread (should you choose to start one).
|
![]() |
![]() |
![]() |
#4 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,033
Karma: 5449552
Join Date: Nov 2009
Device: many
|
And epub2 style informational metadata is perfectly legal in epub3 and by spec must be ignored.
So there is no need to change anything. Just disable it using the provided environment variable. Last edited by KevinH; 11-12-2023 at 07:49 AM. |
![]() |
![]() |
![]() |
#5 | |||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,635
Karma: 23190435
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Moreover, several of the epub3 sample files endorsed by the EPUB3 Working Group contain <meta name="cover" content="cover"/> entries. For example: Wasteland and Page Blanche Quote:
BTW, if you want to find out whether an epub book is valid, simply check it with EPUBCheck. Quote:
You might want to download the latest version of the Sigil Plugin Framework Guide. |
|||
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Nov 2023
Device: Sigil
|
Quote:
Code:
flatpak override --user --env=SIGIL_DISABLE_VERSION_META=true com.sigil_ebook.Sigil |
|
![]() |
![]() |
![]() |
#7 | |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Nov 2023
Device: Sigil
|
Quote:
Code:
# metadata get/set def getmetadataxml(self): # returns a utf-8 encoded metadata xml fragement return self._w.getmetadataxml() Is it not true that an output type plugin is passed an outputcontainer object? If the outputcontainer object does have a setmetadataxml() method, should the documentation be updated? If it does not have a setmetadataxml() method, should it? If not, would an edit type plugin's changes to delete the meta tag not be overridden by the save operation (in the case that environment SIGIL_DISABLE_VERSION_META didn't exist to do this)? |
|
![]() |
![]() |
![]() |
#8 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 27,831
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
setmetadataxml() is for updating the metadata of the existing epub. Since an output plugin can be used to output whatever format a dev desires, there didn't seem to be much sense in providing an epub-only setmetadatxml() method in the output container object. Much like there is no epub-only getmetadataxml() method in the input container object. We couldn't guarantee either would work in all situations.
If one is starting from an epub and ending with an epub, it would make more sense to me to use an Edit Plugin to modify the metadata. If one needs to preserve the original, then Save As and/or Checkpointing would come into play. Using the output container to create a new epub with slightly tweaked metadata seems counter-productive to me. Last edited by DiapDealer; 11-13-2023 at 02:28 PM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Epub 2.0.1 validator error: "Error while parsing file: element "img" missing required | justin-b-918 | ePub | 6 | 04-26-2022 10:02 AM |
Moving the "TOC tab" to the Right Panel -- Suggestion for the next version of Sigil? | hhtmp88 | Sigil | 10 | 08-21-2020 12:56 PM |
"Error while parsing file 'element "img" not allowed here" | shotsfromthebar | Editor | 3 | 03-31-2017 03:53 AM |
The element type "p" must be terminated by the matching end-tag "</p>". | uieluck | ePub | 10 | 02-12-2013 07:04 PM |
Any way to apply calibre's "Series" (and number) meta-info from within Sigil...? | Vintage Season | Sigil | 2 | 07-02-2010 11:35 PM |