Here is what I'm trying to do:
<dl> <dt>Friday, February 9, 2007</dt> <dd>Event #1<br />Event #2</dd> <dt>Sunday, February 11, 2007</dt> <dd>Event #3</dd> <dl>
On the first date there are two events. Should I have two DDs in there or is it proper with one with the line break? Should I be using an UL instead? Which is more semantic?
Will there be arguments over this?
I go for the two DD, myself.
I go for the two DD, myself. Try it and see if it validates. If it does then I think that's the solution. If it doesn't then you should try another approach.
I've changed it to
I've changed it to this:
<dl> <dt>Friday, February 9, 2007</dt> <dd>Event #1</dd> <dd>Event #2</dd> <dt>Sunday, February 11, 2007</dt> <dd>Event #3</dd> <dl>
Still wondering if I should be using UL instead. HMMM. Semantics are so ... arguable.
Ed Seedhouse wrote:I go for
I go for the two DD, myself. Try it and see if it validates. If it does then I think that's the solution. If it doesn't then you should try another approach.
It validates. Before I tweaked the script it was doing this:
<dl><dt>Friday, February 9, 2007</dt> <dd><div class="event"> <span class="summary">Event #1</span></div> <div class="event"> <span class="summary">Event #2</span></div> </dd> <dt>Sunday, February 11, 2007</dt> <dd><div class="event"> <span class="summary">Event #3</span></div> </dd></dl>
A DIV around each event inside of the DD. That didn't seem to make much sense to me.
Triumph wrote:I've changed
I've changed it to this:
<dl> <dt>Friday, February 9, 2007</dt> <dd>Event #1</dd> <dd>Event #2</dd> <dt>Sunday, February 11, 2007</dt> <dd>Event #3</dd> <dl>
Still wondering if I should be using UL instead. HMMM. Semantics are so ... arguable.
Well, if it wasn't for the double DD it would obviously belong in a DL. If the double DD validates (I think it will but you didn't say) then I think that's your answer.
We are posting at the same
We are posting at the same time.
I'm posting things you've already talked about entire minutes ago.
(No subject)
Oh, what the
Oh, what the …
The definition list seems good structurally, but the semantic link may be tenuous. I use it more often than not.
In this case, an ordered list of date with an unordered sublist of events seems more semantically and structurally correct.
<ol> <li> <h2>date</h2. <ul> <li> <h3>event name</h3> <p>time<br /> place</p> <p>description</p> </li> <li> <h3>event name</h3> <p>time<br /> place</p> <p>description</p> </li> </ul> </li> </ol>
cheers,
gary
On a completely unrelated
On a completely unrelated topic. A definition list can include any number[1] of DT or[2] DD elements in any order and in any combination. Common sense says that the first DT should come before the first DD, but I don't believe that is required by the DOCTYPE.
[1] at least 1
[2] inclusive or, one or the other or both.
My new best friend has for a
My new best friend has for a while been DL I like them much and use them wherever I can
They are a much overlooked little construct as for not proscribing the order that dt/dd must appear in I would have thought that was more to do with the fact that it is somewhat axiomatic in the same way I'm sure that:
<body>
<p>paragraph text</p>
<h1>heading for paragraph</h1>
</body>
Would validate, yet is a nonsense read semantically?
As for T's question I have to admit I'm not convinced by Gary's example too many 'things' with meaning going on there, a numbered list , page level headings, I think that my preference would be for a DL list on this one, but then again as I have said it is my new best friend
Where you are using a script
Where you are using a script to generate the pages you may prefer Gary's markup. It allows you to present different views of the calendar without having to modify the basic markup generated for events.
e.g. In a week or month view, you have an OL list with UL lists of each day's events nested within each element.
In a day view you have a UL list of the day's events and the date is probably a Hx element.
Putting the above aside, I'd probably go with OL/UL markup if I was listing an unbroken sequence of dates and DL/DT/DD if I was listing events and not caring if some dates were missing.
As ever I guess this all
As ever I guess this all depends on the precise requirements of the data, I see the scripting perspective though, struggling, kicking and screaming as it were at the moment with Drupal
Chris..S wrote:Putting the
Putting the above aside, I'd probably go with OL/UL markup if I was listing an unbroken sequence of dates and DL/DT/DD if I was listing events and not caring if some dates were missing.
That's the point I was stuck on. The script is only outputting dates with events. Boring days are left out.

Besides that there may be two or three lists of dates (such as Events, Birthdays and Anniversaries) and that also would break any order as some dates would be repeated in the second or third list and I read Gary's response after I mutilated the script. I just can't bring myself to open that file again.
Mutilated scripts, sound
Mutilated scripts, sound like a man after my own heart.
Hugo wrote:Mutilated
Mutilated scripts, sound like a man after my own heart.
Oh, yeah. I get them to do what I want, I just hope I never have to go back in there.
Who needs comments or indents on nested ifs?
Triumph wrote: Oh, yeah. I
Oh, yeah. I get them to do what I want, I just hope I never have to go back in there.
Who needs comments or indents on nested ifs?
You're joking I comment my comments, they never make sense to me so I write a detailed explanation of the comment
Hugo wrote:You're joking I
You're joking I comment my comments, they never make sense to meso I write a detailed explanation of the comment
So you don't mutilate, you redecorate?

A rococo comment coder, you
A rococo comment coder, you might say.
cheers,
gary
Leaning towards Neoclassic
Leaning towards Neoclassic