This document represents a draft microformat specification. Though drafts are somewhat mature in the improvement process, the stability of this document can't be guaranteed, and implementers must be prepared to help keep abreast of future developments and adjustments. Check out this wiki web page, or stick to discussions around the microformats-new mailing listing to remain up-to-date.
adr (pronounced "adder"; FAQ: "why 'adr'?") is actually a easy format for marking up deal with info, ideal for embedding in HTML, XHTML, Atom, RSS, and arbitrary XML. adr is really a 1:one representation with the adr residence inside the vCard regular (RFC2426) in HTML, 1 of numerous open microformat specifications. It is also a residence of hCard.
one Draft Specification one.1 Copyright
1.two Patents
1.3 Inspiration and Acknowledgments two Introduction and History
3 Semantic XHTML Layout Rules
four Format 4.one Singular Properties
4.2 Human vs. Machine readable
4.three Worth excerpting
4.four Root Class Name
four.5 Residence List
4.6 XMDP Profile
4.7 Parsing Particulars five Examples five.1 Sample adr
five.two Far more Examples six Examples in the wild
seven Implementations
eight References eight.one Normative References
8.two Useful References
8.three Comparable Operate nine Operate in progress
10 Discussions 10.1 Q&A
10.two Issues 11 Related Pages Draft Specification Copyright
Per the public domain release on my user page, this specification is released into the public domain.
Public Domain Contribution Requirement. Since the author(s) released this function into the public domain, in order to maintain this work's public domain status, all contributors to this page agree to release their contributions to this web page to the public domain as well. Contributors may indicate their agreement by adding the public domain release template to their user page per the Voluntary Public Domain Declarations instructions. Unreleased contributions may be reverted/removed.
Patents
This specification is subject to a royalty free patent policy, e.g. per the W3C Patent Policy,
Microsoft Office 2010 Professional, and IETF RFC3667 & RFC3668.
Inspiration and Acknowledgments
Thanks to everyone who participated from the Geo Microformat BOF at O'Reilly's Where two.0 conference, and in particular to Nat Torkington and Vee McMillen of O'Reilly for arranging and hosting the BOF.
Introduction and Background
The vCard common (RFC2426), has been broadly and interoperably implemented (e.g. Apple's Deal with Book application). The hCard microformat has similarly received significant adoption, from numerous sites publishing the format, to hCard to vCard proxies, to clientside javascript parsers.
At the Where two.0 conference in June 2005, there was widespread recognition that the community needed a way to simply and easily publish visible, extractable, handle information on the Web, given how often bloggers, and numerous other sites publish tackle information. The geo microformat BOF discussed this very topic, and concluded with a consensus decision to just try using adr from vCard/hCard.
This specification introduces the adr microformat, which is actually a one:1 representation from the aforementioned adr residence from the vCard standard, by simply reusing the adr house and sub-properties as-is from the hCard microformat.
Publishers can both embed adr addresses directly in their web pages and feeds, as well as markup existing addresses within the context with the rest from the info in their web pages and feeds.
If the publisher knows and is publishing the name of the location in addition to its address, then the publisher MUST use hCard instead of just adr to publish the title and handle from the location.
Semantic XHTML Design Rules
Note: the Semantic XHTML Layout Rules were written primarily within the context of developing hCard and hCalendar, thus it may be easier to understand these principles from the context from the hCard design and style methodology (i.e. read that first). Tantek
XHTML is built on XML, and thus XHTML based formats can be used not only for convenient display presentation, but also for general purpose data exchange. In many ways, XHTML based formats exemplify the best of both HTML and XML worlds. However, when building XHTML based formats,
Office Professional 2007, it helps to have a guiding set of concepts.
Reuse the schema (names, objects, properties, values, types, hierarchies, constraints) as much as possible from pre-existing, established, well-supported specifications by reference. Avoid restating constraints expressed inside the source normal. Informative mentions are ok. For types with multiple components, use nested elements with class names equivalent to the names with the components. Plural components are made singular, and thus multiple nested elements are used to represent multiple text values that are comma-delimited. Use the most accurately precise semantic XHTML building block for each object etc. Otherwise use a generic structural element (e.g. <span> or <div>), or the appropriate contextual element (e.g. an <li> inside a <ul> or <ol>). Use class names based on names from the original schema, unless the semantic XHTML building block precisely represents that part of the original schema. If names within the source schema are case-insensitive, then use an all lowercase equivalent. Components names implicit in prose (rather than explicit in the defined schema) should also use lowercase equivalents for ease of use. Spaces in component names become dash '-' characters. Finally, if the format from the data according to the original schema is too long and/or not human-friendly, use <abbr> instead of a generic structural element, and place the literal data into the 'title' attribute (where abbr expansions go),
Microsoft Office 2007 Standard, and the far more brief and human readable equivalent into the element itself. Further educational explanation of this use of <abbr>: Human vs. ISO8601 dates problem solved Format Singular Properties
See hCard: Singular vs. Plural Properties for the listing of which "adr" properties (sub-properties in hCard) are singular. Note analysis in progress: adr-singular-properties.
Human vs. Device readable
If an <abbr> element is used for a property, then the title attribute of the <abbr> element is the appeal from the house, instead of the contents of your element, which instead provide a human presentable version of the appeal.
Similarly, if an <img> element is used for one or a lot more properties, it must be treated as follows:
For the PHOTO property and any other property that takes a URL as its value, the src attribute provides the property appeal. For other properties, the <img> element's alt attribute is the worth from the property. Worth excerpting
Sometimes only part of an element which is the equivalent for a house must be used for the price of the residence. For this purpose, the special class name worth is used to excerpt out the subset of the element that is the value of the property. See hCard for details on this.
Root Class Identify
The root class identify for an adr address is adr.
Residence Record
This is the listing of properties in adr,
Office 2010 Pro, taken from hCard:
post-office-box extended-address street-address locality region postal-code country-name
The type sub-property is omitted because without the context of a type of address for whom, it doesn't make much sense.
XMDP Profile
See hcard-profile for the XMDP profile of hCard which contains the above complete record of properties, with references to their RFC 2426 definitions.
Parsing Details
See hCard parsing, with the only difference being that "adr" is the root class name, rather than "vcard".
Examples
This section is beneficial.
Sample adr
Here is actually a sample adr:
<div class="adr"> <div class="street-address">665 3rd St.</div> <div class="extended-address">Suite 207</div> <span class="locality">San Francisco</span>, <span class="region">CA</span> <span class="postal-code">94107</span> <div class="country-name">U.S.A.</div>
</div>
which might be displayed as:
Note that this is a live adr microformat, which will be found on this web page by parsers.
More Examples
See hCard example ADR for more examples.
See adr examples for additional uses of ADR.
Examples within the wild
This section is useful.
The following sites have published adrs, outside their normal context of hCards, and thus are a great place to start for anyone looking for examples "in the wild" to try parsing, indexing, organizing etc.,
Office 2007 Standard, in addition to hCard examples from the wild. If you find adrs outside of hCards anywhere else, feel free to add them to the top of this list. Once the checklist grows too big, we'll make a separate wiki web page.
Grows on You uses the microformat to mark up the addresses of open gardens. Stems Florist uses the microformat around the front page to markup up the two store addresses theMechanism uses the adr microformat to mark up the locations of
their offices.
Mister-Map.com uses the adr microformat to mark up the streets, zip-codes, regions and country names.
(See also hcard-examples-in-wild)
Implementations
This section is useful.
The following implementations have been developed which either generate or parse adrs outside the context of hCards. If you have an adr implementation, feel free to add it to the top of this listing. Once the record grows too big, we'll make a separate wiki page.
GreaseRoute is really a GreaseMonkey user script (also available as an easy Firefox Extension) which will add icons for displaying the location, or route to, an adr using a MapQuest map. The route is displayed from the starting location based on the viewer's IP-Address as determined by the HostIP geolocation service. GreaseRouteEmbed is another GreaseMonkey user script that will actually embed a route image in the webpage when the user clicks the "route" link. GeoPress is really a WordPress plugin that supports embedding adrs, geo, maps (dynamically switchable between Google-Yahoo-Microsoft Maps), and GeoRSS feeds. pnh_mf is a plugin for Textpattern that supports embedding adrs and other microformats in templates and blog posts. Written by Chris Casciano. The hCard creator, though it creates complete hCards, can also be used simply to create adrs by filling out the tackle portion and simply copy and pasting the <div class="adr"> element and its contents. References Normative References hCard Beneficial References vCard RFC2426 (HTML reformatted version of RFC2426) XHTML 1.0 SE Comparable Work geo hCalendar XOXO Function in progress
This specification is actually a work in progress. As additional aspects are discussed, understood, and written, they will be added.
Discussions See blogs discussing this page. Q&A If you have any questions about hCard, check the hCard FAQ first, and if you don't find answers, add your questions! (Odds are that any adr question will apply to hCard as well). See also for other methods of feedback. Issues Please add any issues with the specification to the separate hCard issues document. Ditto. Related Pages adr adr-examples adr-cheatsheet adr forms part of hcard, so for feedback and issues, please use: hcard-feedback hcard-issues