View Full Version : Bugs in the new 2.0.1 OPF spec?


Valloric
08-03-2010, 04:39 PM
I'm currently going over the new OPF 2.0.1 spec (http://www.idpf.org/doc_library/epub/OPF_2.0.1_draft.htm) in great detail since I'm building an epub validator (http://sigildev.blogspot.com/2010/07/vacation-and-validation.html), 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 (http://www.idpf.org/doc_library/epub/OPF_2.0.1_draft.htm#AppendixA) 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:

<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:

<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 (http://www.idpf.org/doc_library/epub/OPF_2.0.1_draft.htm#Section2.2) section still contains this text in a paragraph near the end:
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 (http://www.idpf.org/doc_library/epub/OPF_2.0.1_draft.htm#Section1.4.1.1): "it is a valid XML document according to the OPF Package Schema defined in Appendix A (http://www.idpf.org/doc_library/epub/OPF_2.0.1_draft.htm#AppendixA)").

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 (http://www.idpf.org/doc_library/epub/OPF_2.0.1_draft.htm#Section2.3) section.


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:


SVG 1.1 DTD (www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd (http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd))
XHTML 1.1 DTD (www.w3.org/TR/xhtml11/DTD/xhtml11.dtd (http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd))
DTBook DTD (www.daisy.org/z3986/2005/dtbook-2005-2.dtd (http://www.daisy.org/z3986/2005/dtbook-2005-2.dtd))
NCX DTD (www.daisy.org/z3986/2005/ncx-2005-1.dtd (http://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?

Jellby
08-04-2010, 05:39 AM
Am I the only one who thinks that what they really wanted to say here was "do not"?

I cannot help with your other question, but the answer to this one is an unambiguous NO, i.e., no, you are not the only one. I'm pretty sure the intended meaning is that those DTDs do not need to be included, in fact, the actual proposed change included the "not": http://www.daisy.org/epub/issues/clarify-which-external-dtds-are-allowed-epub

For any doubt, mistake or comment regarding the more technical aspects of the ePUB specification, I advise you to use the www.daisy.org/epub (http://www.daisy.org/epub/) page, there's where the thing is cooked and served.

Valloric
08-04-2010, 09:29 AM
I cannot help with your other question, but the answer to this one is an unambiguous NO, i.e., no, you are not the only one. I'm pretty sure the intended meaning is that those DTDs do not need to be included, in fact, the actual proposed change included the "not": http://www.daisy.org/epub/issues/clarify-which-external-dtds-are-allowed-epub

Ah, ok. That clarifies matters. Thanks.


For any doubt, mistake or comment regarding the more technical aspects of the ePUB specification, I advise you to use the www.daisy.org/epub (http://www.daisy.org/epub/) page, there's where the thing is cooked and served.

I must say I forgot about that site.

Valloric
08-04-2010, 10:05 AM
I've reported these (http://www.daisy.org/epub/issues/ambiguity-regarding-xsitype-opf-201) issues (http://www.daisy.org/epub/issues/missing-no-dtd-manifest-paragraph-opf-201) on the DAISY tracker.