MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Metadata-editor error? (https://www.mobileread.com/forums/showthread.php?t=335759)

elibrarian 12-18-2020 04:12 PM

Metadata-editor error?
 
When using this construction in the .opf:

Code:

<?xml version="1.0" encoding="utf-8"?>
<package version="3.0" unique-identifier="BookId" xml:lang="en" xmlns="http://www.idpf.org/2007/opf" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/">
  <metadata>
    <dc:identifier id="BookId">urn:isbn:9788779797215</dc:identifier>

the metadata editor in Sigil seems to ignore the identifier. If I remove the id="BookId" from the <dc:identifier id="BookId"> the metadata editor will recognise the identifier.

Is this an error? (I think it must be, since the id="whatever"-construction is legal according to the specs.)

Regards,

Kim

KevinH 12-18-2020 04:48 PM

Unfortunately that was designed behaviour as we did not want metadata editors users to play with any dc:identifier that was designated as the unique identifier of the book because if changed this needs to be properly updated in any ncx uid metadata and can have an impact on font obfuscation.

So the only intended way for users to play around with the book unique dc:identifier was for them to directly edit it in the opf and ncx.

This was all designed and coded up when even epub3's were forced to keep an ncx for epub2 backward compatibility.

I will look into changing this at some future point.



Quote:

Originally Posted by elibrarian (Post 4070931)
When using this construction in the .opf:

Code:

<?xml version="1.0" encoding="utf-8"?>
<package version="3.0" unique-identifier="BookId" xml:lang="en" xmlns="http://www.idpf.org/2007/opf" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/">
  <metadata>
    <dc:identifier id="BookId">urn:isbn:9788779797215</dc:identifier>

the metadata editor in Sigil seems to ignore the identifier. If I remove the id="BookId" from the <dc:identifier id="BookId"> the metadata editor will recognise the identifier.

Is this an error? (I think it must be, since the id="whatever"-construction is legal according to the specs.)

Regards,

Kim


elibrarian 12-18-2020 04:56 PM

Quote:

Originally Posted by KevinH (Post 4070937)
This was all designed and coded up when even epub3's were forced to keep an ncx for epub2 backward compatibility.

Yes, thought it might be an old one. I found it when fiddling with updating some old epub2's to epub3. (I don't use backward compatibility any more. Too limiting in other aspects.)

Quote:

Originally Posted by KevinH (Post 4070937)
I will look into changing this at some future point.

I shall look forward to that :thumbsup:

Regards,

Kim


All times are GMT -4. The time now is 06:22 PM.

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