h-product: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
(fix example to use data open and close tags Undo revision 58702 by Andrewmaier (Talk))
No edit summary
Line 1: Line 1:
<entry-title>h-product</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-product</dfn> is a simple, open format for publishing product data on the web. h-product is one of several open [[microformats|microformat]] draft standards suitable for embedding data in HTML/HTML5.
HOW MAKE THING BE THROUGH
 
HOW ANYTHING THROUGH
h-product is the [[microformats2]] update to [[hProduct]].
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 minimal product example:
HOW EVERYTHING BE THROUGH
 
HOW MAKE EVERYTHING BE THROUGH
<source lang=html4strict>
HOW UNIVERSE THROUGH
<div class="h-product">
HOW MAKE UNIVERSE THROUGH
  <h1 class="p-name">Microformats For Dummies</h1>
HOW UNIVERSE BE THROUGH
  <img class="u-photo" src="http://example.org/mfd.png" alt="" />
HOW MAKE UNIVERSE BE THROUGH
  <div class="e-description">
HOW THING OUT
    <p>Want to get started using microformats, but intimidated by hyphens and mediawiki? This book contains everything you need to know!</p>
HOW MAKE THING OUT
  </div>
HOW THING BE OUT
  <p>Yours today for only <data class="p-price" value="20.00">$20.00</data>
HOW MAKE THING BE OUT
    from <a class="p-brand h-card" href="http://example.com/acme">ACME Publishing inc.</a>
HOW ANYTHING OUT
  </p>
HOW MAKE ANYTHING OUT
</div>
HOW ANYTHING BE OUT
</source>
HOW MAKE ANYTHING BE OUT
 
HOW EVERYTHING OUT
=== Get started ===
HOW MAKE EVERYTHING OUT
The class '''<code>h-product</code>''' is a ''root class name'' that indicates the presence of an h-product.
HOW EVERYTHING BE OUT
 
HOW MAKE EVERYTHING BE OUT
'''p-name''', '''p-price''', '''u-photo''' and the other property classnames listed below define elements as ''properties'' of the h-product.
HOW UNIVERSE OUT
 
HOW MAKE UNIVERSE OUT
See [[microformats-2-parsing]] to learn more about property classnames.
HOW UNIVERSE BE OUT
 
HOW MAKE UNIVERSE BE OUT
== Properties ==
HOW THING THROUGH
h-product properties, inside an element with class '''h-product''':
HOW MAKE THING THROUGH
* '''<code>p-name</code>''' - name of the product
HOW THING BE THROUGH
* '''<code>u-photo</code>''' - photo of the product
HOW MAKE THING BE THROUGH
* '''<code>p-brand</code>''' - manufacturer, can also be embedded <code>h-card</code> {{main|h-card}}
HOW ANYTHING THROUGH
* '''<code>p-category</code>''' - freeform categories or tags applied to the item by the reviewer
HOW MAKE ANYTHING THROUGH
* '''<code>e-description</code>'''
HOW ANYTHING BE THROUGH
* '''<code>u-url</code>''' - URL of the product
HOW MAKE ANYTHING BE THROUGH
* '''<code>u-identifier</code>''' - includes type (e.g. mpn, upc, isbn, issn, sn, vin, sku etc.) and value.
HOW EVERYTHING THROUGH
* '''<code>p-review</code>''' - a review of the product, optionally embedded <code>h-review</code> {{main|h-review}}
HOW MAKE EVERYTHING THROUGH
* '''<code>p-price</code>''' - retail price of the product
HOW EVERYTHING BE THROUGH
 
HOW MAKE EVERYTHING BE THROUGH
== Status ==
HOW UNIVERSE THROUGH
 
HOW MAKE UNIVERSE THROUGH
'''h-product''' is a microformats.org draft specification. Public discussion on h-product takes place on [[h-product-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-product is ready to use and implemented in the wild, but for backwards compatibility you should also mark h-products up with classic [[hProduct]] classnames.
HOW THING OUT
 
HOW MAKE THING OUT
== Property Details ==
HOW THING BE OUT
 
HOW MAKE THING BE OUT
(stub, add any property explanations here)
HOW ANYTHING OUT
 
HOW MAKE ANYTHING OUT
TODO: u-identifier supposedly “includes type” — how so? URI scheme? Need examples of how to mark up the various different identifier types.
HOW ANYTHING BE OUT
 
HOW MAKE ANYTHING BE OUT
'''price''' was an experimental property which has real world adoption due to [[Google]] and [[Bing]] search support of hProduct. Due to this it has been included in the updated h-product spec.
HOW EVERYTHING OUT
 
HOW MAKE EVERYTHING OUT
== Examples in the Wild ==
HOW EVERYTHING BE OUT
* … add any h-product examples you find in the wild
HOW MAKE EVERYTHING BE OUT
 
HOW UNIVERSE OUT
 
HOW MAKE UNIVERSE OUT
{{h-spec-section-validating}}
HOW UNIVERSE BE OUT
 
HOW MAKE UNIVERSE BE OUT
 
== Backward Compatibility ==
=== Publisher Compatibility ===
For backward compatibility, you may wish to use classic [[hProduct]] classnames in addition to the more future-proof h-product properties, for example:
 
<source lang=html4strict>
<div class="h-product hproduct">
  <h1 class="p-name fn">Product Name</h1>
</div>
</source>
 
=== Parser Compatibility ===
Microformats parsers should detect classic properties and parse them as microformats2 properties. If an "h-product" is found, don't look for an "hProduct" on the same element.
 
Compatibility root class name: hProduct
 
Properties: (parsed as p- plain text unless otherwise specified)
 
* <code>fn</code> - parse as '''<code>p-name</code>'''
* <code>photo</code>  - parse as '''u-'''
* <code>brand</code>
* <code>category</code>
* <code>description</code>
* <code>identifier</code> - parse as '''u-'''
* <code>url</code> - parse as '''u-'''
* <code>review</code> - including compat root class <code>hreview</code> in the absence of <code>h-review</code>
* <code>price</code>
 
== Background ==
 
h-product is based on the existing [[hProduct]] specification.
 
== See Also ==
* [[h-product-feedback]]
* [[microformats2]]
* [[h-card]] can be embedded in h-product
* [[hProduct]] is the classic microformat replaced by h-product
 
[[Category:Draft Specifications]]

Revision as of 19:37, 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