haml and w3c validator

Hi All,

I have a doubt regarding haml and w3c validator. Is w3c validator compatible for code written in haml?

Because I have done a project full in haml and its the need that there is no errors in w3c. But I have some errors which i think may be because of haml..

I have posted some of the errors that shoots up..

document type does not allow element "div" here

end tag for "ul" which is not finished

document type does not allow element "li" here; missing one of "ul", "ol", "menu", "dir" start-tag

end tag for "li" omitted, but OMITTAG NO was specified

Thanks,

AD

Hi All,

I have a doubt regarding haml and w3c validator. Is w3c validator

compatible for code written in haml?

Because I have done a project full in haml and its the need that there

is no errors in w3c. But I have some errors which i think may be because

of haml…

I have posted some of the errors that shoots up…

document type does not allow element “div” here

end tag for “ul” which is not finished

document type does not allow element “li” here; missing one of “ul”,

“ol”, “menu”, “dir” start-tag

end tag for “li” omitted, but OMITTAG NO was specified

Thanks,

AD

HAML doesn’t force your HTML to be correct, it just enforces it be structurally so. You can create absolute rubbish in HAML if you like. All of those errors suggest miswritten HTML. The ul is “not finished”. Does it contain any li tags? The div is in the wrong place. Where is it? You’ve apparently got a li tag that’s not wrapped in a ul, etc.

Look at the HTML you have outputted, look at the errors in the validator, then check your HAML to see where you have made a mistake. If you can’t work it out, post your HAML and we can highlight any errors.