Ravi Swamy Ravi Swamy - 1 month ago 16
HTML Question

CC License: Attribute xmlns:dct not allowed here

I'm working on a simple real estate website The W3C validator gives me the following error, on a cut and paste Creative Commons license:

Error Line 121, Column 279: *Attribute xmlns:dct not allowed here.*

…rl.org/dc/terms/" property="dct:title">Bangalore Property Buy</span> by <a xml…


Warning Line 121, Column 279: *Attribute with the local name xmlns:dct is not serializable as XML 1.0.*

…rl.org/dc/terms/" property="dct:title">Bangalore Property Buy</span> by <a xml…


Error Line 121, Column 457: *Attribute xmlns:cc not allowed here.*

…tributionName" rel="cc:attributionURL">IndiranagarSeller@-ignore-this-gmail.co…


Warning Line 121, Column 457: *Attribute with the local name xmlns:cc is not serializable as XML 1.0.*

…tributionName" rel="cc:attributionURL">IndiranagarSeller@-ignore-this-gmail.co…


How do i fix this and what do the errors mean?

Answer

You need to switch to XHTML and change your DOCTYPE to use the DTD for RDF.

Your HTML document will then start with something like:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
                      "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html version="XHTML+RDFa 1.0" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

However, you will likely run into further validation issues to be resolved if you make this change.