[uf-dev] tables and @headers

Ryan King ryan at technorati.com
Wed Jun 21 11:55:24 PDT 2006


Alright, I think you're right. That test case was totally artificial.  
I've changed[1] the test case in the test suite to be more similar to  
what'd we'd specified for tabular calendars. Tabular contact lists  
need more research, but I think this simple example is  
straightforward enough for testing table at headers parsing.

-ryan

1. http://hg.microformats.org/tests?cs=2d8164ada5f0

On Jun 21, 2006, at 7:27 AM, Tantek Çelik wrote:

> In short:
>
> The table headers technique has been developed from real world event
> calendar tables that are properly semantically marked up.
>
> We should really avoid any theoretical examples, trying to solve them,
> perhaps even bothering with discussing them, because such  
> discussions will
> only needlessly corrupt/complexify our markup techniques with no  
> respective
> benefit (since the examples are only theoretical).  Let's just say  
> I've had
> plenty of personal experience with this in "other" efforts.
>
> A real world example of a table with contact information might be a
> directory page for a company.
>
>
> Specifically:
>
> On 6/20/06 5:12 PM, "Ryan King" <ryan at technorati.com> wrote:
>
>> So, we have a method for including information from the headers of a
>> table in the cells of a table ( see [http://microformats.org/wiki/
>> hcalendar-brainstorming#Tabular_event_calendars]).
>>
>> This method (which needs to be moved to hcard-parsing and later to
>> general parsing documentation), was built around the use case of
>> having the root class name on a <td> element. For example, something
>> like:
>>
>>
>> <table>
>>  <tr>
>>    <th id="foo">...</th>
>>  </tr>
>>
>>  <tr>
>>    <td id="bar" class="vcard" headers="foo">...</td>
>>  </tr>
>> ...
>>
>>
>> So, with the current setup, the element #foo is included as a child
>> of #bar. This works find if the root classname is on the <td>.
>> However, consider this:
>>
>> <table>
>>  <tr>
>>    <th id="org" ><a class="url org" href="http://
>> example.org/">example.org</a></th>
>>  </tr>
>>  <tr class="vcard">
>>    <td class="fn" headers="org">Brian Suda</td>
>>  </tr>
>> ...
>>
>> By the given interpretation, this vcard should have an FN of "Brian
>> Suda example.org", because the included header gets counted as a
>> child and has a text node that get concatenated with the existing
>> text node.
>>
>> I'd really like to be able to allow this construct (I actually wrote
>> the markup above, not realizing what I was doing),
>
> I'd say the markup is easily fixable by wrapping "Brian Suda" in  
> its own
> <span class="fn"> rather than putting the "fn" on the <td>
>
>
>> There's no way that I can tell to apply headers to a table row, only
>> to table cells, which means that with our current setup, I don't see
>> how this is useful. I'd like to hear the thoughts of others.
>
> Not "see[ing] how this is useful" is perhaps more a consequence of the
> example being theoretical rather than something intrinsic to the  
> headers
> construct.
>
> Also, in the example given, there is no reason to use a <table>, as  
> there is
> nothing tabular/array-like about the data. It is a degenerate case  
> (only a
> single item), and thus there is no need for a table header (cell/ 
> row) vs.
> table data (cell/row) separation.
>
>> Also, the above is a contrived example, so feel free to respond with
>> "not realistic/ doesn't matter".
>
> Yes. ;)
>
> Avoiding theoretical/contrived examples is one thing, avoiding  
> examples
> which semantically misuse (excessively use?) markup is another.
>
> Thanks,
>
> Tantek
>
> _______________________________________________
> microformats-dev mailing list
> microformats-dev at microformats.org
> http://microformats.org/mailman/listinfo/microformats-dev

--
Ryan King
ryan at technorati.com





More information about the microformats-dev mailing list