hlisting: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
m (→‎Field Details: currency)
Line 195: Line 195:
* [http://www.edgeio.com/ Edgeio] has started to produce output with hListings
* [http://www.edgeio.com/ Edgeio] has started to produce output with hListings
* [http://www.dealtagger.com/ Dealtagger] supports hListing
* [http://www.dealtagger.com/ Dealtagger] supports hListing
* [http://jobs.emurse.com/ Emurse] supports hListing on job postings





Revision as of 17:50, 15 March 2007

hListing Proposal

hListing is a proposal for an open, distributed listings (UK English: small-ads) format suitable for embedding in (X)HTML, Atom, RSS, and arbitrary XML. hListing would be one of several microformats open standards.

Draft Proposal 2006-02-07

Editor

Authors

Contributors

  • Tantek Çelik
  • Ryan King

Introduction

Individuals and professionals are increasingly publishing their offerings online: whether as items for sale or rent (cars, homes, apartments), services for hire (music lessons, dog walker, plumber), openings (jobs, volunteers, extra spot in a book club) or personals (people looking for dates, companions, roommates). The goal of publishing (and promoting) these listings online is to seek out interested parties, often within a limited time period.

While descriptions of products and services are common on the Web, particularly on e-commerce sites, we are proposing an hListing microformat for sharing, searching, and syndicating the information that helps match up buyers and sellers. This proposal follows the common practices of trading sites such as Craigslist, eBay and newspaper classifieds.

If hReview is about an item and what you think of it, hListing is about an item and what you want to do with it.

Inspiration and Acknowledgments

Thanks to everyone who participated in the initial burst of hListing activity in August 2005, particularly Emiliano Martínez Luque and Trevor O'Reilly, for naming the effort and organizing the listing-{brainstorming, formats, examples} pages on the wiki. We would like to thank Tantek for an initial debate about whether to extend hReview or pursue an independent-though-similar hListing for our proposal.

Scope

Vibrant online marketplaces have been launched with little more than titles, prices, descriptions, and contact email addresses; we hope to kindle the same spirit of minimalism with this proposal to restart active discussion of what an hListing should be. Since we are venturing into a space that does not have “settled law” such as the vCard definitions hCard started with, we were inspired by hReview, another novel compound microformat that emerged from the microformats.org community process.

In particular, we note that both applications need a way to share informative descriptions of a product or service, including attribution of authorship and provenance of the item. if hReview is a microformat for one's opinion of a product or service, hListing helps share what one would like to do with it: sell it, rent it, trade it, perform that service, announce it, or, for people, to meet them. It can tell you how to contact the lister, and whether it is an item on offer or a wanted ad.

Out of Scope

We are focusing on providing "just enough" structure to enable matching, not to consummate transactions. This is distinct from the majority of formats described on the wiki under listing-examples, which are specific enough to completely describe products for retail sale according to the idiosyncratic semantics of particular merchants and shopping engines. Instead of encoding retail-oriented fields such as UPCs, SKUs, and manufacturer part numbers, this proposal acknowledges that many listings are for "inventories of one" that may not have such precise abstractions.

Similarly, listings cannot aspire to describe prices and terms & conditions to the degree necessary to automate entire transactions or price comparisons. Some have terms beyond the pale of any B2B exchange protocols (e.g. "$50 obo").

As in hReview, the concept of a “universal object identifier” is also out-of-scope for this effort. Unlike some of the “product feed” formats under [listing-examples], we avoided specifying any taxonomy for identifying or categorizing listings in favor of tags.


Format

In General

The hListing format is based on a set of fields common to numerous listing sites and formats in use today on the web. Where possible field names have been chosen based on those defined by the related hReview, hCard, hCalendar standards.

Schema

An hListing schema should consist of the following:

  • hListing
    • version. optional. text.
    • listing action. one or more tags, suggested set: sell | rent | trade | meet | announce | offer | wanted | event | service
    • lister. required. hCard | (fn || email || url || tel).
    • dtlisted. optional. ISO8601 absolute date time.
    • dtexpired. optional. ISO8601 absolute date time.
    • price. optional. text. [should include a floating-point number with optional ISO currency codes] - see the currency proposal
    • item info. optional. (fn || url || photo || geo || adr) | hCard (for person or business).
    • summary. optional. text.
    • description. required. text with optional valid XHTML markup.
    • item tags. optional. keywords or phrases describing the item being offered, using rel-tag
    • permalink. optional.

Summary of Changes

By comparison to hReview:

  • Item type and info have been preserved to describe the good, service, or person being offered.
  • Item info expanded to take geo or adr for location of the item.
  • Item description has become required, rather than item info or type. While reviews tend to apply to a range of products, listings "in the wild" can be sui generis, found with only a description and no other structured information.
  • Rating has been removed.
  • Lister, unlike Reviewer, can also have a telephone number -- but it must either be an hCard or the other fields.

Creating a listing requires adding transaction metadata:

  • Type of transaction sought: whether the lister has or wants an item (sale or rent), a service, an opening, or a personal introduction.
  • Dates of listing and expiry. Once taken, listings may be reposted with a modified dtexpired.
  • Price has been called out specifically as an independent text field. It can include some terms & conditions.

Field Details

The fields of the hListing schema represent the following:

version:: This optional field permits hListing publishers to specify a particular version of hListing that their content uses. By omitting this field, the publisher is stating that implementations may interpret the hListings according to any version of the hListing specification. The value for this proposal as of 6-Feb-2006 is "0.0," since it has no official standing yet.

Transaction Metadata

listing type:: This required field indicates the desired matching: whether it’s about something that the lister has (offer) or wants (wanted). NOTE: This needs to be collapsed with listing action per the change made to the summary above.

listing action:: This required field indicates the desired action for the listing: a permanent transfer (sale); transient use (rent); barter or donation (trade); to arrange an introduction (meet); publicize the existence of an event or vendor (announce); or to perform a service (service).

lister:: The person or business who should be contacted about the listing, either in the form of an hCard or a shorthand notation of one or more formatted names (fn) and contact information (email, url, tel). Note that this is not necessarily the the same as the author of the listing.

dtlisted:: This optional field MUST provide an ISO8601 absolute date time of when the listing was first made effective. This field SHOULD use UTC, but MAY use the time zone offset syntax. See datetime design pattern.

dtexpired:: This optional field MUST provide an ISO8601 absolute date time of when the listing will become ineffective. It MUST be later than dtlisted. This field SHOULD use UTC, but MAY use the time zone offset syntax. See datetime design pattern.

Note that this definition obviates the need for a “taken” listing action; when a listing is no longer valid, it can simply be deleted, or republished with an expiry date that has already passed. Republication may be desirable, to indicate that the listing is no longer available to forestall further inquiries. Keeping expiry orthogonal to listing-action permits archival use of web pages with hListings.

location:: This optional field contains the location of the item, which may be different than the location of the lister. This may be a full hCard with contact information, or a geolocation-specific microformat type.

There is an separate discussion to be had about how either of these three microformats can best accommodate colloquial terminiology for “neighborhoods,” but this proposal does not break new ground by coining a new fields for that purpose.

price:: This optional text field describes the “advertised” price of the listing; it is not a binding offer, nor a complete transaction price. Floating point numbers found within this string may be extracted for sorting/indexing, as could adjacent currency symbols or ISO currency codes.

Note that since price is such a general description, we have avoided promoting an additional “terms and conditions” field for elaborating on the price or terms of the deal (e.g. “dollars”, “best offer” “per month” “paypal only”). We suggest demoting it until proven that it needs to exist independently of either description (such as shipping rates) or price (which can just state “CAD$22/mo”).

Item Metadata

item type:: This optional field "type" provides the type of the item being listed: one of the following: opening, housing, product, business, event, person, place, website, url.

Note that the first two, housing and opening, are new and unique to hListing; the remainder are copied by reference from hReview. Similar to the note in hReview 0.2 for item types, the enumerated list of listing types is “under development and may be extended.”

item info:: This required field MUST have at a minimum the name ("fn" - the formatted text corresponding to the name) of the item , SHOULD provide at least one URI ("url") for the item, and MAY provide at least one URL to a photo or depiction ("photo") of the item. For items of type person or business, the item info (fn, url, photo) SHOULD be encapsulated in an hCard. Unique item IDs (e.g. ISBNs, UPCs) MAY be represented as a URN ("url") for the item.

Content

summary:: This optional text field serves as a title for listing.

description:: This optional field contains the full text representing the written description of the item being listed. The field MAY include valid XHTML markup (e.g. paragraphs). User agents SHOULD preserve any markup.

tags:: Tags are represented using a list of keywords or phrases (using the RelTag microformat for each individual keyword or phrase tag) that the reviewer associates with the item. The reviewer SHOULD provide tags relating to how they want the item categorized (e.g., “car, used, acura”, “job”, “real estate, 3BR”). The reviewer MAY also want to provide tags indicating payment terms (“dollars”, “paypal”).

permalink:: This optional field is a URL for the hListing. In addition to using the <a href> tag for this field, the attribute rel="self bookmark" MUST be used to indicate that the hyperlink is a permalink for the review itself. If the hyperlink already contains a rel attribute, then the values self and bookmark MUST be included among the space-separated set of values in the attribute. Indexers MAY treat the permalink of a review as a unique ID in order to identify and collate the same listing from multiple sources (such as indexing a page multiple times). The permalink MAY also be used to indicate or imply the origin of the listing. Authors MAY use the classname of "permalink" on the element representing the permalink, but are not required to do so.

Cross-cutting issues

Internationalization: Though there are many English-language tokens, they are only used as invisible class-names; user-visible listing information can be completely localized. N.b. that (X)HTML lang attribute rules still apply as usual, for multilingual aggregators of hListings.

The following field names have been reused from the hCard and hCalendar microformats: version, summary, fn, url, email, photo, description, categories. In addition, items and reviewers described by hCards MAY contain any hCard field. The rel value "self" has been reused from the Atom 1.0 specification.

Contextual Defaults: A New Approach?

Since listings may be embedded within blog postings, email, syndicated feeds, simple Web pages, or other microformats such as hAtom, to the degree possible, the following fields can be “inherited” from the context surrounding an hListing if absent:

  • lister (author, contributor, From:)
  • dtlisted (Date:)
  • dtexpired (Expires:)
  • summary (title)
  • permalink (URI:, <base>)

By contrast, gazetteering is an example of ad hoc contextual defaulting that is not governed by this technique. Guessing that “Noe Valley” is in “San Francisco, CA” because the hCard of the blog author is in the same city is beyond the pale of the contextual defaulting proposed here. All we are suggesting is application of DRY (“Don’t Repeat Yourself”) for fields that have equivalent definitions elsewhere within the same XHTML document or its MIME headers.

See a related discussion on 2006-01-27 on hreview-feedback.

Examples (Preliminary)

Simple Listing

Parking space for rent (2/2/06)
2 compact car spaces in a secure underground garage at:
1738 Elm St.
Somewhere, ED 34567 ISA
Available in April 2006 for $215/mo
Please contact John Broker at 110.555.1212 (C)
 <div class="hlisting">
   <p>
     <span class="item fn">Parking space</span>
     <span class="offer rent">for rent</span>
     (<abbr class="dtlisted" title="20060202">2/2/06</abbr>)
   </p>
   <p class="description">
     2 compact car spaces in a secure underground garage at:
     <div class="location vcard adr">
       <span class="street-address">1738 Elm St.</span>
       <span class="locality">Somewhere</span>, <span class="region">ED</span>
       <span class="postal-code">34567</span> <span class="country">ISA</span> 
     </div>
     Available in <abbr class="dtexpired" title="20060401">April 2006</abbr>
     for <span class="price">$215/qtr</span>
   </p>
   <div class="lister vcard">
      Please contact <span class="fn">John Broker</span> at 
      <span class="tel"><span class="value">(110) 555-1212</span> 
      (<abbr class="type" title="cell">C</abbr>)</span>
   </div>
</div> 

Extended Examples

See hListing Extended Examples for real-world examples from Craigslist, eBay.com, and Match.com.

Challenge Problems

See hListing Challenge Problems for some hypothetical examples that illustrate corners of the specification.

Examples in the Wild

  • Edgeio has started to produce output with hListings
  • Dealtagger supports hListing
  • Emurse supports hListing on job postings


Blogmatrix have a handy microformat parser which now supports hListing here

Changes

6 Feb 2006: clarified definitions of fields throughout.

5 Feb 2006: Reformatted into wiki-markup style.

4 Feb 2006: Folded the sense of “taken” into dtexpired, re-imported item type from hReview, and combined action and status. Added an example. Removed anonymous listings, since that is an unlikely use case (pseudonymous, perhaps, but not anonymous).

late Jan 2006: initial conversations started with the insight that hReview does a great job of describing items, and that we could shoehorn in listing semantics using a) magic tags to mean for-sale and b) mapping price onto dimensioned ratings. Tantek correctly nailed this as a-priori thinking, and encouraged us to start by designing the right spec for listings, and only sharing what was necessary.

Discussions