MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Sigil 0.9.17 and Epub 3.0 Metadata (https://www.mobileread.com/forums/showthread.php?t=322444)

z537815 08-23-2019 06:33 PM

Sigil 0.9.17 and Epub 3.0 Metadata
 
I'm running Sigil 0.9.17 and have a problem with the metadata of Epub 3.0-books.

If I open the Metadata-editor, I only see the "Dublin Core"-elements, while at least 1 book had a content.opf with an entry that definitely lookes like a non-DC element: "Sigil Version" (value "0.9.16"). Yet it doesn't show up in the editor. Why?

If I try to add an element: Add Metadata > Custom element, it seems to go Ok. A "Custom Element" appears in the list of metadata-elements, and I can fill in the values. I then exit with an "Ok".

But when I then re-enter the Metadata editor, this custom element has disappeared! It's not in the content.opf either.

So...what gives? Is it a bug or a feature?

KevinH 08-23-2019 07:10 PM

Was your custom element syntax correct for epub3? Meta tags in epub3 have content and are not self-closed. Did you properly save it? Does it appear in your content.opf in the metadata segment?

What exactly did you the in the custom entry?

KevinH 08-23-2019 08:43 PM

I looked and Yes pure meta tags are explicitly excluded in epub3. Your best bet to workaround this is to carefully edit any pure meta tags (not refines) in the metadata section of the content.opf section. I will work to remove this restriction in the next release.

KevinH 08-23-2019 09:25 PM

Okay, I just pushed some changes to master that allow the epub3 metadata editor to allow editing and creation of unrecognized (primary) meta tags. Those are meta tags whose whose property attributes do not match any of the elements/properties the editor recognizes.

The fix will appear in the next release of Sigil. Until then open the content.opf tab in Sigil and directly edit any metadata meta tags that do not involve refines (ie. are primary).

Thank you for your bug report.

Quote:

I'm running Sigil 0.9.17 and have a problem with the metadata of Epub 3.0-books.

If I open the Metadata-editor, I only see the "Dublin Core"-elements, while at least 1 book had a content.opf with an entry that definitely lookes like a non-DC element: "Sigil Version" (value "0.9.16"). Yet it doesn't show up in the editor. Why?

If I try to add an element: Add Metadata > Custom element, it seems to go Ok. A "Custom Element" appears in the list of metadata-elements, and I can fill in the values. I then exit with an "Ok".

But when I then re-enter the Metadata editor, this custom element has disappeared! It's not in the content.opf either.

So...what gives? Is it a bug or a feature?

z537815 08-24-2019 06:24 AM

Thanks. Looking forward to trying out your fix.

Just another question, though, and it may very well be a dense newbie-question. What exactly do you mean by "metadata meta tags that do not involve refines (ie. are primary)"?

Doitsu 08-24-2019 06:54 AM

Quote:

Originally Posted by z537815 (Post 3882063)
Just another question, though, and it may very well be a dense newbie-question. What exactly do you mean by "metadata meta tags that do not involve refines (ie. are primary)"?

In epub3 books, metadata entries are primarily used as refines. Here's a typical example:

Code:

<dc:creator id="create1">John Doe</dc:creator>
<meta scheme="marc:relators" property="role" refines="#create1">aut</meta>
<meta property="file-as" refines="#create1">Doe, John</meta>

The first refine defines the creator as an author and the second refine defines the author sort order.

The epub2 equivalent is:

Code:

<dc:creator opf:file-as="Doe, John" opf:role="aut">John Doe</dc:creator>
As you can see, the epub3 version is a bit more verbose.

z537815 08-24-2019 07:08 AM

I see. Thank you. That seems clear and straightforward enough.

KevinH 08-24-2019 09:50 AM

And to complete things, generic non-dc meta data that uses the meta tag with only a property attribute (no refines) is sometimes referred to as a primary meta tag. For example:

Code:

<meta property="createdwith">Sigil 0.9.17</meta>

which is used in place of the epub2 style meta tag

<meta name="createdwith" content="Sigil 0.9.17" />



All times are GMT -4. The time now is 10:23 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.