Re: ingratiate a table in another table : xhtml

On 24 Apr 2011, at 16:13, Peter wrote:

> Hi,
>  
> I have used your page for validation: http://validator.w3.org/#validate_by_upload. I got error for using a table in another table.

That's unusual. Despite never having found a real world example where nesting one table inside another is an accurate description of any piece of data, it is valid in every version of XHTML that I've used.

> I then tried validating your example for using a table in another table [http://www.w3schools.com/html/tryit.asp?filename=tryhtml_table_elements].

This is not the W3C's example. W3Schools is not affiliated with the W3C and has a reputation for being about 25% good, 25% plain wrong, 25% out of date and 25% just missing.

> I have put the following lines at the top of the pages (before validation of pages):
> <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">

That is a WAPFORM Doctor, not a W3C doctype … and not one I've used.

That said, it does reference the W3C XHTML modularisation DTDs, which say:

<!ENTITY % td.content
     "( #PCDATA | %FlowNoTable.mix; )*"
>

I'm going to assume that "FlowNoTable.mix" isn't going to allow tables (rather then tracing it through to confirm)

> What is the cause for this error isn’t it correct to ingratiate a table in another table in xhtml or is it a problem with the validation check?

The Doctype you are using doesn't allow it, nothing is wrong with the validator, and it is a bad practise that you shouldn't be doing anyway.

-- 
David Dorward
http://dorward.me.uk

Received on Monday, 25 April 2011 18:55:33 UTC