[uf-discuss] hCard issue: is "n" optional or mandatory.

Andy Mabbett andy at pigsonthewing.org.uk
Thu Feb 7 12:21:05 PST 2008


The hCard spec says:

        <http://microformats.org/wiki/hcard#Property_Notes>

        The 'n' property is OPTIONAL if any implied 'n' optimization
        rules are in effect.

suggesting that it is mandatory otherwise, while the cheatsheet:

        <http://microformats.org/wiki/hcard-cheatsheet>

lists it as:

        OPTIONAL, but MUST NOT occur more than once

The later also says of 'adr':

        # At least one child-property MUST be present in adr.

        # If an adr-child (e.g street-address) is present it will ONLY
        be considered part of the adr data IF it is inside an adr.

but makes no such stipulations for 'n' and its children.


I certainly never use "n" for places:

        <foo class="fn locality">Birmingham</foo>

and parsers (Operator, Tails, Tails Export, X2V) seem to have no problem
with them - other than trying to optimise place names into given-,
family- and nick- names; an issue I've raised previously:

  <http://microformats.org/discuss/mail/microformats-discuss/2007-December/011169.html>

  (aka: <http://tinyurl.com/223qzo>)

  <http://microformats.org/discuss/mail/microformats-discuss/2008-January/011182.html>

  (aka <http://tinyurl.com/2c2yvr>)

and which is awaiting acceptance or otherwise of my proposed solution.


There are also difficulties using n-children where the make-up of the
'fn' is not known in advance; consider a database of low-granularity
names with properties like:

        John Smith-Brown
        Mary Anne Jones
        Ai Ki Chi

so sites like Wikipedia use:

        <foo class="fn">[name of indeterminate structure]</foo>

which again causes no problems to parsers.


Should the spec be reworded?

-- 
Andy Mabbett


More information about the microformats-discuss mailing list