Click to See Complete Forum and Search --> : Heavens Please Make the Errors Stop!


ThunderHawk
05-20-2008, 04:55 PM
Okay I am beyond frustrated here.
I have a book on XHTML and when following the very simple instructions in the book, it won't pass the W3C validation.
I have tweaked and tweaked and have no idea what on earth it wants from me!
Does it need blood? Perhaps just a drop?
I have a number of elements defined as CDATA so that I may insert basic html formatting into them at a later date. My book also says that CDATA needs to be formatted as (#CDATA), however only (CDATA) will pass the validator.

The link to the horrible page is:
http://www.advantedgeknifesharpening.com/TEST.html

This is what the validator says about my coding skills:
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.advantedgeknifesharpening.com%2FTEST.html&charset=%28detect+automatically%29&doctype=Inline&group=0

Where on earth have I gone wrong with life???

rpgfan3233
05-20-2008, 06:05 PM
XHTML is not so easily extensible, especially when using DTD. It won't pass W3C validation because it is using the DTD that it knows about, where the body element doesn't have a set element as part of its content. You may or may not get it to validate by adding the following line to the beginning of your internal DTD subset:
<!ELEMENT body (set)>
Beware, however, that if you did only that, you couldn't use the p element, the div element, etc. inside the body element because now only a set element can be a child of the body element. Like I said, XHTML isn't so easily extensible.

Actually, one thing you could do is this, since I remember seeing this in the DTD:
<!ENTITY % Block "(%block; | form | %misc; | set)*">

The key bit is near the end. All I did was add your set element to the 'Block' group. Still, it may not validate...

Good luck.