[microformats-discuss] XHTML "id" attribute and microformats,
particularly hCard
Brian Suda
brian.suda at gmail.com
Sun Oct 16 08:12:37 PDT 2005
There are several pros and cons to this. vCard has a UID field, and
originally we planned on using the ID arrtbute to populate that
property. The problem is that an HTML ID attribute is unique only
loacally to the page, whereas UID is suppost to be globally unique.
The problem would arrise when you extracted JohnDoe #1's hCard, then
later extracted someone else by the same name John Doe #2, the IDs
would be in conflict.
That is why hCard/hCal do NOT use them in the conversion to their
vCard/iCal counterparts.
That said, in X2V they ARE used. If you want to extract all the vCards
from a page, you pass the webservice the URL to the page. If you want
a single person/event from that page you can pass the page and anchor
(page#anchor). X2V will then only extract the data that are children
of that anchor
So if your page http://www.ndunn.com/2005/10/7/hCard has several
hCards and you only wanted to extract one you could pass this link
instead: http://www.ndunn.com/2005/10/7/hCard#NeilDunnHCard
What you are proposing is already in place, maybe not in the spec, but
in the software. I'll have to look into why it is not mentioned, and
possibly adding to the wiki.
-brian
On 10/16/05, David Janes -- BlogMatrix <davidjanes at blogmatrix.com> wrote:
> I was thinking that some microformats should recommend the use of the
> XHTML attribute "id" [1]. Why? Because this allows us to make much more
> powerful claims about facts on Internet. For example, consider the hCard
> in the wild examples [2]:
>
> | Neil Dunn (http://www.ndunn.com) has published his rather good looking
> hCard (http://www.ndunn.com/2005/10/7/hCard)
>
> Now, if Neil had marked the vcard on this page with an "id" -- i.e. the
> vard looked like this
>
> | <div class="vcard" id="NeilDunnHCard">
> | ... the gory details ...
> | </div>
>
> We would be able to make a more interesting statement:
>
> | Neil Dunn's rather good looking hCard IS
> | http://www.ndunn.com/2005/10/7/hCard#NeilDunnHCard
>
> There are many situations where this would be handy, not least of all
> where there's many hCards on a page. I have a few other followup ideas
> but I thought I'd get this one out there first.
>
> The language of the recommendation is fairly simple:
>
> | hCard blocks SHOULD have an XHTML "id" attribute.
>
> Regards, etc...
> David
> http:/www.blogmatrix.com
>
> [1]
> http://www.w3.org/TR/1999/REC-html401-19991224/struct/global.html#adef-id
> [2] http://microformats.org/wiki/hcard#Examples
> _______________________________________________
> microformats-discuss mailing list
> microformats-discuss at microformats.org
> http://microformats.org/mailman/listinfo/microformats-discuss
>
>
--
brian suda
http://suda.co.uk
More information about the microformats-discuss
mailing list