View Single Post
Old 03-20-2017, 10:34 PM   #8
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,208
Karma: 16534692
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Still inching forward with EPUB2 to EPUB3 experimenting ...

I'm at the stage where I'm test format-shifting a larger number of error-free (in Check Book) EPUB2s to see what happens.

My first step was to make sure that Check Book also thinks the EPUB3 is error-free. Thankfully every book I've tried passed this test.

The second step was to run the EPUB3 through EpubCheck. I know you don't rate it highly but I thought it might at least highlight some extra 'problems' (meaningless or otherwise) which I might choose to fix during the shift if it can be done easily.

One of the first 'problems' I came across is with an EPUB2 which has 2 <dc:creator> tags, one for Author, the other for Translator:
Code:
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
    <dc:creator opf:file-as="Adler-Olsen, Jussi" opf:role="aut">Jussi Adler-Olsen</dc:creator>
    <dc:creator opf:file-as="Hartford, Lisa" opf:role="trl">Lisa Hartford</dc:creator>
The format-shift seems to have handled the Author <dc:creator> OK but left the Translator one unchanged - which EpubCheck flags as 2 errors (1 each for opf:file-as, opf:role)
Code:
<metadata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
    <dc:creator opf:file-as="Hartford, Lisa" opf:role="trl">Lisa Hartford</dc:creator>
    <dc:creator id="id-1">Jussi Adler-Olsen</dc:creator>
    <meta property="role" refines="#id-1" scheme="marc:relators">aut</meta>
    <meta property="file-as" refines="#id-1">Adler-Olsen, Jussi</meta>
Is this what you would expect to happen?

BTW, I also did a follow-up test where I changed the EPUB2's opf:role="trl" to a second opf:role="aut" before shifting to EPUB3. In that case both 'authors' had their <dc:creator> handled the same way and therefore no EpubCheck errors.

ETA: In case it's important, I used apply_metadata() from calibre.ebooks.metadata.opf3 to change the metadata from v2 to v3.

Last edited by jackie_w; 03-20-2017 at 10:43 PM. Reason: ETA
jackie_w is offline   Reply With Quote