[uf-discuss] hCards for places

Andy Mabbett andy at pigsonthewing.org.uk
Tue Jan 8 17:01:30 PST 2008


In message <AA5C1896-9B50-4730-BEAB-5143301EAD6F at adactio.com>, Jeremy
Keith <jeremy at adactio.com> writes

>> Perhaps the rule should be that the hCard is for a place if the
>>"fn" is
>> on *any* address ("adr") child-component [1] (e.g. "fn locality" or
>>"fn
>> street-address")?
>
>This strikes me as being pretty workable. I'm mentally kicking the
>tyres and this seems like quite a robust solution.

Thank you.

In that case, would people agree, or object, if we:

   1)   removed "or place" from the "Organization Contact Info" section:

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


   2)   added, after the section "Organization Contact Info", a new
        section called "Place information", based on the former, thus:

                If the "FN" and one of

                        "ADR"
                        "POST-OFFICE-BOX"
                        "EXTENDED-ADDRESS"
                        "STREET-ADDRESS"
                        "LOCALITY"
                        "REGION"
                        "POSTAL-CODE"
                        "COUNTRY-NAME"
                        "LABEL"

                are on the same element, (e.g. class="fn
                extended-address"), then the hCard represents a place
                and SHOULD be treated as such. In this case the author
                also MUST NOT set the "N" property, or set it (and any
                sub-properties) explicitly to the empty string "". Thus
                parsers SHOULD handle the missing "N" property, in this
                case by implying empty values for all the "N"
                sub-properties.


   3)   changed the "Implied "n" Optimization" rule:

        <http://microformats.org/wiki/hcard#Implied_.22n.22_Optimization>

        to:

                If "FN" and "ORG" are not the same (see above); and "FN"
                is not on the same element as "LABEL", "ADR", or one of
                the listed "ADR" child elements (see above also); and
                the value of the "FN" property is exactly two words...

        [I suggest that we make "above" and "above also" links, or use
        the respective section names as linking text.]


   4)   changed the "Implied "nickname" Optimization" rule:

        <http://microformats.org/wiki/hcard#Implied_.22nickname.22_Optimization>

        to:

                Similar to the implied "n" optimization, if "FN" and
                "ORG" are not the same; and "FN" is not on the same
                element as "LABEL", "ADR", or one of the listed "ADR"
                child elements; and the value of the "FN" property is
                exactly one word, and there is no explicit "N" property,
                then...


Note the addition, in (2) - (4), of "ADR", in its own right, because:

        <foo class="vcard">
          <foo class="adr">
            <foo class="fn locality">
                New York
            </foo>
          </foo>
        </foo>

and:

        <foo class="vcard">
          <foo class="fn adr">
            <foo class="locality">
                New York
            </foo>
          </foo>
        </foo>

and

        <foo class="vcard">
          <foo class="fn adr">
            <foo class="locality">
                Dayton
            </foo>,
            <foo class="region">
                Ohio
            </foo>
          </foo>
        </foo>

are all equally acceptable.


Note also the inclusion of "LABEL", not previously included in my
proposal, but logically of the same nature as "ADR", and recommended for
use in place of "ADR" if the latter's required granularity is not
possible, i.e.

        <foo class="vcard">
          <foo class="fn label">
              Dayton, Ohio
          </foo>
        </foo>


If there are any objections, please say to which of the above points you
object, and whether you have a preferred alternative, or object in
principle.


It is my view that items 3 and 4 are logical, and should be done, even
if the first two are not adopted; since, say:

        <foo class="vcard">
          <foo class="adr">
            <foo class="fn locality">
                New York
            </foo>
          </foo>
        </foo>
and

        <foo class="vcard">
          <foo class="adr">
            <foo class="fn locality">
                Boston
            </foo>
          </foo>
        </foo>

are extremely unlikely to ever represent a person's name.

-- 
Andy Mabbett


More information about the microformats-discuss mailing list