Ambiguity regarding xsi:type in OPF 2.0.1
| Project: | EPUB Maintenance |
| Component: | Open Packaging Format (OPF) |
| Category: | bug report |
| Priority: | normal |
| Assigned: | GConboy |
| Status: |
Jump to:
The Relax NG schema in Appendix A has been updated from OPF 2.0. 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 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 since the schema is also normative.
So which section am I supposed to trust? Was this text just forgotten or what?
[originally posted as a part of this thread on MobileRead]
In OPF 2.0.1, near the end of section 2.2 (2nd to last paragraph) currently reads:
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. Elements that allow xml:lang attribute are: title, contributor, coverage, creator, description, publisher, relation, rights, source, and subject. This specification does not impose any specific rules for these attributes (with possible exception of heuristics that use xml:lang described below).
The references to the no-longer allowed xsi:type attribute should be removed. The replacement paragraph should read:
For compatibility with Guidelines for implementing Dublin Core in XML (http://dublincore.org/documents/dc-xml-guidelines/) this specification allows the xml:lang attribute when an item can be given using human-readable text. Elements that allow xml:lang attribute are: title, contributor, coverage, creator, description, publisher, relation, rights, source, and subject. This specification does not impose any additional rules for this attribute (with possible exception of heuristics that use xml:lang described below).
- Login to post comments

Comments
#1
The removal of '' was intended (and discussed) when the RNG OPF schema was updated.
It seems to me that the corresponding text referring to "xsi:type" was not not noticed, and not removed.
But, I'd like to hear comments from Peter and/or Makoto on this one.
#2
Yes, I remember it was discussed and the decision was that this attribute should be removed in both schema and the spec.
#3
I checked OPC (ISO/IEC 29500-2). The RELAX NG schema in this part allows xsi:type
only when xsi:type has the value "dcterms:W3CDTF" and belongs to dcterms:modified
or dcterms:created. The RELAX NG schema in ODF 1.0 (ISO/IEC 26300) does not allow
xsi:type at all.
I think that people disallow xsi:type. Fine to remove it from both the prose
and schema.
#4
Promoted to "proposed resolution" -- please review resolution above. The resolution will become "Errata" with above resolution.
#5
Promoted to errata. Now the second 2.0.1 errata.
#6
Automatically closed -- issue fixed for 1 year with no activity.