Attribute "xmlns:h" must be declared for element type "head".

Oxygen general issues.
dcdenison
Posts: 31
Joined: Sun Jun 14, 2009 4:25 pm

Attribute "xmlns:h" must be declared for element type "head".

Post by dcdenison »

I love the new 14.1.

There's one nagging warning I'm receiving when I open an epub that I transform using DocBook Epub ANT in the archive view.

E [Xerces] Attribute "xmlns:h" must be declared for element type "head".

the head I have is:

<head xmlns:h="http://www.w3.org/1999/xhtml" profile="">

Any ideas?

DC
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Re: Attribute "xmlns:h" must be declared for element type "head".

Post by george »

Hi,

By default oXygen validates XHTML document that do not refer to any DTD or schema with the schema specified in the XHTML document type in Options->Preferences -- Document Type Association - XHTML, click on Edit and then select the Schema tab. There you should be able to see

Schema type: DTD
Schema URI: ${framework}/dtd/xhtml1-strict.dtd

Now, the DTDs are not namespace aware, for DTDs the namespace declarations are just like any other attribute, thus the reported error on the xmlns:h.

The best solution will be to have this namespace declaration removed, because it is not actually used, so the DocBook to EPUB transformation should fix this.
On the other hand the document is valid XHTML, only not valid against the XHTML DTD so an alternative is to instruct oXygen to use a schema instead of that DTD for validating XHTML. For that please go to the above preference page and set the following

Schema type: RNG Schema
Schema URI: ${framework}/relaxng/xhtml.rng

Hope this explains the issue and the provided solution solves your problem.

Regards,
George
George Cristian Bina
dcdenison
Posts: 31
Joined: Sun Jun 14, 2009 4:25 pm

Re: Attribute "xmlns:h" must be declared for element type "head".

Post by dcdenison »

that worked. Thanks!
Post Reply