[uf-discuss] hCard issue: is "n" optional or mandatory.
andy at pigsonthewing.org.uk
Thu Feb 7 12:21:05 PST 2008
The hCard spec says:
The 'n' property is OPTIONAL if any implied 'n' optimization
rules are in effect.
suggesting that it is mandatory otherwise, while the 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:
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:
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?
More information about the microformats-discuss