View Single Post
Old 12-01-2015, 06:01 PM   #31
jhb50
Member
jhb50 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Sep 2011
Device: none
I found it illuminating to dig into the meaning of the terms used in Kovid's note. This is my simplified understanding based on additional reading that I have done.

EPUB's use XML to define the metadata and in order for XML files to be correctly interpreted by different software programs, the various fields must be preceded by a standard set of labels which have been pre-defined by a "namespace" and the XML file must declare the namespaces and the prefixes it uses for them using xmlns:prefix=uri

For EPUB's the required namespace for metadata per the EPUB standard is that defined by the Dublin Core Metadata Initiative (DCMI) and so the XML declares it using <metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" which points to the detailed field definitions, and the fields are enclosed by tags with a dc: prefix of the form <dc:fieldname>fieldname value<dc:fieldname>.

Hence <dc:publisher>The Crown Publishing Group</dc:publisher>, <dc:date>2015-09-08</dc:date> and <dc:description>This is a book about food.</dc:description> can be interpreted by any software per the DCMI definitions.

The problem with the subject EPUB above is that the description field used a different but allowable form to declare the dc:namespace, which the moon reader program was not programmed to handle, namely to declare the namespace being used, within the description itself, namely <description xmlns="http://purl.org/dc/elements/1.1/">What if the annoying person ....</description> which Kovid refers to as "choosing to use the empty namespace prefix, via an extra xmlns declaration." which then defines it as a dc: namespace.

Last edited by BetterRed; 12-01-2015 at 09:28 PM. Reason: to remove the 'unwanted' smilies
jhb50 is offline   Reply With Quote