EPUBCheck OPF-094: el enlace necesita un tipo de medio
Actualizado:
EPUBCheck OPF-094 es un mensaje de error: “The "media-type" attribute is required for "…" links.” Un enlace de metadatos de un tipo que requiere un tipo de medio no tiene ninguno. EPUB requiere un tipo de medio en enlaces de registro y voz, y EPUBCheck nombra el valor de rel.
El mensaje oficial
The "media-type" attribute is required for "%1$s" links.
- Severidad por defecto
- Error. El EPUB rompe una regla de la especificación y es inválido. Las tiendas y el envío a Kindle pueden rechazarlo, y EPUBCheck sale con estado 1.
- versión de EPUBCheck
- 5.4.0
%1$s, %2$s… se completan con el archivo, valor o elemento EPUBCheck encontrado.
Causas típicas
- Un enlace rel="record" a un registro de metadatos externo sin tipo de medio.
- Un enlace rel="voicing" a un archivo de audio sin tipo de medio.
- Un enlace copiado de un ejemplo que omitió el atributo.
Cómo arreglarlo
- Encuentra el elemento de enlace EPUBCheck que apunta.
- Añadir media-type con el formato real del archivo vinculado, por ejemplo media-type="application/xml" para un registro o media-type="audio/mpeg" para un MP3.
- Para un registro cuyo formato el tipo de medio no identifica, también añade una propiedad identificativa como properties="onix".
Cuándo no es esto
Si el enlace es un enlace de voz con un tipo de medio no audio, eso es OPF-095.
Términos usados aquí
Otros mensajes de OPF
OPF-093The "media-type" attribute is required for linked resources located in the EPUB containerOPF-095The "media-type" attribute of "voicing" links must be an audio MIME type, but found "…".OPF-092Language tag "…" is not well-formed: …OPF-096Non-linear content must be reachable, but found no hyperlink to "…".OPF-096bNo hyperlink was found to non-linear document "…", please check that it can be reached from scripted content.OPF-091The item href URL must not have a fragment identifier.
Fuentes
- EPUB 3.3, §D.4.1.5 record · leer
- EPUB 3.3, §D.4.1.6 voicing · leer
Texto y severidad del mensaje de EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explicación por EpubCC.