[uf-discuss] How to handle empty lists ?
hofmeyr at gmail.com
Tue Oct 30 10:03:42 PST 2007
On the subject of lists...
Is this the XOXO format?
Can anyone send me some urls for sites that use XOXO?
(Does the MicroFormats toolbar 'light up' on a page which uses XOXO and
allow you to export lists to excel or another website the same way one can
export hCard and hCalendar?
Phil - also new to MicroFormats and want to use it for my new website...
From: microformats-discuss-bounces at microformats.org
[mailto:microformats-discuss-bounces at microformats.org] On Behalf Of Ben Ward
Sent: 30 October 2007 17:44
To: Microformats Discuss
Subject: Re: [uf-discuss] How to handle empty lists ?
On 30 Oct 2007, at 17:09, michel.rousset at free.fr wrote:
> I'm new to microformats.
> I'm trying to use microformat style xhtml to represent some data.
OK. Howeber, what you're using is really semantic HTML, it's
precisely what the class attribute was designed for. Call it a
pattern or a data format as you like, but keep in mind that
'microformats' are a process by which formats are defined, not a
syntax in itself. The syntax you're using is just HTML.
> Somme data are lists of items represented by an <ul> element. XHTML
> (HTML) do
> not allow empty lists, but my data model uses empty lists.
> How to deal with this :
> - use an empty <span class="empty-list"> element,
> - use a fake element <ul><li class="ignore" /></ul>,
> - use empty list and ignore xhtml rule,
> - ... ?
To be pedantic, is an empty list really a list if it doesn't list
anything? For whatever pattern you are designing, why not just define
a parsing rule based on the absence of the list? If the list is
present, then you know that there is data, if it is absent then you
know there is not. Regardless of validation, including an empty list
in an HTML document is poor code really.
microformats-discuss mailing list
microformats-discuss at microformats.org
More information about the microformats-discuss