[uf-discuss] Some hcard feedback from a vCard implementor
scott at randomchaos.com
Tue Apr 4 14:17:52 PDT 2006
On Apr 4, 2006, at 3:19 PM, Ryan King wrote:
>> There's no example for this on the wiki,
> Actually, there is: http://microformats.org/wiki/hcard-examples
I still don't see anything in the wiki where FN and N exist as non-
overlapping siblings in the hierarchy. Everything I see has either N
containing FN, or the two being identical. I think it would be good
to have one with N and FN completely distinct to make it clear that
this is possible in hcard.
On Apr 4, 2006, at 3:35 PM, Sam Roberts wrote:
> You have a description on the wiki of deriving N from FN, which
> things about the format of FN that are culturally specific (first
> before last, for example),
But this assumption is only made in the limited context where the
author doesn't provide an explicit N. So it makes it easier for
(arguably) most authors, while not at all inhibiting the minority who
prefer family, given order.
> when the very absence of N is a violation of
> the vCard spec.
N exists in every valid hcard. It's value can be implied or
explicitly stated, but N *always* has a value.
> It sure looked to me like the spec is describing how to do that which
> shouldn't be done.
I still don't see why it shouldn't be done.
> Now remove the example from the spec. How would a reader be able to
> from the "specification" that "span" elements are to be used in the
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
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.
> 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."
> Specific example, the NOTE field. Its value type is TEXT. TEXT can
> newlines, they are encoded as the two characters '\', and 'n'. The
> hcard spec doesn't say how to handle TEXT, doesn't even mention its
> existence, AFAICT, and I can't find an example where \n was used on
> /hcard-examples, so I'm not sure how newlines would get represented in
That should probably be added to hcard. XHTML ignores newlines. I
believe the most common conversion from text to XHTML is to replace
newlines with <br /> tags.
More information about the microformats-discuss