h-adr: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
(use CC0+OWFa license template)
No edit summary
Line 1: Line 1:
<entry-title>h-adr</entry-title>
HOW THING THROUGH
<span class="h-card vcard"><span class="p-name fn">[[User:Tantek|Tantek Çelik]]</span> (<span class="p-role role">Editor</span>)</span>
HOW MAKE THING THROUGH
----
HOW THING BE THROUGH
<dfn style="font-style:normal;font-weight:bold">h-adr</dfn> is a simple, open format for publishing structured locations such as addresses, physical and/or postal. h-adr is one of several open [[microformats|microformat]] draft standards suitable for embedding data in HTML/HTML5 on the web.
HOW MAKE THING BE THROUGH
 
HOW ANYTHING THROUGH
h-adr is the [[microformats-2]] update to [[adr]]. It is most commonly used as part of an [[h-card]] or [[h-event]].
HOW MAKE ANYTHING THROUGH
 
HOW ANYTHING BE THROUGH
{{cc0-owfa-license}}
HOW MAKE ANYTHING BE THROUGH
 
HOW EVERYTHING THROUGH
== Example ==
HOW MAKE EVERYTHING THROUGH
Here is a simple postal address example:
HOW EVERYTHING BE THROUGH
 
HOW MAKE EVERYTHING BE THROUGH
<source lang=html4strict>
HOW UNIVERSE THROUGH
<p class="h-adr">
HOW MAKE UNIVERSE THROUGH
  <span class="p-street-address">17 Austerstræti</span>
HOW UNIVERSE BE THROUGH
  <span class="p-locality">Reykjavík</span>
HOW MAKE UNIVERSE BE THROUGH
  <span class="p-country-name">Iceland</span>
HOW THING OUT
  <span class="p-postal-code">107</span>
HOW MAKE THING OUT
</p>
HOW THING BE OUT
</source>
HOW MAKE THING BE OUT
 
HOW ANYTHING OUT
=== Get started ===
HOW MAKE ANYTHING OUT
The class '''<code>h-adr</code>''' is a ''root class name'' that indicates the presence of an h-adr.
HOW ANYTHING BE OUT
 
HOW MAKE ANYTHING BE OUT
'''p-street-address''', '''p-locality''', '''p-country-name''', '''p-postal-code''' and all the other h-adr property class names listed below define properties of the h-adr.
HOW EVERYTHING OUT
 
HOW MAKE EVERYTHING OUT
See [[microformats-2-parsing]] to learn more about property class names.
HOW EVERYTHING BE OUT
 
HOW MAKE EVERYTHING BE OUT
== Properties ==
HOW UNIVERSE OUT
h-adr properties, inside an element with class '''h-adr''':
HOW MAKE UNIVERSE OUT
* '''<code>p-street-address</code>''' - house/apartment number, floor, street name
HOW UNIVERSE BE OUT
* '''<code>p-extended-address</code>''' - additional street details
HOW MAKE UNIVERSE BE OUT
* '''<code>p-post-office-box</code>''' - post office mailbox
HOW THING THROUGH
* '''<code>p-locality</code>''' - city/town/village
HOW MAKE THING THROUGH
* '''<code>p-region</code>''' - state/county/province
HOW THING BE THROUGH
* '''<code>p-postal-code</code>''' - postal code, e.g. ZIP in the US
HOW MAKE THING BE THROUGH
* '''<code>p-country-name</code>''' - country name
HOW ANYTHING THROUGH
* '''<code>p-label</code>''' - a mailing label, plain text, perhaps with preformatting
HOW MAKE ANYTHING THROUGH
* '''<code>p-geo</code>''' (or u-geo with a RFC 5870 geo: URL), optionally embedded [[h-geo]]
HOW ANYTHING BE THROUGH
* '''<code>p-latitude</code>''' - decimal latitude
HOW MAKE ANYTHING BE THROUGH
* '''<code>p-longitude</code>''' - decimal longitude
HOW EVERYTHING THROUGH
* '''<code>p-altitude</code>''' - decimal altitude - new in vCard4 (RFC6350)
HOW MAKE EVERYTHING THROUGH
 
HOW EVERYTHING BE THROUGH
All properties are optional.
HOW MAKE EVERYTHING BE THROUGH
 
HOW UNIVERSE THROUGH
== Status ==
HOW MAKE UNIVERSE THROUGH
'''h-adr''' is a microformats.org draft specification. Public discussion on h-adr takes place on [[h-adr-feedback]], the #microformats [[irc]] channel on irc.freenode.net, and [http://microformats.org/discuss/mail/microformats-new/ microformats-new mailing list].
HOW UNIVERSE BE THROUGH
 
