Michel Fortin Here

Sequential List Proposal

This is a proposal for a new HTML element, sl, which could replace the dialog element currently defined in the current WHATWG Web Application specification and extend the use case to many other things, anything sequencial in fact. The use case now include, in addition to dialogues: system logs, historical timelines, transcripts, screenplay (would require a couple of new classes, not defined here) and surely other things I cannot think of right now.

Here is a short list of use cases hard to fit within the limitations of the currently defined dialog element:

The sl element

Content model
when the reversed attribute is not set: any number of time, li, dd, and dt elements where dt elements are always immediately followed by a dd element and no dd elements are placed before the first dt element in the list.
when the reversed attribute is set: any number of time and li elements.
Attributes
reversed

The sl (sequential list) element is a list of events, discussions, or changing states in chronological order, or, when the reversed boolean attribute is set, in reverse chronological order.

li is a list item. Inside a sequential list, li elements are sorted in chronological order — from the earliest to the latest — unless the reversed attribute is set on the sl element in which case they are in reverse chronological order.

time is a time marker. Inside a sequential list, time elements indicates that li elements or dd elements following it happen at or after that time, while elements preceding it occur before the time set by time element. If the reversed attribute is set, elements following it happen before that time, while elements preceding occur at or after the time set by time element.

When there is no time element in the list, the time at which events are occurring is unspecified.

dt, as a direct child of the sl element, introduce a new interlocutor for subsequent dialog parts. It must be immediately followed by a dd element. This element is prohibited inside a sl element having the reversed attribute set (dialogs may not occur in reverse chronological order).

dd, as a direct child of the sl element, is a spoken part of a dialog. dd must only occur after a speaker has been introduced with dt. This element is prohibited inside inside a sl element having the reversed attribute set (dialogs may not occur in reverse chronological order).

Examples

Timed Transcript

<sl>
  <time>12:30</time>

  <dt>Roger Armin</dt>
  <dd>
    <p>Our first speaker, Dr. Potier, will talk about ...</p>
  </dd>

  <li>Dr. Potier takes the stage.</li>

  <li>[Now translating from French]</li>

  <dt>Dr. Potier</dt>
  <dd>
    <p>Thank you Roger. So as an introduction ...</p>
  </dd>

  <time>12:35</time>
  <dd>
    <p>But as I was saying ... blah blah blah</p>
  </dd>
</sl>

Simple Dialog

<sl>
  <dt>Mister A</dt>
  <dd>Do you recognise me?</dd>

  <li>Mister A removes his mask</li>

  <dt>Mister B</dt>
  <dd>Ah! Yes! I know you... you are my father!</dd>
</sl>

System Log

<sl reversed>
  <time>2007-02-12</time>
  <li>Backup system restarted</li>

  <time>2007-02-09</time>
  <li>Backup failed</li>
  <li>Sent email to administrator</li>
</sl>

Rome Timeline: 5th century BC

<sl>
  <time>496 BC</time>
  <li>Rome defeat the Etruscans at the battle of Lake Regillus</li>

  <time>494 BC</time>
  <li>Two tribunes of the plebs and two plebeian aediles are elected for the first time</li>

  <time>459 BC</time>
  <li>The college of the tribune of the Plebs is raised from two to ten tribunes</li>

  <time>451 BC</time>
  <li>The Decemviri publishes the Twelve Tables of Roman law</li>

  <time>447 BC</time>
  <li>Assembly of the People created: two quaestors elected for the first time</li>

  <time>445 BC</time>
  <li>Marriage between patricians and plebeians allowed</li>

  <time>443 BC</time>
  <li>The office of consul is replaced by an assembly of military tribune with consular powers, the Tribuni militum consulari potestate for this year.</li>
  <li>Office of Censor created. Duties of Censor were Consular duties until this point, where consuls are replaced.</li>

  <time>421 BC</time>
  <li>Number of quaestors raised from 2 to 4; office opened to plebeians</li>

  <time>408 BC<time>
  <li>Consul replaced with Tribuni militum consulari potestate</li>
</sl>

Source: Wikipedia.


Site powered by: Reflex