Answers.Body: <p>The difference between the suggestions from the source you pointed at is how you define the target element. You should be aware that a lot of the metadata options available in an EPUB 3 can have multiple occurrences.</p>
  <h2>E.g. 1</h2>
  <pre><code>&lt;metadata ...&gt;
      ...
      &lt;dc:creator id=&quot;author&quot;&gt;John Doe&lt;/dc:creator&gt;
      &lt;dc:creator id=&quot;author1&quot;&gt;Jane Doe&lt;/dc:creator&gt;
      &lt;meta property=&quot;dccreator:file-as&quot;&gt;Something&lt;/meta&gt;
      ...
  &lt;/metadata&gt;
  </code></pre>
  <p>The above example is problematic because the <code>meta</code> element is trying to work on the <code>dc:creator</code> element, except there are two of them. Which one does it go for?</p>
  <h2>E.g 1 - Solution</h2>
  <pre><code>&lt;metadata ...&gt;
      ...
      &lt;dc:creator id=&quot;author&quot;&gt;John Doe&lt;/dc:creator&gt;
      &lt;dc:creator id=&quot;author1&quot;&gt;Jane Doe&lt;/dc:creator&gt;
      &lt;meta refines=&quot;#author&quot; property=&quot;file-as&quot;&gt;Doe, John&lt;/meta&gt;
      &lt;meta refines=&quot;#author1&quot; property=&quot;file-as&quot;&gt;Doe, Jane&lt;/meta&gt;
      ...
  &lt;/metadata&gt;
  </code></pre>
  <p>You should use the <code>refines</code> attribute and the <em>simplified version</em> of the <code>property</code> attribute (e.g. 'file-as') when there is more than one occurrence of the target metadata element. The <code>refines</code> attribute allows you to specify by the <code>id</code> attribute of the target element (which according to specs <em>must</em> be unique).</p>
  <p>If you do not specify a <code>refines</code> attribute, and the <code>property</code> attribute doesn't refer specifically to a reserved list of EPUB 3 spec metadata (Dublin Core), then the <code>meta</code> element is deemed to be working on the publication as a whole.</p>
  <h2>Other Examples</h2>
  <pre><code>// We only have a single dc:title in our metadata so we can use the extended property attribute in the meta element
  &lt;metadata ...&gt;
      ...
      &lt;dc:title id=&quot;title&quot;&gt;My Book&lt;/dc:title&gt;
      &lt;meta property=&quot;dctitle:file-as&quot;&gt;Book, My&lt;/meta&gt;
      ...
  &lt;/metadata&gt;
  
  // This is only hypothetical, as I'm not sure whether the publication itself would require a 'Metadata Authority' definition.
  &lt;metadata ...&gt;
      ...
      &lt;dc:title id=&quot;title&quot;&gt;My Book&lt;/dc:title&gt;
      &lt;meta property=&quot;meta-auth&quot;&gt;Awesome EPUB Organization&lt;/meta&gt;
      ...
  &lt;/metadata&gt;
  </code></pre>
  <p><strong>EDIT:</strong> In regard to what meta::property values are allowed have a look here: <a href="https://web.archive.org/web/20140715081956/http://epubzone.org/news/epub-3-packaging-and-metadata" rel="nofollow noreferrer">Archived from the original on epubzone.org here</a>
  Also, the latest official IDPF specifications for EPUB Open Container Format may be found here: <a href="https://www.w3.org/publishing/epub3/epub-spec.html#sec-core-media-types" rel="nofollow noreferrer">https://www.w3.org/publishing/epub3/epub-spec.html#sec-core-media-types</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-29T17:22:32.633Z
Answers.Text: hey thanks for the in-depth reply, it helps sort out some things.  just to follow up, though, do you know of any resource that might explain why the change took place?  i get that  `<i/>` is deprecated in favour of `<em/>` in HTML, for example, because the latter is 'more semantic', but i'm not having luck finding out why the IDPF migrated from the opf to dc schema, or if the the opf schema is even still used at all
Answers.UserDisplayName: mzmm56
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-30T15:05:22.903Z
Answers.Text: @mzmm56 I guess they changed to keep inline with changes in other specs like html and so on. You can still use OPF if you encode your epub according to the 2.0.1 guidelines , and being the older spec it will be openable by more ereaders. However, IDPF have dropped support for 2.0.1 in the hope that everyone will migrate to 3.0, which is a much more versatile beast.
Answers.UserDisplayName: Allerion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2015-10-29T16:30:53.060Z
Answers.LastActivityDate: 2020-05-06T20:25:54.283Z
Answers.LastEditDate: 2020-06-18T08:36:04.683Z
Answers.UserDisplayName: Allerion
Body: <p>couple questions about metadata in epub3:</p>
  
  <ol>
  <li><p>is the namespaced opf attribute (<code>opf:file-as=""</code>, for example) deprecated?</p></li>
  <li><p>if so, does anyone know why?</p></li>
  <li><p>given that it this format is deprecated, what is the correct format for including attributes in the opf namespace?</p></li>
  </ol>
  
  <p>Oreilly's epub3 best practices declares the following as the correct way to use the property attribute:</p>
  
  <pre><code>&lt;meta refines="#creator" property="file-as"&gt;Murakami, Haruki&lt;/meta&gt;
  </code></pre>
  
  <p>but, the namespace is not declared as they suggest in the following paragraph:</p>
  
  <pre><code>You can also use property values, which must include the proper prefix, from any of the reserved vocabularies or any vocabulary for which you’ve declared the prefix:
      &lt;meta property="dcterms:dateCopyrighted"&gt;2012&lt;/meta&gt;
  </code></pre>
  
  <p>wouldn't this mean that the following should be the correct implementation?:</p>
  
  <pre><code>&lt;metadata
      xmlns:opf='http://www.idpf.org/2007/opf'
     ... &gt;
  
  &lt;meta refines="#creator" property="opf:file-as"&gt;Murakami, Haruki&lt;/meta&gt;
  </code></pre>
  
  <ol start="4">
  <li>is there a comprehensive list of values allowed for the property attribute (role, meta-auth, etc)?</li>
  </ol>
  
  <p>thanks in advance!</p>
  
