[uf-discuss] Marking up table rows

Nick Fitzsimons nick at nickfitz.co.uk
Tue Sep 4 12:14:42 PDT 2007


> > <tr class="vcard geo">
> >
> > or is that naughty? :-)
> 
> I actually do stuff like that all the time... for things like
> signatures... it makes it very compact... for example...
> 
> -- <a class="vcard fn n url" href="http://changelog.ca/">Charles Iliya
> Krempeaux</a>
> 

Strictly speaking it actually isn't correct according to the hCard spec:

"The basic format of hCard is to use vCard object/property names in
lower-case for class names, and to map the nesting of vCard objects directly
into nested XHTML elements"
<http://microformats.org/wiki/hcard#In_General>

The explicit statment that nesting is to be achieved by the use of nested
(X)HTML elements makes it clear that assigning the properties at the same
level as the vcard "declaration" (for want of a better word) is not correct.
This is confirmed by such statements in the following subsection as "The
properties of an hCard are represented by *elements inside* the hCard" and
"Some properties have sub-properties, and those are represented by *elements
inside* the elements for properties" (my emphasis).

On the other hand, is it necessarily a bad thing to use a construct such as 

<p class="vcard geo">

if it doesn't lead to ambiguity? After all, the spec isn't written in stone
(it's written in a Wiki, which is pretty much the opposite of being written
in stone...) so maybe this restriction could be relaxed?

Without giving it the extensive consideration that other, doubtless wiser,
heads have already given it I can't be certain that such constructs might
not lead to ambiguity to the extent of making it difficult if not impossible
for parsers to correctly interpret the structure of an hCard.

But if in fact the mimicking  of the nested structure of the vCard format
need only be represented by a kind of "virtual" nesting within HTML, where
the presence of a property name at the same level as its container is taken
as implying containment, rather than containment depending on an actual
nesting of elements, then perhaps the spec could be relaxed to make it
permissible.

Something to think about down the pub ;-)

Regards,

Nick.
-- 
Nick Fitzsimons
http://www.nickfitz.co.uk/



More information about the microformats-discuss mailing list