hrecipe-ja: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
m (Replace <entry-title> with {{DISPLAYTITLE:}})
 
(34 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<entry-title>hRecipe-ja 0.22</entry-title>
{{DISPLAYTITLE:hRecipe-ja}}
<h1>hRecipe</h1>
<h1>hRecipe</h1>
{{Template:DraftSpecification}}
{{Template:DraftSpecification-ja}}
{{TOC-right}}
{{TOC-right}}


http://www.livingathome.de/test/recipe/hRecipe.png
http://www.livingathome.de/test/recipe/hRecipe.png


[[recipe|hRecipe]] is a simple, open, distributed format, suitable for embedding information about recipes for cooking in (X)HTML, Atom, RSS, and arbitrary XML. hRecipe is one of several [[microformats]] open standards. This page and Microformat is in the public domain.
[[recipe|hRecipe]] はシンプル、オープン、分散されたフォーマットで、(X)HTML、Atom、RSS、そして任意の XML で料理のレシピについての情報を埋め込むのに適しています。hRecipe はオープンスタンダードな [[microformats]] の一つです。このページとマイクロフォーマットは、パブリックドメインです。


== hRecipe Microformat Draft Specification ==
== hRecipe Microformat Draft Specification ==
Line 25: Line 25:
== 概要 ==
== 概要 ==


The hRecipe microformat is designed for the mark-up of instructions for creating meals, drinks or food-based items. 
マイクロフォーマットの hRecipe は食事や飲み物、食材の調理方法をマークアップするためにデザインされています。


It is difficult for a browser to extract semantic information about a recipe described on a web page. Metadata such as author and name and details such as ingredients, method, preparation time etc provide relevant information about the recipe.
ブラウザがウェブページに記述されているレシピについての意味的な情報を抽出するのは困難です。メタデータはレシピの著者やレシピ名と材料、調理方法、調理時間についての詳細など、レシピに関係する情報を提供します。


Having such information marked up can provide a number of benefits to the viewer. If a web browser understands that a particular web page contains a recipe with specific characteristics, it can produce richer interactions. For example, specific searches may be performed for ingredients or authors via general search services such as Google and Wikipedia. Additionally, classification by crawlers can become more accurate. If there are 20 recipes found on a page, and they all contain a certain ingredient, it can be assumed that the page is not only about cooking, but also about that particular ingredient.
そのような情報をマークアップしておくことで閲覧者にいくらかの有益な情報を提供することができます。もしウェブブラウザがそれぞれのウェブページに含まれるレシピに関する固有の意味を理解できれば、豊かな相互作用を生み出すことができます。例えば、特定の検索は材料や著者のために Google Wikipedia などの一般的な検索サービスで実行されるかもしれません。さらにクローラによる分類は、より正確になることができます。1ページで見つけられたレシピが20ほどあって、ある材料を含んでいるなら、そのページが料理だけではなく、その特定の材料についてのページと仮定することができます。


In order to enable and encourage the sharing, distribution, syndication, and aggregation of recipes, the authors propose the hRecipe microformat, an open standard for distributed recipe metadata. The authors have researched both numerous [[recipe-examples]] in the wild and earlier attempts at [[recipe-formats]], and have designed hRecipe around a simple minimal schema for recipe content.  Feedback is encouraged on the [[recipe-feedback|hRecipe feedback]] page.
レシピの集約とシンジケーションおよび流通と共有と促進を可能にするために、作者はレシピのメタデータを分類するオープンスタンダードな hRecipe マイクロフォーマットを提案します。作者は [[recipe-formats]] についてのワイルドで初期の試みにおいて多数の [[recipe-examples]] を研究し、レシピコンテンツのためにシンプルで小さいスキーマである hRecipe を設計しました。フィードバックは [[recipe-feedback|hRecipe feedback]] ページでお願いします。


=== Inspiration and Acknowledgments ===
=== インスピレーションと謝辞 ===


Many thanks to the various individuals that did research and proposed ideas and discussion related to the hRecipe-format and recipes in general.
研究成果やアイデアを提案したり、hRecipe-format やレシピに関係した議論をおこなった様々な人達に感謝しています。


=== Scope ===
=== 範囲 ===


hRecipe is a format to annotate descriptions and lists of ingredients for the preparation of food and meals. Recipes consistently share several common properties. hRecipe has been based on this minimal common subset.
hRecipe は食物と食事の準備ための説明と材料リストに注釈を付けるフォーマットです。レシピは常にいくつもの共通したプロパティを共有します。hRecipe は最小限の一般的なサブセットをベースにしています。


=== Out of scope ===
=== 範囲外 ===
 
Recipes that are not for stuff that's meant to be eaten by humans are out of scope.


人間が食べることのできないレシピは hRecipe の範囲外です。


== 書式 ==
== 書式 ==


{{rfc-2119-intro}}
{{rfc-2119-intro-ja}}


=== 通例 ===
=== 通例 ===
The hRecipe format is based on a set of properties common to numerous recipe sites and formats in use today on the web.  Where possible property names have been chosen based on those defined by related microformat standards.<br>
Some properties are marked ''experimental'' since they exceed the minimum set of properties needed to describe a recipe but still are very commonly used on the web. It's not sure if they are relevant enough for inclusion in the format. Implementation and general uptake of these properties will be observed and inform further decisions. So their use is not at all discouraged - but use them with care and be prepared for their eventual removal from the final spec.


hRecipe フォーマットは多くのレシピサイトで使われている一般的なプロパティのセットと、今日のウェブで使われているフォーマットをベースにしています。プロパティ名は関連する microformat standards で定義済みのものがベースに選ばれました。<br>
いくつかのプロパティはレシピを説明するのに必要な最小限のセットを上回る''実験的''な記述ですが、ウェブでは一般的に利用されています。それらが( hRecipe )フォーマットに含まれるのに十分関連するプロパティかどうかは、わかりません。これらのプロパティの実装と導入は観察され、さらに決定されて提供されるでしょう。それらのプロパティは非推奨ではありません。しかし最終的な仕様から削除される可能があるので注意して使用してください。


=== スキーマ ===
=== スキーマ ===
Line 76: Line 75:
=== プロパティの詳細 ===
=== プロパティの詳細 ===


<code>fn</code>, <code>photo</code>, <code>author</code>, <code>value</code> と <code>type</code> のプロパティは [[hCard]] に従います。<code>duration</code> のプロパティは [[hAudio]] に従います。<code>summary</code> のプロパティは [[hCalendar]] に従います。<code>published</code> のプロパティは [[hAtom]] に従います。<code>tag</code> のプロパティは [[rel-tag]] に従います。
<code>fn</code>, <code>photo</code>, <code>author</code>, <code>value</code> と <code>type</code> のプロパティは [[hcard-ja|hCard]] に従います。<code>duration</code> のプロパティは [[hAudio]] に従います。<code>summary</code> のプロパティは [[hcalendar-ja|hCalendar]] に従います。<code>published</code> のプロパティは [[hAtom]] に従います。<code>tag</code> のプロパティは [[rel-tag-ja|rel-tag]] に従います。




Line 129: Line 128:
==== photo ====
==== photo ====


Accompanying image.
添付写真


* The property is identified by the name <code>photo</code>.
* プロパティは、<code>photo</code> で識別されます。
* A Recipe {{may}} include one or more <code>photo</code> properties.
* レシピは、ひとつもしくは複数の <code>photo</code> プロパティを含めることができます。
* The property {{should}} use an &lt;img&gt; element. It {{may}} use any other element that contains a URL, such as &lt;a&gt; or &lt;object&gt;, but it is not recommended. See [[hRecipe#Semantic_XHTML_Design_Principles | notes]] below.
* プロパティは、img 要素を使用してください。a 要素や object 要素など URL を含んだ他の要素を使用することができますが、推奨されていません。[[hRecipe#Semantic_XHTML_Design_Principles|注釈]]を参照してください。
* The property is considered ''experimental'' and may be removed from the final specification.
* プロパティは、実験的で最終的な仕様から削除される可能性があります。


==== summary ====
==== summary ====


The summary provides a short introduction to or an accompanying statement about the recipe.
概要はレシピに関する短い紹介または付帯事項を提供します。


* The property is identified by the name <code>summary</code>.
* プロパティは <code>summary</code> で識別されます。
* A Recipe {{may}} include a <code>summary</code>.
* レシピは <code>summary</code> を含むことができます。
* The property {{must}} follow the conventions outlined in [[hCalendar]]. Plain text fulfills these requirements.
* プロパティは [[hCalendar]] のルールに従う必要があります。プレーンテキストはこれらの要件を満たします。
* The property is considered ''experimental'' and may be removed from the final specification.
* プロパティは実験的で最終的な仕様から削除される可能性があります。


==== author ====
==== author ====


An author is the person who wrote the recipe.
著者は、レシピを書いた人です。


* The property is identified by the name <code>author</code>.
* プロパティは <code>author</code> で識別されます。
* A Recipe {{may}} include one or more <code>author</code> properties.
* レシピは、ひとつもしくは複数の <code>author</code> プロパティを含めることができます。
* The contents of the element {{may}} be a plain text string in which case it defaults to a "vcard fn". Anything more elaborate  {{must}} follow the conventions outlined in [[hCard]].
* 要素の内容は "vcard fn" 標準のプレーンテキスト文字列が利用されます。何よりも [[hCard]] の仕様に従わなければなりません。
* The element is considered ''experimental'' and may be removed from the final specification.
* プロパティは、実験的で最終的な仕様から削除される可能性があります。


==== published ====
==== published ====


The date the recipe was published.
レシピが公開された日付。


* The property is identified by the name <code>published</code>.
* プロパティは <code>published</code> で識別されます。
* A Recipe {{may}} include a <code>published</code> date.
* レシピは <code>published</code> を含むことができます。
* The property {{may}} be encoded using the [[value-class-pattern|value-class-pattern]], e.g.:<source lang=html4strict><p>Published <span class="published"><span class="value-title" title="2008-10-14T10:05:37-01:00"> </span>14. Oct 2008</span></p></source>
* プロパティは [[value-class-pattern|value-class-pattern]] を使用してエンコードされます:<source lang=html4strict><p>Published <span class="published"><span class="value-title" title="2008-10-14T10:05:37-01:00"> </span>14. Oct 2008</span></p></source>
* The property is considered ''experimental'' and may be removed from the final specification.
* プロパティは、''実験的''で最終的な仕様から削除される可能性があります。


==== nutrition ====
==== nutrition ====


Nutritional information like calories, fat, dietary fiber etc.
カロリーや脂肪、食物繊維など栄養分情報


* The property is identified by name <code>nutrition</code>.
* プロパティは <code>nutrition</code> で識別されます。
* A Recipe {{may}} include one or more <code>nutrition</code> properties.
* レシピは、ひとつもしくは複数の <code>nutrition</code> プロパティを含めることができます。
* The property {{may}} include the properties <code>value</code> and <code>type</code> following the conventions outlined in [[hCard]]. In this case each nutritional information item should be marked up with it's own <code>nutrition</code> property. These subelement are considered ''experimental'' and may be replaced by 'num' and 'unit' from [[measure]].
* プロパティは [[hCard]] の規則に従った <code>value</code> (値)と <code>type</code> (型)を含むことができます。この場合、それぞれの栄養分情報の項目は <code>nutrition</code> プロパティに含むかたちでマークアップしなければなりません。これらのサブエレメントは実験的で最終的な仕様から削除される可能性か、[[measure|分量]]から"数値(num)”と"単位(unit)"に置き換えられます。
* The property <code>nutrition</code> itself is also considered ''experimental'' and may be removed from the final specification.
* <code>nutrition</code> は、''実験的''で最終的な仕様から削除される可能性があります。


==== tag ====
==== tag ====


A keyword indicating a subject or an important aspect of the recipe like it's main ingredient, type of meal etc.
主成分や食事の種類などレシピのテーマや重要な面などキーワードに示します。


* The property is identified by the name <code>tag</code>.
* プロパティは <code>tag</code> で識別されます。
* A Recipe {{may}} include one or more <code>tag</code>'s.
* レシピは、ひとつもしくは複数の <code>tag</code> プロパティを含めることができます。
* The property {{must}} follow the conventions outlined in [[rel-tag]].
* プロパティは [[rel-tag]] のルールに従う必要があります。
* The property is considered ''experimental'' and may be removed from the final specification.
* プロパティは、''実験的''で最終的な仕様から削除される可能性があります。


=== Version history ===
=== Version history ===
Line 190: Line 189:
=== Parser Processing Notes ===
=== Parser Processing Notes ===


* If the "author" property contains only a plain text string it should be regarded as of type "vcard fn".
* もし" author "プロパティがプレーンテキストのみ含んでいるならば、" vcard fn "形式と見なすべきです。
 


=== Semantic XHTML Design Principles ===
=== Semantic XHTML Design Principles ===


{{semantic-xhtml-design-principles}}
{{semantic-xhtml-design-principles-ja}}




==== More Semantic Equivalents ====
==== More Semantic Equivalents ====


For some properties there is a more semantic equivalent, and therefore they get special treatment, e.g.:
いくつかのプロパティはよりセマンティックな同義な語で、したがってそれらは例のように特別な処理をできます:
 
* For "photo", use <code><img class="photo" src="..." alt="" /></code>


* For "photo", use <code><img class="photo" src="..." alt="" /></code>


==== Language ====
==== Language ====


* To explicitly convey the natural language that an recipe is written in, use the standard (X)HTML 'lang' or 'xml:lang' attribute on the element with class="hrecipe"
* 自然言語で書かれているレシピを明確に伝えるなら、標準的な (X)HTMLで class="hrecipe" の要素に 'lang' または 'xml:lang' 属性を付加してください。
**e.g. <code><nowiki><p>I like <span class="hrecipe" lang="de"><span class="fn">Kartoffelknödel</span></span> best.</p></nowiki></code>
**例:<code><nowiki><p>I like <span class="hrecipe" lang="de"><span class="fn">Kartoffelknödel</span></span> best.</p></nowiki></code>
*If portions of an hRecipe (e.g. an ingredient name) are in a different language to the rest of the hRecipe, use the 'lang' or 'xml:lang' attribute on those portions.
* もし hRecipe (例えば材料の名前)の一部が異なる言語であるなら、その箇所に 'lang' または 'xml:lang' 属性で言語を指定してください。
* hRecipe parsers which need to handle the native language of hRecipe {{must}} process the standard (X)HTML 'lang' or 'xml:lang' attribute as specified.
* hRecipe が書かれている自国語を取り扱う必要がある hRecipe パーサーは特定の標準的な (X)HTML 'lang' または 'xml:lang' 属性で処理しなければなりません。
* hRecipe parsers which need to handle native language {{may}} traverse up the DOM to discover the native language of the page and apply that to the hRecipe if no other language is specified on the hRecipe.
* 他のいかなる言語も hRecipe の上で指定されてなく、自国語を取り扱う必要がある hRecipe パーサーはページ内の自国語を発見し、それを hRecipe に適用するために DOM ツリーを横断するかもしれません。
 


==== Human vs. Machine Readable ====
==== Human vs. Machine Readable ====


If an <code>&lt;abbr></code> element is used for a property, then its '<code>title</code>' attribute is used for the value of the property, instead of the contents of the element, which can then be used to provide a user-friendly alternate presentation of the value.
もし <code>&lt;abbr&gt;</code> 要素がプロパティに用いられている場合、要素の内容ではなく <code>&lt;abbr&gt;</code> 要素の '<code>title</code>' 属性値がプロパティの値となります。要素の内容は、より人間にとって読みやすい値の表現となります。
 
If an <code>&lt;a&gt;</code> element is used for one or more properties, it {{must}} be treated as follows:
# For the 'photo' property and any other property that takes a URL as its value, the <code>href="..."</code> attribute provides the property value.
# For other properties, the element's content is the value of the property.


If an <code>&lt;img&gt;</code> element is used for the 'photo' property, it {{must}} use the property value provided by the <code>src="..."</code> attribute as property value.
もし <code>&lt;a&gt;</code> 要素がひとつまたは複数のプロパティに用いられている場合、次のように処理される必要があります (must):
# 'photo' プロパティと、他に URL を取るすべてのプロパティでは、<code>href="..."</code> 属性の値がプロパティの値となります。
# その他のプロパティでは、要素の内容がプロパティの値となります。


If an <code>&lt;object&gt;</code> element is used for the 'photo' property, it {{must}} use the property value provided by the <code>data="..."</code> attribute as property value.
もし <code>&lt;img&gt;</code> 要素を 'photo' プロパティに用いる場合、<code>src="..."</code> 属性の値をプロパティの値として使用する必要があります (must)。


もし <code>&lt;object&gt;</code> 要素を 'photo' プロパティに用いる場合、<code>data="..."</code> 属性の値をプロパティの値として使用する必要があります (must)。


=== Notes ===
=== Notes ===


This section is informative.
このセクションは参考です。


*Non so far.
*Non so far.


== XMDP Profile ==
== XMDP Profile ==
Line 303: Line 297:
== Examples ==
== Examples ==


This section is informative.
このセクションは参考です。


Here '''will be''' a few examples of recipes, from real web sites, showing how they could be easily enhanced to use hRecipe. In the meantime the following contrieved example will have to do.
ここでは実際のウェブサイトからにあるレシピの情報を、簡単に hRecipe として使うことができるいくつかの例がいくつかあります(will be)。差し当たり、以下のように不自然な例である必要があります。


<source lang=html4strict><div class="hrecipe">
<source lang=html4strict><div class="hrecipe">
Line 362: Line 356:
-->
-->


== Examples in the wild ==
== 実装例 ==


This section is '''informative'''
このセクションは'''参考情報'''です。


Sites and pages that publish hRecipes. When it gets too big we can move it to a separate page like [[hrecipe-examples-in-wild]].
hRecipe が利用されているサイトやページです。リストが大きくなったら、[[hrecipe-examples-in-wild]] といった別のページにて紹介する予定です。


* [http://www.epicurious.com/ Epicurious.com]'s [http://www.epicurious.com/recipesmenus/ recipes] have been marked up with hRecipe as of April 2010. (E.g., [http://www.epicurious.com/recipes/food/views/Chocolate-Almond-and-Banana-Parfaits-357369 Chocolate, Almond, and Banana Parfaits])
* [http://www.epicurious.com/ Epicurious.com]'s [http://www.epicurious.com/recipesmenus/ recipes] have been marked up with hRecipe as of April 2010. (E.g., [http://www.epicurious.com/recipes/food/views/Chocolate-Almond-and-Banana-Parfaits-357369 Chocolate, Almond, and Banana Parfaits])
Line 374: Line 368:
* essen & trinken. As of spring 2009 [http://www.essen-und-trinken.de essen & trinken] publishes all recipes with hRecipe-conformant metadata encoded in RDF. See [[hrecipe-rdf]] for technical details.
* essen & trinken. As of spring 2009 [http://www.essen-und-trinken.de essen & trinken] publishes all recipes with hRecipe-conformant metadata encoded in RDF. See [[hrecipe-rdf]] for technical details.
* It's Ripe! As of January 2009, [http://itsripe.com/recipes/ http://itsripe.com] supports hRecipe for recipe pages and will soon add support in lists.
* It's Ripe! As of January 2009, [http://itsripe.com/recipes/ http://itsripe.com] supports hRecipe for recipe pages and will soon add support in lists.
* [http://recipe.gnavi.co.jp/ ぐるなびレシピ] レシピ詳細ページで hRecipe をサポート。ただし全レシピ詳細ページに hRecipe はサポートしていない。
*'''Wild Mushroom, Pancetta & Truffle Risotto''' by Toby Inkster
*'''Wild Mushroom, Pancetta & Truffle Risotto''' by Toby Inkster
** [http://tobyinkster.co.uk/blog/2008/10/23/mushroom-risotto/ Marked up as hRecipe] using the September 2007 draft format
** [http://tobyinkster.co.uk/blog/2008/10/23/mushroom-risotto/ Marked up as hRecipe] using the September 2007 draft format
** [http://srv.buzzword.org.uk/recipebook/tobyinkster.co.uk/blog/2008/10/23/mushroom-risotto/ RecipeBook XML] output from Cognition.
** [http://srv.buzzword.org.uk/recipebook/tobyinkster.co.uk/blog/2008/10/23/mushroom-risotto/ RecipeBook XML] output from Cognition.
** [http://srv.buzzword.org.uk/rdf-xml/tobyinkster.co.uk/blog/2008/10/23/mushroom-risotto/ RDF/XML] and [http://srv.buzzword.org.uk/turtle/tobyinkster.co.uk/blog/2008/10/23/mushroom-risotto/ Turtle] output from Cognition.
** [http://srv.buzzword.org.uk/rdf-xml/tobyinkster.co.uk/blog/2008/10/23/mushroom-risotto/ RDF/XML] and [http://srv.buzzword.org.uk/turtle/tobyinkster.co.uk/blog/2008/10/23/mushroom-risotto/ Turtle] output from Cognition.


== Implementations ==
== Implementations ==
This section is '''informative'''.
このセクションは'''参考情報'''です。


Tools for generating and consuming hRecipes. When it gets too big we can move it to a separate page like [[hrecipe-implementations]].
hRecipe の生成や処理できるツールです。リストが大きくなったら、[[hrecipe-implementations]] といった別のページにて紹介する予定です。


* Cognition.  As of September 2008, [http://buzzword.org.uk/cognition/ Cognition] has experimental support for this format. ([http://buzzword.org.uk/cognition/uf-plus.html#hrecipe Details of support].) Recipes may be exported in [[recipe-formats#RecipeBook_XML|RecipeBook XML]] format or RDF.
* Cognition.  As of September 2008, [http://buzzword.org.uk/cognition/ Cognition] has experimental support for this format. ([http://buzzword.org.uk/cognition/uf-plus.html#hrecipe Details of support].) Recipes may be exported in [[recipe-formats#RecipeBook_XML|RecipeBook XML]] format or RDF.
* WordPress Plugin. There's a [http://wordpress.org/ WordPress ]  [http://wordpress.org/extend/plugins/hrecipe/ hRecipe Plugin] available which makes adding hRecipe metadata to recipes very easy, practically effortless. Very nice!
* WordPress Plugin. There's a [http://wordpress.org/ WordPress ]  [http://wordpress.org/extend/plugins/hrecipe/ hRecipe Plugin] available which makes adding hRecipe metadata to recipes very easy, practically effortless. Very nice!
* hRecipeHelper. Released 16th March, 2011 [https://chrome.google.com/webstore/detail/cgpnljccbfcjhhekfnikhpllfjpjidlj hRecipeHelper] A Chrome Extension for building hRecipe formatted HTML for blogging or websites.


== 参考文献 ==


== References ==
=== 規範的な参考文献 ===
 
=== Normative References ===
* [http://www.w3.org/TR/2002/REC-xhtml1-20020801/ XHTML 1.0 SE]
* [http://www.w3.org/TR/2002/REC-xhtml1-20020801/ XHTML 1.0 SE]
* [http://gmpg.org/xmdp/ XMDP]
* [http://gmpg.org/xmdp/ XMDP]
Line 398: Line 392:
* [[datetime-design-pattern]]
* [[datetime-design-pattern]]


=== Informative References ===
=== その他の参考文献 ===
* [http://www.w3.org/TR/REC-CSS1 CSS1]
* [http://www.w3.org/TR/REC-CSS1 CSS1]
* ISO.8601.1988
* ISO.8601.1988
Line 409: Line 403:
* [[xoxo|XOXO]]
* [[xoxo|XOXO]]


=== Copyright ===
=== コピーライト ===


<span class="vevent"><span class="summary">Per [[Microformats_Wiki:Copyrights]], hRecipe was placed into the public domain</span> on <span class="dtstart">2008-11-14</span></span> by the authors. There are no usage, distribution, re-printing, or any other restrictions of any kind with regards to the text or content of this specification.
<span class="vevent">著者によって<span class="dtstart">2008年11月14日</span><span class="summary"> [[Microformats_Wiki:Copyrights]] を通じ、hRecipe はパブリックドメインになりました。</span></span>使用、配布、再版またはいかなる種類の他の制限も、この仕様のテキストまたは内容に関して含まれていません。


=== Patents ===
== 特許 ==
 
{{MicroFormatPatentStatement-ja}}
{{MicroFormatPatentStatement}}


=== Public Domain Release ===
=== Public Domain Release ===


The authors and editors of this page due hereby relinquish their copyright on the document and release the text of this page into the public domain.
このページの著者と編集者はドキュメント上の著作権を放棄することによって パブリックドメインでこのページの文書を公開しています。


* [[User:Phae|Frances Berriman]] (BBC)
* [[User:Phae|Frances Berriman]] (BBC)
Line 426: Line 419:
* [[User:ThomasLoertsch | Thomas Loertsch]] ([http://www.essen-und-trinken.de Gruner+Jahr])
* [[User:ThomasLoertsch | Thomas Loertsch]] ([http://www.essen-und-trinken.de Gruner+Jahr])


 
== 進行中の仕様 ==
== Work in progress ==
この仕様は現在進行中です。更なる特徴が議論され、理解され、書かれた時には追加されるでしょう。
This specification is a work in progress. As additional aspects are discussed, understood, and written, they will be added.


== derivative works ==
== derivative works ==

Latest revision as of 16:27, 18 July 2020

hRecipe

この文書は microformat のドラフト仕様です。ドラフトなので開発段階においてはいくらかは完成していますが、この文書の安定性は保証できません。なので開発者は将来の発展と変化に対応できるよう準備しておく必要があります。最新の情報を得るには、この wiki ページを見るか microformats-new mailing list の議論から学んで下さい。

hRecipe.png

hRecipe はシンプル、オープン、分散されたフォーマットで、(X)HTML、Atom、RSS、そして任意の XML で料理のレシピについての情報を埋め込むのに適しています。hRecipe はオープンスタンダードな microformats の一つです。このページとマイクロフォーマットは、パブリックドメインです。

hRecipe Microformat Draft Specification

編者

作者

貢献者

Andy Mabbett, Frances Berriman, Cameron Perry, John LeMasney, Tantek Çelik, SudarshanP, Ciaran McNulty, Lee Jordan, Robert Bachmann, jeffmcneill, Manu Sporny, Ryan King, HollyMarieKoltz, Straup, Christophe Ducamp, Mercman, Yde, Ameer Dawood, Scottk, Lee Jordan, MonroAlmon, EstevaoSamuel, Brian Suda, SteveL, JohnLeMasney,

Microformats #Copyright and #Patents statements apply.


概要

マイクロフォーマットの hRecipe は食事や飲み物、食材の調理方法をマークアップするためにデザインされています。

ブラウザがウェブページに記述されているレシピについての意味的な情報を抽出するのは困難です。メタデータはレシピの著者やレシピ名と材料、調理方法、調理時間についての詳細など、レシピに関係する情報を提供します。

そのような情報をマークアップしておくことで閲覧者にいくらかの有益な情報を提供することができます。もしウェブブラウザがそれぞれのウェブページに含まれるレシピに関する固有の意味を理解できれば、豊かな相互作用を生み出すことができます。例えば、特定の検索は材料や著者のために Google や Wikipedia などの一般的な検索サービスで実行されるかもしれません。さらにクローラによる分類は、より正確になることができます。1ページで見つけられたレシピが20ほどあって、ある材料を含んでいるなら、そのページが料理だけではなく、その特定の材料についてのページと仮定することができます。

レシピの集約とシンジケーションおよび流通と共有と促進を可能にするために、作者はレシピのメタデータを分類するオープンスタンダードな hRecipe マイクロフォーマットを提案します。作者は recipe-formats についてのワイルドで初期の試みにおいて多数の recipe-examples を研究し、レシピコンテンツのためにシンプルで小さいスキーマである hRecipe を設計しました。フィードバックは hRecipe feedback ページでお願いします。

インスピレーションと謝辞

研究成果やアイデアを提案したり、hRecipe-format やレシピに関係した議論をおこなった様々な人達に感謝しています。

範囲

hRecipe は食物と食事の準備ための説明と材料リストに注釈を付けるフォーマットです。レシピは常にいくつもの共通したプロパティを共有します。hRecipe は最小限の一般的なサブセットをベースにしています。

範囲外

人間が食べることのできないレシピは hRecipe の範囲外です。

書式

この文書内の語句 "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" は、RFC 2119 で記述される解釈で使われます。

通例

hRecipe フォーマットは多くのレシピサイトで使われている一般的なプロパティのセットと、今日のウェブで使われているフォーマットをベースにしています。プロパティ名は関連する microformat standards で定義済みのものがベースに選ばれました。
いくつかのプロパティはレシピを説明するのに必要な最小限のセットを上回る実験的な記述ですが、ウェブでは一般的に利用されています。それらが( hRecipe )フォーマットに含まれるのに十分関連するプロパティかどうかは、わかりません。これらのプロパティの実装と導入は観察され、さらに決定されて提供されるでしょう。それらのプロパティは非推奨ではありません。しかし最終的な仕様から削除される可能があるので注意して使用してください。

スキーマ

hRecipe スキーマは以下のプロパティで構成されます:

  • hrecipe
    • fn. 必須。テキスト。レシピの名前。
    • ingredient. 必須。1つ又はそれ以上の任意の妥当な (x)HTML でマークアップされたテキスト。
      • value and type. 任意。(実験的)
    • yield.任意。テキスト。
    • instructions. 任意。任意の妥当な (x)HTML でマークアップされたテキスト。
    • duration. 任意。1つ又はそれ以上のテキスト。
    • photo. 任意。1つ又はそれ以上。画像のような任意の要素を含んだ URLを使用。(実験的)
    • summary. 任意。テキスト。(実験的)
    • author. 任意。1つ又はそれ以上(実験的)
    • published. 任意。(実験的)
    • nutrition. 任意。1つ又はそれ以上(実験的)
      • value and type. 任意。(実験的)
    • tag. 任意。1つ又はそれ以上(実験的)


プロパティの詳細

fn, photo, author, valuetype のプロパティは hCard に従います。duration のプロパティは hAudio に従います。summary のプロパティは hCalendar に従います。published のプロパティは hAtom に従います。tag のプロパティは rel-tag に従います。


hRecipe スキーマのフィールドは次のように表します:

hRecipe

hRecipe はレシピの識別や値の記述、メタデータの関連付けに用いられます。 

  • hRecipe プロパティは hrecipe 名で識別されます。

fn

1つのレシピのタイトルです。概要は短いテキストで構成され関連性のあるグループ間を識別するのに使用されます。これは、食事や食材の名前に簡単な説明をします。

  • プロパティは fn で識別されます。
  • レシピは fn が必須です。
  • プロパティは hCard のルールに従う必要があります。例)プレーンテキストのみ使用

ingredient

レシピに使われているひとつまたは複数の材料を記述します。

  • プロパティは ingredient で識別されます。
  • レシピにはひとつまたは複数の ingredients を含む必要があります。
  • プロパティには(材料のリストなどを)妥当な HTML マークアップで含むことができます。
  • プロパティは hCard の規則に従った value (値)と type (型)を含むことができます。
    <p class="ingredient"><span class="value">125</span><span class="type">ml</span> milk</p>
    
    この場合、それぞれの材料は ingredient プロパティに含むかたちでマークアップしなければなりません。これらのサブプロパティは実験的で最終的な仕様から削除される可能性か、分量から"数値(num)”と"単位(unit)"に置き換えられます。

yield

このレシピで何人分の分量または数量(個数)を指定します。

  • プロパティは yield で識別されます。
  • レシピは yield を含むことができます。

instructions

レシピの方法手順。

  • プロパティは instructions で識別されます。
  • レシピは instructions を含むことができます。
  • プロパティは妥当な HTML でマークアップされた文章や手順のリストを含むことができます。

duration

調理に必要な時間を記述します。例えば生地を準備するための時間、生地の発酵に必要な時間、生地を焼く時間、ケーキ等を飾る時間など、複数の調理時間のプロパティを示すために使用することができます。

  • プロパティは duration で識別されます。
  • レシピは、ひとつもしくは複数の duration プロパティを含めることができます。
  • プロパティは value-class-pattern で略述した期間をコード化してください。調理時間が1時間30分の場合、ISO 8601 形式の"PT1H30M"に変換し、以下のようにコード化することができます:
    <span class="duration"><span class="value-title" title="PT1H30M"> </span>90 min</span>
    

photo

添付写真

  • プロパティは、photo で識別されます。
  • レシピは、ひとつもしくは複数の photo プロパティを含めることができます。
  • プロパティは、img 要素を使用してください。a 要素や object 要素など URL を含んだ他の要素を使用することができますが、推奨されていません。注釈を参照してください。
  • プロパティは、実験的で最終的な仕様から削除される可能性があります。

summary

概要はレシピに関する短い紹介または付帯事項を提供します。

  • プロパティは summary で識別されます。
  • レシピは summary を含むことができます。
  • プロパティは hCalendar のルールに従う必要があります。プレーンテキストはこれらの要件を満たします。
  • プロパティは実験的で最終的な仕様から削除される可能性があります。

author

著者は、レシピを書いた人です。

  • プロパティは author で識別されます。
  • レシピは、ひとつもしくは複数の author プロパティを含めることができます。
  • 要素の内容は "vcard fn" 標準のプレーンテキスト文字列が利用されます。何よりも hCard の仕様に従わなければなりません。
  • プロパティは、実験的で最終的な仕様から削除される可能性があります。

published

レシピが公開された日付。

  • プロパティは published で識別されます。
  • レシピは published を含むことができます。
  • プロパティは value-class-pattern を使用してエンコードされます:
    <p>Published <span class="published"><span class="value-title" title="2008-10-14T10:05:37-01:00"> </span>14. Oct 2008</span></p>
    
  • プロパティは、実験的で最終的な仕様から削除される可能性があります。

nutrition

カロリーや脂肪、食物繊維など栄養分情報

  • プロパティは nutrition で識別されます。
  • レシピは、ひとつもしくは複数の nutrition プロパティを含めることができます。
  • プロパティは hCard の規則に従った value (値)と type (型)を含むことができます。この場合、それぞれの栄養分情報の項目は nutrition プロパティに含むかたちでマークアップしなければなりません。これらのサブエレメントは実験的で最終的な仕様から削除される可能性か、分量から"数値(num)”と"単位(unit)"に置き換えられます。
  • nutrition は、実験的で最終的な仕様から削除される可能性があります。

tag

主成分や食事の種類などレシピのテーマや重要な面などキーワードに示します。

  • プロパティは tag で識別されます。
  • レシピは、ひとつもしくは複数の tag プロパティを含めることができます。
  • プロパティは rel-tag のルールに従う必要があります。
  • プロパティは、実験的で最終的な仕様から削除される可能性があります。

Version history

  • Version 0.22 changed the proposed formatting of time and date from the datetime-design-pattern, which has accessibility issues, to the value-class-pattern. Also corrected some errors in the example especially with regard to the correct handling of vcard properties.
  • Version 0.21 changed the status of ingredient/value and ingredient/type to experimental, mentioning that there still is discussion if they should be replaced by 'num' and 'unit' from measure (which is still in brainstorming).
  • Version 0.2: From Version 0.1 some elements have been renamed to strenghten re-use of established elements: fn for hRecipe-title, summary for hRecipe-summary, duration for preparation-time, value and type for num and unit. Also some elements have been marked experimental because of concerns of element bloat. See the hrecipe-issues page for a more thorough discussion.
    Draft 0.1 was already a result of long lasting efforts. Nonetheless after publishing of it there has been a lively debate about some properties. Since they mostly could be resolved version 0.2 is considered fairly stable now, although of course you never know ;-)


Parser Processing Notes

  • もし" author "プロパティがプレーンテキストのみ含んでいるならば、" vcard fn "形式と見なすべきです。

Semantic XHTML Design Principles

注:セマンティック XHTML デザイン指針は、始め hCardhCalendar 開発の文脈で書かれました。そのため、この指針は hCard デザインの方法論の文脈において理解しやすくなるでしょう(つまり、そちらをまず読んでください)。Tantek

XHTML は XML に基づいて作られており、そのため XHTML に基づいたフォーマットは、表示に便利なだけでなく一般的なデータ交換目的にも使えます。XHTML に基づいたフォーマットは、多くの点で HTML と XML の世界双方の最もよい所を体現しています。とは言え、XHTML に基づいたフォーマットを作成する時、指針を集めたものがあると役立ちます。

  1. 可能な限り、言及している、既存の確立されてよくサポートされている標準からスキーマ(名前、オブジェクト、プロパティ、値、種類、階層、制約)を再利用する。元の標準で表現されている制約を再宣言することは避ける。参考情報のために言及するのはよい。
    1. 複数の構成要素からなる種類のものには、その構成要素の名前に相当する class 名を持った要素を入れ子にして使う。
    2. 複数の構成要素は一つずつにする。そのため、カンマ区切りの複数のテキスト値を表すには、複数の要素を埋め込んで使う。
  2. 各オブジェクトなどのブロックを構成するのに一番適した意味的な XHTML を使う。
  3. そういったものが無ければ、構造を作る一般的な要素(例えば <span><div>)か文脈に適した要素(例えば <ul><ol> 中の <li>)を使う。
  4. 元のスキーマのその部分を的確に表現する XHTML の構成ブロックが無ければ、元のスキーマ由来の名前に基づいた class 名を使う。元のスキーマ中の名前が大文字と小文字を区別しないならば、相当するものを全て小文字にして使う。構成要素の(明確に定義されたスキーマではなく)日常語風の暗黙的な名前も、使いやすさのために、相当するものを全て小文字にして使うべきである。構成要素名中のスペースはダッシュ '-' 文字になる。
  5. 最後に、元のスキーマに従ったデータの形式があまりに長かったり人間に馴染まない場合、構造を作る一般的な要素の代わりに <abbr> を使い、忠実に従ったデータを(表現を記述する属性である)'title' 属性の中へ、相当するより簡潔で人間に読みやすいものを要素自体の中へ置く。<abbr> のこの使い方に関する説明のより多くの情報:Human vs. ISO8601 dates problem solved(人間 vs ISO8601 日付問題の解決)


More Semantic Equivalents

いくつかのプロパティはよりセマンティックな同義な語で、したがってそれらは例のように特別な処理をできます:

  • For "photo", use <img class="photo" src="..." alt="" />

Language

  • 自然言語で書かれているレシピを明確に伝えるなら、標準的な (X)HTMLで class="hrecipe" の要素に 'lang' または 'xml:lang' 属性を付加してください。
    • 例:<p>I like <span class="hrecipe" lang="de"><span class="fn">Kartoffelknödel</span></span> best.</p>
  • もし hRecipe (例えば材料の名前)の一部が異なる言語であるなら、その箇所に 'lang' または 'xml:lang' 属性で言語を指定してください。
  • hRecipe が書かれている自国語を取り扱う必要がある hRecipe パーサーは特定の標準的な (X)HTML 'lang' または 'xml:lang' 属性で処理しなければなりません。
  • 他のいかなる言語も hRecipe の上で指定されてなく、自国語を取り扱う必要がある hRecipe パーサーはページ内の自国語を発見し、それを hRecipe に適用するために DOM ツリーを横断するかもしれません。

Human vs. Machine Readable

もし <abbr> 要素がプロパティに用いられている場合、要素の内容ではなく <abbr> 要素の 'title' 属性値がプロパティの値となります。要素の内容は、より人間にとって読みやすい値の表現となります。

もし <a> 要素がひとつまたは複数のプロパティに用いられている場合、次のように処理される必要があります (must):

  1. 'photo' プロパティと、他に URL を取るすべてのプロパティでは、href="..." 属性の値がプロパティの値となります。
  2. その他のプロパティでは、要素の内容がプロパティの値となります。

もし <img> 要素を 'photo' プロパティに用いる場合、src="..." 属性の値をプロパティの値として使用する必要があります (must)。

もし <object> 要素を 'photo' プロパティに用いる場合、data="..." 属性の値をプロパティの値として使用する必要があります (must)。

Notes

このセクションは参考です。

  • Non so far.

XMDP Profile

<dl class="profile">
 <dt>class</dt>
 <dd><p>
  <a rel="help" href="http://www.w3.org/TR/html401/struct/global.html#adef-class">
   HTML4 definition of the 'class' attribute.</a>
  This meta data profile defines some 'class' attribute values (class names) 
  and their meanings as suggested by a 
  <a href="http://www.w3.org/TR/WD-htmllink-970328#profile">
   draft of "Hypertext Links in HTML"</a>.</p>
  <dl>
   <dt>hrecipe</dt>
   <dd>
    Used to identify and describe metadata associated with instructions for creating meals, drinks or food-based items.
   </dd>
   <dt>fn</dt>
   <dd>
    The title of the recipe.
   </dd>
   <dt>ingredient</dt>
   <dd>
    Describes the ingredient(s) used in the recipe.
   </dd>
   <dt>yield</dt>
   <dd>
    Specifies the quantity produced by the recipe.
   </dd>
   <dt>instructions</dt>
   <dd>
    The method of the recipe.
   </dd>
   <dt>duration</dt>
   <dd>
    The time it takes to prepare the meal described by the recipe.
   </dd>
   <dt>photo</dt>
   <dd>
    Accompanying image.
   </dd>
   <dt>summary</dt>
   <dd>
    The summary provides a short introduction or an accompanying statement about the recipe.
   </dd>
   <dt>author</dt>
   <dd>
   The person who authored the recipe..
   </dd>
   <dt>published</dt>
   <dd>
    The date that the recipe was made available to the public.
   </dd>
   <dt>nutrition</dt>
   <dd>
    Nutritional information like calories, fat, dietary fiber etc.
   </dd>
   <dt>tag</dt>
   <dd>
    Keyword(s) describing the recipe.
   </dd>
  </dl>
 </dd>
</dl>


Examples

このセクションは参考です。

ここでは実際のウェブサイトからにあるレシピの情報を、簡単に hRecipe として使うことができるいくつかの例がいくつかあります(will be)。差し当たり、以下のように不自然な例である必要があります。

<div class="hrecipe">
    <h1 class="fn">Pommes Frites</h1>
    <p class="summary">
        Pommes frites originate in outer space. They are served hot.<br />
        This recipe is only an example. Don't try this at home!
    </p>
    <p>
        Contributed by <span class="author">CJ Tom</span> and the
        <span class="author vcard"><a class="url fn" href="http://example.com">Cooky Gang</a></span>.
    </p>
     <p>Published <span class="published"><span class="value-title" title="2008-10-14T10:05:37-01:00"> </span>14. Oct 2008</span></p>
    <img src="/img/pommes.png" class="photo" width="100" height="100" alt="Pommes Frites"/>
    <h2>Ingredients</h2>
    <ul>
        <li class="ingredient">
            <span class="value">500</span> 
            <span class="type">gramme</span> potatoes, hard cooking.
        </li>
        <li class="ingredient">
            <span class="value">1</span> <span class="type">spoonful</span> of salt
        </li>
        <li>
            You may want to provide some 
            <span class="ingredient">Ketchup and Mayonnaise</span>
            as well.
        </li>
    </ul>
    <h2>Instructions</h2>
    <ul class="instructions">
        <li>First wash the potatoes.</li>
        <li>Then slice and dice them and put them in boiling fat.</li>
        <li>After a few minutes take them out again.</li>
    </ul>
    <h2>Further details</h2>
    <p>Enough for <span class="yield">12 children</span>.</p>
    <p>Preparation time is approximately 
        <span class="duration"><span class="value-title" title="PT1H30M"> </span>90 min</span>
    </p>
    <p>Add <span  class="duration"><span class="value-title" title="PT30M"></span>half an hour</span> to prepare your homemade Ketchup.</p>
    <p>This recipe is <a href="http://www.example.com/tags/difficulty/easy" rel="tag">easy</a> and <a href="http://www.example.com/tags/tastyness/delicious" rel="tag">delicious</a>.</p>
    <p>
        <span class="nutrition">
        Pommes Frites have more than 
        <span class="value">1000</span> 
        <span class="type">Joule</span>
        Energy</span>, 
        while Ketchup and Mayonnaise have 
        <span class="nutrition">0 vitamins</span>.
    </p>
</div>

実装例

このセクションは参考情報です。

hRecipe が利用されているサイトやページです。リストが大きくなったら、hrecipe-examples-in-wild といった別のページにて紹介する予定です。

Implementations

このセクションは参考情報です。

hRecipe の生成や処理できるツールです。リストが大きくなったら、hrecipe-implementations といった別のページにて紹介する予定です。

  • Cognition. As of September 2008, Cognition has experimental support for this format. (Details of support.) Recipes may be exported in RecipeBook XML format or RDF.
  • WordPress Plugin. There's a WordPress hRecipe Plugin available which makes adding hRecipe metadata to recipes very easy, practically effortless. Very nice!
  • hRecipeHelper. Released 16th March, 2011 hRecipeHelper A Chrome Extension for building hRecipe formatted HTML for blogging or websites.

参考文献

規範的な参考文献

その他の参考文献

コピーライト

著者によって2008年11月14日 Microformats_Wiki:Copyrights を通じ、hRecipe はパブリックドメインになりました。使用、配布、再版またはいかなる種類の他の制限も、この仕様のテキストまたは内容に関して含まれていません。

特許

この仕様はロイヤリティーフリーの特許方針に帰属するものです。特許方針に関してはW3C Patent PolicyRFC3667RFC3668をご覧下さい。

Public Domain Release

このページの著者と編集者はドキュメント上の著作権を放棄することによって パブリックドメインでこのページの文書を公開しています。

進行中の仕様

この仕様は現在進行中です。更なる特徴が議論され、理解され、書かれた時には追加されるでしょう。

derivative works

  • hRecipe in RDF - mapping of hRecipe into a RDF vocabulary called "aRecipe"

related pages

Per the microformats process, the recipe effort developed

towards the development of this draft.