Tags: <epub>
Title: how to properly declare metadata in epub3
UserDisplayName: mzmm56
ThreadText: # how to properly declare metadata in epub3
  
  (Asked by: username_0 on 2015-10-27)
  
  couple questions about metadata in epub3:
  
  1. is the namespaced opf attribute (`opf:file-as=""`, for example) deprecated?
  2. if so, does anyone know why?
  3. given that it this format is deprecated, what is the correct format for including attributes in the opf namespace?
  
  Oreilly's epub3 best practices declares the following as the correct way to use the property attribute:
  
  ```
  <meta refines="#creator" property="file-as">Murakami, Haruki</meta>
  
  ```
  
  but, the namespace is not declared as they suggest in the following paragraph:
  
  ```
  You can also use property values, which must include the proper prefix, from any of the reserved vocabularies or any vocabulary for which you’ve declared the prefix:
      <meta property="dcterms:dateCopyrighted">2012</meta>
  
  ```
  
  wouldn't this mean that the following should be the correct implementation?:
  
  ```
  <metadata
      xmlns:opf='http://www.idpf.org/2007/opf'
     ... >
  
  <meta refines="#creator" property="opf:file-as">Murakami, Haruki</meta>
  
  ```
  
  4. is there a comprehensive list of values allowed for the property attribute (role, meta-auth, etc)?
  
  thanks in advance!
  
  **Tags:** epub
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-10-29. Score: 5 | Accepted answer
  
  The difference between the suggestions from the source you pointed at is how you define the target element. You should be aware that a lot of the metadata options available in an EPUB 3 can have multiple occurrences.
  
  ## E.g. 1
  
  ```
  <metadata ...>
      ...
      <dc:creator id="author">John Doe</dc:creator>
      <dc:creator id="author1">Jane Doe</dc:creator>
      <meta property="dccreator:file-as">Something</meta>
      ...
  </metadata>
  
  ```
  
  The above example is problematic because the `meta` element is trying to work on the `dc:creator` element, except there are two of them. Which one does it go for?
  
  ## E.g 1 - Solution
  
  ```
  <metadata ...>
      ...
      <dc:creator id="author">John Doe</dc:creator>
      <dc:creator id="author1">Jane Doe</dc:creator>
      <meta refines="#author" property="file-as">Doe, John</meta>
      <meta refines="#author1" property="file-as">Doe, Jane</meta>
      ...
  </metadata>
  
  ```
  
  You should use the `refines` attribute and the *simplified version* of the `property` attribute (e.g. 'file-as') when there is more than one occurrence of the target metadata element. The `refines` attribute allows you to specify by the `id` attribute of the target element (which according to specs *must* be unique).
  
  If you do not specify a `refines` attribute, and the `property` attribute doesn't refer specifically to a reserved list of EPUB 3 spec metadata (Dublin Core), then the `meta` element is deemed to be working on the publication as a whole.
  
  ## Other Examples
  
  ```
  // We only have a single dc:title in our metadata so we can use the extended property attribute in the meta element
  <metadata ...>
      ...
      <dc:title id="title">My Book</dc:title>
      <meta property="dctitle:file-as">Book, My</meta>
      ...
  </metadata>
  
  // This is only hypothetical, as I'm not sure whether the publication itself would require a 'Metadata Authority' definition.
  <metadata ...>
      ...
      <dc:title id="title">My Book</dc:title>
      <meta property="meta-auth">Awesome EPUB Organization</meta>
      ...
  </metadata>
  
  ```
  
  **EDIT:** In regard to what meta::property values are allowed have a look here: [Archived from the original on epubzone.org here](https://web.archive.org/web/20140715081956/http://epubzone.org/news/epub-3-packaging-and-metadata)
  Also, the latest official IDPF specifications for EPUB Open Container Format may be found here: <https://www.w3.org/publishing/epub3/epub-spec.html#sec-core-media-types>
  
  > **Comments:**
  > **username_0**: hey thanks for the in-depth reply, it helps sort out some things.  just to follow up, though, do you know of any resource that might explain why the change took place?  i get that  `<i/>` is deprecated in favour of `<em/>` in HTML, for example, because the latter is 'more semantic', but i'm not having luck finding out why the IDPF migrated from the opf to dc schema, or if the the opf schema is even still used at all  
  > **username_1**: @username_0 I guess they changed to keep inline with changes in other specs like html and so on. You can still use OPF if you encode your epub according to the 2.0.1 guidelines , and being the older spec it will be openable by more ereaders. However, IDPF have dropped support for 2.0.1 in the hope that everyone will migrate to 3.0, which is a much more versatile beast.  
  
  ---
  
  