HOW MAKE UNIVERSE BE THROUGH
h-adr is ready to use and implemented in the wild, but for backwards compatibility you should also mark h-adrs up with classic [[adr]] classnames.
HOW THING OUT
 
HOW MAKE THING OUT
== Property Details ==
HOW THING BE OUT
(stub, add any property explanations here)
HOW MAKE THING BE OUT
 
HOW ANYTHING OUT
== Examples in the Wild ==
HOW MAKE ANYTHING OUT
* … add any h-adr examples you find in the wild
HOW ANYTHING BE OUT
 
HOW MAKE ANYTHING BE OUT
 
HOW EVERYTHING OUT
{{h-spec-section-validating}}
HOW MAKE EVERYTHING OUT
 
HOW EVERYTHING BE OUT
 
HOW MAKE EVERYTHING BE OUT
== Backward Compatiblity ==
HOW UNIVERSE OUT
=== Publisher Compatibility ===
HOW MAKE UNIVERSE OUT
For backward compatibility, you may wish to use classic [[adr]] classnames in addition to the more future-proof h-adr properties, for example:
HOW UNIVERSE BE OUT
 
HOW MAKE UNIVERSE BE OUT
<source lang=html4strict>
<p class="h-adr adr">
  <span class="p-street-address street-address">123 Main St.</span>,
  <span class="p-locality locality">Pleasantville</span>
  ...
</p>
</source>
 
The class '''<code>adr</code>''' is a ''backward compatible root class name'' that indicates the presence of an [[adr]].
 
'''street-address''', '''locality''', and all the other backward compatibility adr property class names are listed below.
 
=== Parser Compatibility ===
Microformats parsers should detect classic properties and parse them as microformats 2 properties. If an "h-adr" is found, don't look for an "adr" on the same element.
 
Compatibility root class name: adr
 
Properties: (parsed as p- plain text unless otherwise specified)
 
* post-office-box
* extended-address
* street-address
* locality
* region
* postal-code
* country-name
 
== Background ==
h-adr is based on the existing [[adr]] specification, which was extracted from [[hCard]] in order to allow it to be used for applications other than contact information.
 
== See Also ==
* [[microformats2]]
* [[h-geo]] can be embedded in h-adr
* [[h-card]] and [[h-event]] often contain h-adr
 
[[Category:Draft Specifications]]

Revision as of 19:43, 25 August 2013

HOW THING THROUGH HOW MAKE THING THROUGH HOW THING BE THROUGH HOW MAKE THING BE THROUGH HOW ANYTHING THROUGH HOW MAKE ANYTHING THROUGH HOW ANYTHING BE THROUGH HOW MAKE ANYTHING BE THROUGH HOW EVERYTHING THROUGH HOW MAKE EVERYTHING THROUGH HOW EVERYTHING BE THROUGH HOW MAKE EVERYTHING BE THROUGH HOW UNIVERSE THROUGH HOW MAKE UNIVERSE THROUGH HOW UNIVERSE BE THROUGH HOW MAKE UNIVERSE BE THROUGH HOW THING OUT HOW MAKE THING OUT HOW THING BE OUT HOW MAKE THING BE OUT HOW ANYTHING OUT HOW MAKE ANYTHING OUT HOW ANYTHING BE OUT HOW MAKE ANYTHING BE OUT HOW EVERYTHING OUT HOW MAKE EVERYTHING OUT HOW EVERYTHING BE OUT HOW MAKE EVERYTHING BE OUT HOW UNIVERSE OUT HOW MAKE UNIVERSE OUT HOW UNIVERSE BE OUT HOW MAKE UNIVERSE BE OUT HOW THING THROUGH HOW MAKE THING THROUGH HOW THING BE THROUGH HOW MAKE THING BE THROUGH HOW ANYTHING THROUGH HOW MAKE ANYTHING THROUGH HOW ANYTHING BE THROUGH HOW MAKE ANYTHING BE THROUGH HOW EVERYTHING THROUGH HOW MAKE EVERYTHING THROUGH HOW EVERYTHING BE THROUGH HOW MAKE EVERYTHING BE THROUGH HOW UNIVERSE THROUGH HOW MAKE UNIVERSE THROUGH HOW UNIVERSE BE THROUGH HOW MAKE UNIVERSE BE THROUGH HOW THING OUT HOW MAKE THING OUT HOW THING BE OUT HOW MAKE THING BE OUT HOW ANYTHING OUT HOW MAKE ANYTHING OUT HOW ANYTHING BE OUT HOW MAKE ANYTHING BE OUT HOW EVERYTHING OUT HOW MAKE EVERYTHING OUT HOW EVERYTHING BE OUT HOW MAKE EVERYTHING BE OUT HOW UNIVERSE OUT HOW MAKE UNIVERSE OUT HOW UNIVERSE BE OUT HOW MAKE UNIVERSE BE OUT