Thread: EPUB output
View Single Post
Old 01-29-2009, 03:43 PM   #306
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Quote:
Originally Posted by kovidgoyal View Post
Historical reasons, i.e. no real reason. But actually in this case I dont really see what that would acheive. You're not really being conservative in what you produce.
XML isn't all just fun and games you know. There are serious implications to adding new tags willy-nilly! What if the IDPF later adds a <series/> sub-element of <metadata/>, but specifies it as having a @name attribute for the series name and a text() of the (to calibre) series index?

Ok, probably not, but OPF comes with a RelaxNG schema for validation, which schema only allows the tags explicitly allowed by the OPF specs, yah?. Even if any sane OPF processor would ignore parts it didn't understand, extra-tag errors are strictly errors and should be emitted by a validity checker. The presence of "non-error errors" in the checker output makes it harder for a human to read the checker's output and verify whether or not the file is in fact "valid enough".

Quote:
Originally Posted by kovidgoyal View Post
In either case you're producing a field in the OPF that no software other than calibre will understand.
Yeah... I'd actually vote for namespace-prefixing the Calibre-specific metadata in some fashion, to increase the chances of global uniqueness.

Quote:
Originally Posted by kovidgoyal View Post
But feel free to submit a patch to metadata.opf2.OPFCreator (you'll also have to path opf2.OPF to first try to read the value from the meta tag)

Oh and you might want to go the whole hog and do the same for the series and rating fields as well.
Done and done and in lp:~llasram/calibre/staging.
llasram is offline   Reply With Quote