viernes, 9 de noviembre de 2007

Formato de los Eventos y Accesibilidad

Sigo programando la ardua tarea de filtrar la información del Timeline, y llegados a este punto he pensado que estaría bien comentar el formato que he utilizado en las burbujas del Timeline, que básicamente es el reflejo de la información almacenada en el archivo XML. He intentado mantener las misma filosofía para mostrar la información como cuando se presenta los registros en formato HTML.



Para formar el título de la burbuja, utilizo el nombre del curso, si es que la acción se asocia alguno, de lo contrario nada acerca del curso (site), el nombre completo del usuario a cargo de la acción, la acción especifica y por último, la imagen para mostrar del usuario.

Dentro de la descripción está la información de la I.P. que tenía el usuario en ese instante además del nombre completo del usuario, la acción que ha realizado y por último la información del evento (nombre del curso completo, Id, etc.). Se repite el nombre completo del usuario como la acción tanto en el título como en la descripción, para poder proporcionar los mismos enlaces que se proporcionan en la versión HTML.



Para completar la disertación dejaré un pequeño ejemplo de como debe de ser el archivo XML (extraído de la página oficial):

The XML format used for Timeline goes somewhat like this:

  • Everything is contained by a <data /> element
    • The <data /> element can have the following attributes:
      • wiki-url -- Base url used to gin up url's for each event; by appending the wiki-section and the event's title; often a MediaWiki wiki URL
      • wiki-section -- MediaWiki wiki section

    • Inside <data>events</data> go a number of <event>content</event> elements, the order of these is unimportant.

    • Each <event /> element can have the following attributes:
      • start -- in full date format (e.g. "May 20 1961 00:00:00 GMT-0600"")
      • latestStart -- for imprecise beginnings...
      • earliestEnd -- for imprecise ends...
      • end -- same date format as start
      • isDuration -- either "true" or "false", if false the item will be drawn as a dot with a pale bar drawn behind it
      • title -- text title that goes next to the bar in the timeline
      • description -- more text for the bubble
      • image -- url to an image that will be displayed in the bubble
      • link -- the bubble's title text will become a hyper-link to this address.
      • icon -- this image will appear next to the title text in the bubble.
      • color -- color of the bar to display in the timeline
      • textColor -- color of the text to display next to the bars


  • The "content" part is what will be displayed inside the bubble that pops up when the event is clicked
    • Should be escaped/formated HTML.

A example:

<data
wiki-url="http://simile.mit.edu/shelf/"
wiki-section="Simile JFK Timeline">
<event
start="Sat May 20 1961 00:00:00 GMT-0600"
title="'Bay of Pigs' Invasion">

</event>
<event
start="Wed May 01 1963 00:00:00 GMT-0600"
end="Sat Jun 01 1963 00:00:00 GMT-0600"
isDuration="true"
title="Oswald moves to New Orleans">
Oswald moves to New Orleans, and finds employment at the William
<!-- This is "content" -->


B. Riley Coffee Company. <i>ref. Treachery in Dallas, p 320</i>
<!-- This is "content" -->

</event>
<event>

...
</event>
</data>

No hay comentarios: