h-listing: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
m (created the h-listing draft page)
 
(s/<source>/<syntaxhighlight>/)
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<entry-title>h-listing draft</entry-title>
{{DISPLAYTITLE:h-listing draft}}
{{DraftSpecification}}
{{DraftSpecification}}


<dfn style="font-style:normal;font-weight:bold">h-listing</dfn> is a simple, open format for publishing product data on the web. h-listing is one of several open [[microformats|microformat]] draft standards suitable for embedding data in HTML/HTML5.
<dfn style="font-style:normal;font-weight:bold">h-listing</dfn> is a simple, open format for publishing product data on the web. h-listing is one of several open [[microformats|microformat]] draft standards suitable for embedding data in HTML.


h-listing is the [[microformats2]] update to [[hListing]].
h-Listing is the [[microformats2]] update to [[hListing]].


{{cc0-owfa-license}}
{{cc0-owfa-license}}
Line 26: Line 26:
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.
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|hReview]] is about an item and what you think of it, h-Listing is about an item and what you want to ''do'' with it.
If [[hreview|hReview]] is about an item and what you think of it, h-listing is about an item and what you want to ''do'' with it.


=== Inspiration and Acknowledgments ===
=== 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 and later on, h-Listing for our proposal.
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 and later on, h-Listing for our proposal.


=== Scope ===
=== Scope ===
Line 39: Line 38:


=== In General ===
=== 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|hReview]], [[hcard|hCard]], [[hcalendar|hCalendar]] standards.
The h-listing 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|hReview]], [[hcard|hCard]], [[hcalendar|hCalendar]] standards.


=== Properties ===
(Not yet finished)


=== Properties ===
The class '''<code>h-listing</code>''' is a ''root class name'' that indicates the presence of an h-Listing.
The class '''<code>h-listing</code>''' is a ''root class name'' that indicates the presence of an h-Listing.


* h-Listing
* <kbd>h-listing</kbd>: root
** <kbd>p-lister</kbd>: [[h-card]]
** <kbd>dt-listed</kbd>: datetime, optional
** <kbd>dt-expired</kbd>: datetime, optional
** <kbd>p-price</kbd>: text, optional (should include a floating-point number with optional ISO currency codes)
** <kbd>p-category</kbd>: text, optional, zero or more
** <kbd>p-action</kbd>: text, optional, one of the following values
*** sell, rent, trade, meet, announce, offer, wanted, event, service
** <kbd>u-url</kbd>




==== Summary of Changes ====
==== Summary of Changes ====
 
