View Full Version : Best Practice Metadata formatting.


Adjust
09-20-2011, 07:11 PM
Hi Guys.
I have a couple of things to ask your opinions on.

Firstly.

What's the best way to check metadata from an ePub to see if all the information you put in is correct? Insofar as how it will display on the various eBook websites without actually uploading?

Secondly. And this more about Best practice coding to spec I guess.

I output from InDesignCS3 and the resulting metadata code seems to be different to other people's, but because it still validates I haven't concerned myself with it until now. So I'm going to walk down the metadata section and insert my questions as I go.

<?xml version="1.0"?>
<package xmlns="http://www.idpf.org/2007/opf" unique-identifier="bookid" version="2.0">
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
I've seen some with this OPF reference.
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
I don't know what this means or why it's needed.

<dc:title>Book Title</dc:title>
<dc:identifier id="bookid">urn:uuid:b9ffc7ae-2221-68aa-a5d5-6aa0d7309af6</dc:identifier>
<dc:identifier id="isbn_1234567890123">123-4-5678-9012-3</dc:identifier>

So I don't get why I should change my line above to read like the line below.
<dc:identifier opf:scheme="ISBN">123-4-5678-9012-3</dc:identifier>

<dc:creator>Author Name</dc:creator>
Also why this line needs to be changed to below?
<dc:creator opf:role="aut" opf:file-as="Name, Author">Author Name</dc:creator>

<dc:publisher>Publisher</dc:publisher>
<dc:rights>Copyright Author Name 2011</dc:rights>
<dc:format />
<dc:date>2011</dc:date>
<dc:description>Blurb</dc:description>

What's the best way to format the Blurb? Is it ok to keep it all on one long line, inserting breaks only at paragraphs, or can I insert line breaks to condense the width?

<dc:subject>Fiction</dc:subject>
<dc:language>en</dc:language>
<meta name="cover" content="my-cover-image"/>
</metadata>

Thanks for any help.
It's confusing as why, if both methods work, to people bother adding the extra code?

wannabee
09-21-2011, 03:12 AM
Marcus
All the sights I've uploaded to ask you to supply the meta data by entering it in a title, description, author bio field etc. Some want it as a spreadsheet.

By setting the ID <dc:identifier opf:scheme="ISBN">123-4-5678-9012-3</dc:identifier> you can search by ISBN - however, I've had mixed results in validation and am unsure if it's me or not.

I've not seen <dc:creator opf:role="aut" opf:file-as="Name, Author">Author Name</dc:creator> and can only guess it's old. Doesn't it validate?

For the blurb I creat a text file that has the following information in it so I can cut and paste into the different sites.


Title
Subtitle
Author
Author 2
Publisher
BISAC Code and descriptions
Publish Date
Pages (print)
Search metadata (They only allow 7 items usually)
Description with paragraph breaks.
Author Bio
Author 2 Bio
Reviews

Jellby
09-21-2011, 04:16 AM
I've seen some with this OPF reference.
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
I don't know what this means or why it's needed.

It defines a namespace. It means you can use attributes from the OPF specification by prefixing them with "opf:" (see below).

<dc:creator>Author Name</dc:creator>
Also why this line needs to be changed to below?
<dc:creator opf:role="aut" opf:file-as="Name, Author">Author Name</dc:creator>

The "role" and "file-as" attributes come from the OPF spec, that's why they have the "opf:" prefix, as defined above. The "role" attribute says that "Author Name" is the author of the book (it could have been the illustrator, the editor, the illustrator, the compilator...). The "file-as" attribute gives a standardized form to sort the author, something like the "author_sort" in calibre, if you use it. It's not strictly needed, but it's nice to have, although it's ignored by many (most?) readers.

What's the best way to format the Blurb? Is it ok to keep it all on one long line, inserting breaks only at paragraphs, or can I insert line breaks to condense the width?

I've found that a single line per paragraph works best, otherwise the inserted line breaks can appear as forced line breaks.