That's a bug in XML. XML has no clear rules for how to interpret attributes with no namespace prefix. The spec says that default namespaces apply only to element names and not attribute names and that attribute names should be interpreted in the element namespace. But it also says that attribute with no prefix should be in the null namespace. So different XML tools deal with unprefixed attribute names differently. The XML library calibre uses treats unprefixed attributes to be in the default namespace, which means that there is no need to use opf:role, since opf is the default namespace already. Whatever XML library FC and epubcheck use makes a different assumption about how to interpret unprefixed namespaces, leading to the validation error. In practice, this validation error is meaningless, since tools that actually consume OPF either completely ignore the role attribute or handle both opf:role and role.
|