Re: Re: HTML_Table: thead, tfoot and tbody

From: Date: Mon, 01 Aug 2005 21:31:45 +0000
Subject: Re: Re: HTML_Table: thead, tfoot and tbody
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-39112@lists.php.net to get a copy of this message
On 8/1/2005 10:53 PM, Mark Wiesemann spake the following words: > Justin Patrin wrote: > > >>>Let's say somebody does this: >>> $table->setHeaderContents(1, ...); >>> $table->setCellContents(2, ...); >>> $table->setHeaderContents(3, ...); > > [...] > >>No, THs may be anywhere. If it's a BC break then don't do it. > > > You missed my point. <th> should be set as it is done now. But: In the > above example rows 1 and 3 would belong to <thead> and row 2 to <tbody>. > When you output this in your browser you would get the order row 1, row > 3, row 2. > > The question is now: Should the user be allowed to do such strange > things? No, THEAD rows 0 and 2 and body rows 0 and 1 would be auto-generated (I think, at least). Hmm... At any rate, I think the best solution would be for the numbers should be unique to each section. I'll mull over it some more and see what I can come up with. One thing's for sure - modifying the *internal* data struction of HTML_Table (for example, adding a level to the row/cell array to indicate assigned section) is not a problem. It's just the public API that may not change (well, at least not by default). >>>The more I think about this, I like to bring back my first suggestion: >>>Let the user specify the row numbers that belong to the three groups. >> >>This also makes sense to me. > > > A valid argument against it is Christian's opinion in this thread: > | The wish states that row ranges for the single groups shall be defined. > | I'd like to have three different tables - so that I don't have to care > | to change the rows at which the data entries happen if I add a new > | header row. I agree with Christian here. (See above proposed solution.) >>Can you have TDs in a THEAD? > > > I don't think so (although I cannot find anything about this in the > (X)HTML specification) but in my opinion this is something the user is > responsible for. Yes, you can have TDs in a THEAD. (Actually, we should do all this in lowercase by default and in our discussions, because all XHTML tags and attributes are lowercase...) The thead declaration states that thead contains multiple tr tags. And the tr declaration states that it can contain multiple td and/or th tags. So yes, it's legal. And should therefore be supported. Klaus

« previous php.pear.dev (#39112) next »