View Single Post
Old 08-03-2010, 03:39 PM   #1
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Bugs in the new 2.0.1 OPF spec?

I'm currently going over the new OPF 2.0.1 spec in great detail since I'm building an epub validator, and I can't help but feel they've made a few errors in the text.

First off, the Relax NG schema in Appendix A has been updated. Every instance of the optional "xsi:type" attribute has been excised from the schema. For instance, this is what the "language" element rule used to look like in OPF 2.0:

Code:
<define name="DC.language-element" ns="http://purl.org/dc/elements/1.1/">
  <element name="language">
    <ref name="OPF20.optional-id-attribute"/>
    <ref name="OPF20.optional-xsi-type"/>
    <ref name="DC.metadata-common-content"/>
  </element>
</define>
and this is what it looks like now:

Code:
<define name="DC.language-element" ns="http://purl.org/dc/elements/1.1/">
  <element name="language">
    <ref name="OPF20.optional-id-attribute"/>

    <ref name="DC.metadata-common-content"/>
  </element>
</define>
There is literally a hole where the "xsi:type" reference used to be. Looking at the page source, you can see that the reference is still actually there, but wrapped in <del> tags (meaning that it was intentionally removed).

BUT the Publication Metadata section still contains this text in a paragraph near the end:
Quote:
For compatibility with Guidelines for implementing Dublin Core in XML (http://dublincore.org/documents/dc-xml-guidelines/) this specification allows xsi:type attribute for metadata items that can be given using some sort of encoding scheme and xml:lang attribute when an item can be given using human-readable text. Elements that allow xsi:type attribute are identifier, language, date, format and type.
This text was in OPF 2.0, but it now doesn't make sense if the schema doesn't allow the attribute. Remember, the schema is normative and always has been (see here: "it is a valid XML document according to the OPF Package Schema defined in Appendix A").

So which section am I supposed to trust? Did they just forget to remove this text or what?

The second issue I found relates to the external DTDs. There was some brand new text added to the start of the Manifest section.

Quote:
All DTD's and external entities (including, but not limited to, external DTD references) referenced by XML documents listed in the package manifest are considered part of the publication and thus must also be listed in the manifest. As an exception to that rule, DTDs of certain core document types do not need to be included. The list of DTDs that do need to be included in the manifest is:
  1. SVG 1.1 DTD (www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd)
  2. XHTML 1.1 DTD (www.w3.org/TR/xhtml11/DTD/xhtml11.dtd)
  3. DTBook DTD (www.daisy.org/z3986/2005/dtbook-2005-2.dtd)
  4. NCX DTD (www.daisy.org/z3986/2005/ncx-2005-1.dtd)
[I made the problematic verb larger]

Am I the only one who thinks that what they really wanted to say here was "do not"? This would be more consistent with the previous sentences, otherwise how would we know what are the "certain core document types"? Not to mention that I see absolutely no sense in having to include the DTD's of the very standards on which epubs are built. I'm fairly certain they screwed this up, but you can never be sure.

In short... wtf?
Valloric is offline   Reply With Quote