View Single Post
Old 08-27-2011, 11:51 AM   #27
st_albert
Guru
st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'
 
Posts: 698
Karma: 150000
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by Kendal View Post
I really dislike 4 -- everything I do creates an error that 3.4 never did.
I don't know if this is the issue you're having, but I am experiencing something similar re: difference between 0.3.4 and 0.4.1.

First a bit of background. I've been using 0.3.4 as my "production" version, and my workflow involves a final edit of the content.opf file (outside of Sigil 0.3.4, of course) to add several pieces of metadata. It is easier to expand the epub, copy and paste the metadata from a textfile supplied by the editor, and re-zip the epub than to pick each metadata element from the list in Sigil and fill in the data.

With Sigil 0.4.0 and above, I can edit the content.opf file directly; and that's a big time-saver. But there's a difference between 0.3.4 and 0.4 in that 0.3.4 will add the xml namespace references for opf and dc to the <metadata> tag if they aren't already there. Thus,

Code:
<metadata>
becomes
Code:
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
version 0.4.0+ does not do this.

That means that while editing in 0.4.1 when I paste a metadata element such as

Code:
<dc:contributor opf:role="art" opf:file-as="Scott, Ardy M.">Ardy M. Scott</dc:contributor>
(perfectly valid in an 0.3.4-created content.opf) into the .opf, as soon as focus switches away from the editor window, Sigil complains about an error because it doesn't recognize the opf elements.

If, instead of editing and pasting, you use Sigil's meta editor tool (F8) to add the same metadata, Sigil adds:

Code:
<dc:contributor xmlns:opf="http://www.idpf.org/2007/opf" opf:file-as="Scott, Ardy M." opf:role="art">Ardy M. Scott</dc:contributor>
in other words, it adds the xml namespace reference to the dc metadata element itself.

My workaround is to just paste in the modified <metadata xmlns:dc="http: ... > tag at first, just like 0.3.4 would have done. Then, no more errors from pasting (otherwise well-formed) metadata elements into the content.opf.

BTW, I tried "automatic fix" once, and it completely re-wrote the opf file, with LOTS of data loss. Good thing I save frequently.
st_albert is offline   Reply With Quote