[whatwg] several messages about the <di> proposal

On Sat, 8 Jan 2005, Anne van Kesteren wrote:
> >
> > Yes, people have lots of fun trying to find the correct markup for 
> > this situation. <http://simplebits.com/notebook/2004/04/20/sq.html>
> > 
> > The general problem is that people want to number (or, less commonly, 
> > bullet) series of items that are already in multi-element structures, 
> > such that <ol>/<ul> cannot be used. Here, if numbering were not 
> > required, you would arguably be using <dl> (since each section is a 
> > full definition of the instruction given in its first line), but <dt>s 
> > can't be numbered automatically solely with HTML. The same applies to 
> > a formal dictionary where definitions <dd> for each term should be 
> > numbered. And the same applies to a table where each row <tr> should 
> > be numbered.
> 
> So DL is the biggest problem here, I guess. Since DT can occure multiple 
> times and DD as well. Perhaps we should introduce DI, like XHTML 2.0 to 
> take away this problem and a lot of other problems with regard to 
> styling DL elements?

On Thu, 10 Mar 2005, Anne van Kesteren wrote:
>
> Introducing this element affects the content model of DL. There are 
> multiple options possible. Either you could permit DI as well. You could 
> require it, or have a mixed content model where you only allow the one 
> or the other depending on your needs.
> 
> Personally I would vote for requiring it. A simple example:
> 
>  <dl>
>   <di>
>    <dt>CSS
>    <dd>Cascading Style Sheets
>    <dd>Content Scrambling System
>   </di>
>   <di>
>    <dt>etc
>    <dd>et cetera
>   </di>
>  </dl>
> 
> The advantage of DI is that it allows grouping of definitions and 
> therefore takes away the importance of element order. It also has a 
> semantic advantage to group these elements. From a structural point of 
> view it is very difficult for current DL element constructs to see which 
> (DT, DD) are bound together as a single entry.

On Thu, 10 Mar 2005, Anne van Kesteren wrote:
> 
> Of course you are right about the implied semantics and relationships 
> inside the DL element construct, but that does not make it a useful 
> construct and I think it makes it less semantic.
> 
> You can easily see that by looking at the same document without knowing 
> the semantics.
> 
> Before:
> 
>  <bax/>
>  <baz/>
> 
> After:
> 
>  <bar>
>   <bax/>
>   <baz/>
>  </bar>
> 
> And now you tell me if you would have known that <bax/> and <baz/> 
> shared a special relationship looking under "Before:" not further than 
> "After:".

On Sat, 12 Mar 2005, Dean Edwards wrote:
> 
> That's a shame (about XHTML2). This seems a pretty unnecessary element. 
> A <dl> is a list and we want to describe items in this list. The fact 
> that those items are contained in a <dl> tells you what type of list 
> items they are. The argument regarding presentation on legacy UAs seems 
> pretty feeble. <li> elements can easily be restyled using CSS, leaving 
> only non-CSS browsers to worry about. Even then the web-developer has a 
> choice whether to use an <li>/<di> element or not. :-S

On Sat, 12 Mar 2005, Matthew Raymond wrote:
> 
> I think some kind of grouping tag is necessary. You could argue that 
> <li> can fulfill that role, but that's not the same as saying that a 
> grouping tag isn't needed at all.
> 
> [...] it's a matter of grouping complexity. You use <di> in situations 
> where you have many terms and/or definitions that all relate to each 
> other. There have been some suggestions that you can figure out what 
> <dt> elements and <dd> elements relate to each other based on the order, 
> but this seems problematic to me. I suspect some browsers would screw it 
> up.

On Sat, 12 Mar 2005, Dean Edwards wrote:
> 
> I didn't mean that we don't need a grouping element (although "nice to 
> have" is more accurate). I meant that <li> would do fine. <di> is just 
> something else for me to remember...
> 
> Now that I know that <di> is already defined in XHTML2 it no longer 
> seems a big deal. :-)

Given how few people spoke in favour of <di>, both here and in general 
(e.g. in response to XHTML2), I have decided to leave it out for now.


On Thu, 10 Mar 2005, Rob Mientjes wrote:
> 
> Well, I'm not sure if it's not already clear that, without a
> definition term, there can be no new definition descriptions.

On Fri, 11 Mar 2005, Christoph P?per wrote:
> 
> ACK
> 
> So you want to put 'dt' after 'dd'? Seems strange to me.
> 
> IMHO each sequence of one or more 'dt' followed by one or more 'dd' 
> constitute an entry.
>
> [...] with 'di' probably even more people would abuse 'dl' for 'table'.

Indeed, the <di> element doesn't seem to be semantically needed -- it 
doesn't tell us anything about the markup that we didn't already know.


On Fri, 11 Mar 2005, Christoph P?per wrote:
> 
> The current content model of 'dl', "(DT|DD)+", does not require that, 
> though---maybe it should be changed to "(DT+, DD+)+".

Fixed in HTML5.


On Sat, 12 Mar 2005, Dean Edwards wrote:
> 
> Couldn't we just allow <li> in <dl> instead? Or have I missed something 
> from a previous thread?

On Sat, 12 Mar 2005, Anne van Kesteren wrote:
> 
> There was no previous thread. I guess allowing LI inside DL would be 
> possible. However, the content model of LI would change when it is 
> directly inside DL. (In XML Schema you can express such a thing, not 
> sure if it is possible using DTDs.)

On Sat, 12 Mar 2005, Matthew Raymond wrote:
> 
> I did a quick test, and using <li> in a <dl> produces a bullet on 
> Firefox, IE and Opera, whereas <di> and the complete lack of a parent 
> element did not. So, <li> didn't break anything, but it really didn't 
> have the desired rendering on legacy browsers. This alone it a good 
> argument for defeating <li> in this context. Plus, there's the 
> additional fact that <di> is already in the XHTML 2.0 working draft, 
> which means that it'll be easier to get <di> through W3C than <dl>/<li>.

On Sat, 12 Mar 2005, Matthew Raymond wrote:
>
> There's also the issue of the fact that all tag associated with 
> definition lists start with the letter D (<dl>, <dt> and <dd>). The <li> 
> element violates that nomenclature.

Agreed.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 28 February 2007 17:01:00 UTC