Trouble in validating: not accepting epub:type

3 posts / 0 new
Last post

I'm getting this message when trying to validate my epub: "The prefix "epub" for attribute "epub:type" associated with an element type "section" is not bound." My code is <section epub:type="glossary">. Does anyone know the reason why it's not validating?

Short story, declare the epub prefix on the root html element:

<html ... xmlns:epub="">

Longer story, the type attribute is bound to the ops namespace, and in xml documents you can't use a namespace prefix without first declaring it somewhere in the ancestor chain.

That was easy. Thanks a lot!

Secondary menu