[uf-dev] tables and @headers

Ryan King ryan at technorati.com
Tue Jun 20 17:12:32 PDT 2006


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), but the given  
setup surprised me with its results. I didn't expect to have  
"example.org" in the FN.

Aside: X2V actually doesn't follow the spec at this point, it avoids  
concatenating the header into the FN.

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.

Also, the above is a contrived example, so feel free to respond with  
"not realistic/ doesn't matter".

thanks,
ryan


More information about the microformats-dev mailing list