* Modified to use [[microformats-2]].
* The <kbd>version</kbd> property from [[hListing]] has been deprecated. No hListing markup (even in example files used by parsers) has ever been presented that actually uses the version property, nor any enumeration of valid values. No other microformat thus far has had a version property, and explicit versioning seems like clumsy design: any future changes to the specification should be made in such a way as to support existing content and degrade gracefully per the [http://www.w3.org/TR/html-design-principles/#compatibility design principles of HTML].
* The <kbd>dtlisted</kbd> and <kbd>dtexpired</kbd> properties are prefixed with <kbd>dt-</kbd> in microformats2 anyway, so no duplication of the <kbd>dt</kbd> is needed.
* <kbd>lister</kbd> must contain an embedded <kbd>[[h-card]]</kbd> object for simplicity—the [[microformats-2-parsing]] specification would need to be modified to specify any optimisations there.
* The use of [[rel-tag]] has been deprecated due to the <kbd>rel</kbd> attribute being defined as document scoped in HTML5. Following on from the example of <kbd>[[h-entry]]</kbd>, <kbd>category</kbd> seems the ideal mapping.
* <kbd>permalink</kbd> has been replaced with <kbd>url</kbd> following [[h-entry]].


==Property Details==
==Property Details==


h-Listing property details:
h-Listing property details:
==Authoring guidelines==
=== action type internationalisation ===
One issue with hard-coded action types is it prevents internationalisation.
The <kbd>p-</kbd> value [[microformats-2-parsing#parsing_a_p-_property|parsing algorithm]] can be used to provide an alternative text description in a non-English language, at the cost of introducing [[invisible data]].
For instance, one could use a <kbd>data</kbd> element.
<syntaxhighlight lang="html">
<section class="h-listing" lang="fr">
  <h1><data class="action" value="sale">À vendre</data>! <span class="summary">Belle usine widget pour produire widgets magique et révolutionnaire</span></h1>
</section>
</syntaxhighlight>




Line 59: Line 87:




=== Challenge Problems ===
=== Challenges and problems ===


See [[h-listing-challenges|h-Listing Challenge Problems]] for some hypothetical examples that illustrate corners of the specification.
See [[h-listing-challenges|h-Listing Challenge Problems]] for some hypothetical examples that illustrate corners of the specification.
* If no action is specified, should parsers assume the 'sale' property? A listing with no action seems less than useful.




Line 73: Line 103:


== implementations ==
== implementations ==
Please add links to sites that consume h-Listings, and tools which generate h-Listings.
Please add links to sites that consume h-listings, and tools which generate h-listings.
* ...
* ...


Line 81: Line 111:


== Background ==
== Background ==
 
Unlike [[hCard]], [[hCalendar]], [[hReview]] and other microformats, hListing has not been nearly as widely adopted. A number of inconsistencies and unclear properties has led to difficulty by page authors to implement the microformat.


== Discussions ==
== Discussions ==
* Feedback is encouraged on the [[h-listing-feedback]] page.
* Feedback is encouraged on the [[h-listing-feedback]] page.


===Internationalization===
===Internationalization===

Latest revision as of 21:56, 13 November 2022

This document represents a draft microformat specification. Although drafts are somewhat mature in the development process, the stability of this document cannot be guaranteed, and implementers should be prepared to keep abreast of future developments and changes. Watch this wiki page, or follow discussions on the #microformats IRC channel to stay up-to-date.

h-listing is a simple, open format for publishing product data on the web. h-listing is one of several open microformat draft standards suitable for embedding data in HTML.

h-Listing is the microformats2 update to hListing.

Per CC0, to the extent possible under law, the editors have waived all copyright and related or neighboring rights to this work. In addition, as of 2024-11-25, the editors have made this specification available under the Open Web Foundation Agreement Version 1.0.


Draft Proposal

Editors


Authors and Contributors

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, h-listing 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 and later on, h-Listing for our proposal.

Scope

Format

In General

The h-listing 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.

Properties

(Not yet finished)

The class h-listing is a root class name that indicates the presence of an h-Listing.

  • h-listing: root
    • p-lister: h-card
    • dt-listed: datetime, optional
    • dt-expired: datetime, optional
    • p-price: text, optional (should include a floating-point number with optional ISO currency codes)
    • p-category: text, optional, zero or more
    • p-action: text, optional, one of the following values
      • sell, rent, trade, meet, announce, offer, wanted, event, service
    • u-url


Summary of Changes

  • Modified to use microformats-2.
  • The version property from hListing has been deprecated. No hListing markup (even in example files used by parsers) has ever been presented that actually uses the version property, nor any enumeration of valid values. No other microformat thus far has had a version property, and explicit versioning seems like clumsy design: any future changes to the specification should be made in such a way as to support existing content and degrade gracefully per the design principles of HTML.
  • The dtlisted and dtexpired properties are prefixed with dt- in microformats2 anyway, so no duplication of the dt is needed.
  • lister must contain an embedded h-card object for simplicity—the microformats-2-parsing specification would need to be modified to specify any optimisations there.
  • The use of rel-tag has been deprecated due to the rel attribute being defined as document scoped in HTML5. Following on from the example of h-entry, category seems the ideal mapping.
  • permalink has been replaced with url following h-entry.

Property Details

h-Listing property details:

Authoring guidelines

action type internationalisation

One issue with hard-coded action types is it prevents internationalisation.

The p- value parsing algorithm can be used to provide an alternative text description in a non-English language, at the cost of introducing invisible data.

For instance, one could use a data element.

<section class="h-listing" lang="fr">
  <h1><data class="action" value="sale">À vendre</data>! <span class="summary">Belle usine widget pour produire widgets magique et révolutionnaire</span></h1>
</section>


Examples

Challenges and problems

See h-Listing Challenge Problems for some hypothetical examples that illustrate corners of the specification.

  • If no action is specified, should parsers assume the 'sale' property? A listing with no action seems less than useful.


Examples in the Wild

This section is informative.

The following sites have implemented h-listing, and thus are a great place to start for anyone looking for examples "in the wild" to try parsing, indexing, organizing etc. If your site is marked up with hListing, feel free to add it to the top of this list. Include both a URL to the top level site, and at least one URL to a specific hListing item on that site so that the hListing markup can be verified.

Once the list grows too big, we'll make a separate wiki page like h-listing-examples-in-wild.


implementations

Please add links to sites that consume h-listings, and tools which generate h-listings.

  • ...


Changes

Background

Unlike hCard, hCalendar, hReview and other microformats, hListing has not been nearly as widely adopted. A number of inconsistencies and unclear properties has led to difficulty by page authors to implement the microformat.

Discussions

Internationalization

Internationalization: Though there are many English-language tokens, they are only used as 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 h-Listings.


See also