Re: Adding label to other list elements?

Ernest Cline wrote:
> Ben Meadowcroft wrote:
>
>> In a recent post entitled "XHTML 2.0 List Module negates the semantic
>> usefulness of definition lists." I mentioned that the specification
>> lacked a "more general/neutral list element
>> that relates two items together (like a DT DD pair)". The motivation
>> for this was to reduce the need for authors to "abuse" the
>> definition list to model labelled dialogues for example.
>>
>> Having thought about it I would like to propose that the label
>> element introduced with navigation lists be introduced into ordered
>> and unordered lists. The motivation for this is that these more
>> content neutral elements will now be able to utilised instead of
>> wresting the semantics of a definition list. We will now have a
>> proper mechanism for associating labels with normal list items.
>>
>> Use Case: modelling a dialogue.
>>
>> <ol>
>>  <label>Dave</label>
>>  <li>Hi, how are you doing?</li>
>>  <label>Kieran</label>
>>  <li>Fine Thanks, and you?</li>
>>  <label>Dave</label>
>>  <li>Doing well, I got that job I applied for at CERN so I am really
>> pleased.</li>
>> </ol>
>>
>> produces (with suitable css of course)
>>
>> Dave
>>   Hi, how are you doing?
>> Kieran
>>   Fine Thanks, and you?
>> Dave
>>   Doing well, I got that job I applied for at CERN so I am really
>> pleased.
>>
>>
>> So does this idea have legs then? Perhaps a different element name
>> than label(although I think it's quite neat)?
>
> Well first off, while I can see the desirability of having an element
> to indicate a semantically important marker that is associated with a
> list item, it shouldn't be placed outside of the list item or you are
> just getting a <dl> with different element names.

We agree on the desirability then, a good start!

I understand your point about placing it inside the list item, however I
disagree that this is the best method.

To ensure I am understanding you correctly you are envisioning something
along the lines of:

<ul>
<li><newlabelel>Label for item</newlabelel> Miscellaneous item text</li>
</ul>

The reason I question this concept is that it seem too similar to what can
be achieved with a <h> to me. For example

<ul>
<li><section><h>Label for item</h> Miscellaneous item text</section></li>
</ul>

Here a heading or label is clearly related to a single item.

What are the merrits of my inital proposal. Well as you stated "you are just
getting a <dl> with different element names", this is true in a sense, we
would be getting the functionality provided by a <dl> but without polluting
the semantics of the <dl> element.

This functionality, the ability to associate a label to multiple items of
data, and vice versa, is a powerful one that should be extended to the more
generic list elements <ol> and <ul>. An example of this is a list of slides,
with attached labels.

<ol>
  <label>Introduction</label>
  <li>What is RDF</li>

  <label>Practical Applications</label>
  <li>RDF in RSS 1.0</li>
  <li>RDF in FOAF 0.1</li>

  <label>Implementation Issues</label>
  <li>Syntactic issues</li>
  <li>Validation</li>

  <label>Conclusion</label>
  <label>Future Directions</label>
  <li>n-triples</li>
  <li>rpv</li>
</ol>

Determining which labels are associated with which items would follow the
same algorithm used to determine which <dt>s are associated with which
<dd>s. Nesting issues should not be an issue as this would be inherently
supplied by the use of nested lists.

> In fact since your example is not a list, using an <ol> is just as bad
> as using a <dl>.

I used an <ol> as the dialogue is a series of phrases given in a specific
ordered.
An <ol> is described as containing "Ordered information", a dialogue can be
seen as an ordered series of information, wheras seeing it as a series of
terms and definitions is something more of a stretch.

> Rather, I'd use:
>
> <div class="dialogue">
>  <div>
>   <cite>Dave</cite>
>   <blockquote>Hi, how are you doing?</blockquote>
>  </div><div>
>   <cite>Kieram</cite>
>   <blockquote>
>    Fine.
>    Thanks.
>    And you?
>   </blockquote>
>  </div><div>
>   <cite>Dave</cite>
>   <blockquote>
>    Doing well.
>    I got that job I applied for at CERN, so I am really pleased.
>   </blockquote>
>  </div>
> </div>

Seems like a nice implementation of a dialogue to me.

> Now if there were a Diologue Module with specific elements for this
> sort of thing, it would be even better, but do dialogues occur often
> enough to justify it?

Probably not, however my argument was not based on the need to specifically
model dialogues, it was motivated by the need to provide a more general
mechanism of providing some method of relating a label to a list element
(and thus stopping the abuse of the <dl> element). I propse extending <ol>
and <ul> elements as these are fairly content neutral.

Received on Monday, 2 June 2003 05:38:11 UTC