[uf-discuss] Some hcard feedback from a vCard implementor

Sam Roberts sroberts at uniserve.com
Tue Apr 4 15:20:16 PDT 2006


> On Apr 4, 2006, at 3:35 PM, Sam Roberts wrote:
> >Now remove the example from the spec. How would a reader be able to  
> >know
> >from the "specification" that "span" elements are to be used in the  
> >XML?
> 
> That's not in the spec because those span elements are entirely  
> optional.  Any valid XHTML tag will work there.

> >The goal of "simplicity" is met by the spec if it can be used to
> >implement.
> 
> If your data is already in vcard format, implementation should be  
> incredibly easy.  Take every FN and wrap it in <X class="fn"> tags.   
> Take every ORG and wrap it in <X class="org"> tags.  And so on.

Really, you can use any XML element type you want?  Ok, that explains my
confusion. Its because I completely don't get it.  This is like no XML
format I've ever run across, but then, I don't use XML much, probably I
lead a sheltered life.

I wouldn't even now how to begin encoding a vCard as an hCard, and it
doesn't sound like there is any reason to. Would an hcard even exist,
standalone?

Is this all designed so that the class parameters serve as hooks for css
styling statements? Is this why you aren't just using one of the several
existing vCard XML formats?

> >the rules aren't in the spec
> 
> Here's the main rule:
> "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."

All the structured types (ADR, GEO, ORG,..) have names assigned to what
are ';' seperated fields. The above rule would give:

<JOE class="ORG">Company;Unit;Sub-Unit</JOE>

Cheers,
Sam




More information about the microformats-discuss mailing list