faq-ja: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
m (Reverted edit of BxrT23, changed back to last version by IwaiMasaharu)
No edit summary
Line 158: Line 158:

== <code>&lt;div&gt;</code>と<code>&lt;span&gt;</code>のセマンティクス ==
== <code>
===''Q. Is it semantically meaningless to use divs?'' ===
A. Yes, both <code>&lt;div&gt;</code> and <code>&lt;span&gt;</code> have nearly no semantics. <code>&lt;div&gt;</code> can be used to represent a "division" of the page content. Similarly <code>&lt;span&gt;</code> can be used to reperesent that that "span" of text has some meaning, but the specifics of what that meaning is undefined by the <code>&lt;span&gt;</code>.
===''Q. Does the use of <code>&lt;div&gt;</code> and <code>&lt;span&gt;</code> elements add any semantics to web pages?''===
A. According to the [http://www.w3.org/TR/REC-html40/struct/global.html#h-7.5.4 HTML 4 spec], <code>&lt;div&gt;</code> and <code>&lt;span&gt;</code> "offer a generic mechanism for adding structure to documents." Their only meaning is in dividing documents into sections, and as such, their presence implies that the content within has a specific, but undefined by the element markup, semantic. Thus they are nearly semantic-free.
===''Q. Why do the examples on the wiki use <code class="element">&lt;span&gt;</code> and <code class="element">&lt;div&gt;</code> for nearly everything?''===
A. <code class="element">&lt;span&gt;</code> and <code class="element">&lt;div&gt;</code> are generic elements in HTML. When you use microformats, you should pick the most specific semantic element available for the semantics you are trying to express. You might, for example, apply <code>class="vevent"</code> to a <code><nowiki><tr></nowiki></code>, or <code>class="vcard"</code> to a <code><nowiki><p></nowiki></code>.
== classのセマンティクス ==
===Q. ''How will microformat class names impact page size?''===
A. You probably won't notice any impact on page size when authoring with microformats.  Our experience is that people use comparably sized class names, and [[semantic-class-names|semantic class names]] are now considered an industry best practice.  Some sites are successfully publishing millions of microformats, and we haven't heard any complaints yet.  You are more likely to gain space savings by more fully adopting [[microformats#the_microformats_principles|the principles of microformats]], and eliminating tables for layout.
<span class="todo">''TODO: Consider creating a new section for web authoring tips?  Or at least linking to another site that advocates good authorship.''</span>
===Q. ''1つの要素に複数のclass名を付けることはできますか?''===
A. できます。class属性の値は、空白区切りを入れることで複数のclass名を書くことができます。例えば次のようになります。
  &lt;p class=&quot;todo idea&quot;&gt;Write high quality and simple mark-up.&lt;/p&gt;
W3C HTML 4.01 Specificationのclass属性についての記述も見てください: [http://www.w3.org/TR/html401/struct/global.html#adef-class 7.5.2 Element identifiers: the id and class attributes]
===Q. ''Do (X)HTML class names have semantics?''===
A. The HTML4 specification does not define any particular class values [http://www.w3.org/TR/REC-html40/struct/global.html#h-7.5.2 REF], nor does it define any particular semantic for class values [http://www.w3.org/TR/REC-html40/struct/global.html#h-7.5.2 REF], except that they "may be used for general user agent processing" [http://www.w3.org/TR/REC-html40/struct/global.html#h-7.5.2 REF]. However, the [http://www.w3.org/TR/WD-htmllink-970328#profile" draft of "Hypertext Links in HTML"], allows for a "profile" to define meanings for those classes. [http://gmpg.org/xmdp/ XMDP] is a format for defining meta data profiles for (X)HTML, and thus an XMDP profile can be used to define the meanings of class names.
See also:
* [http://tantek.com/log/2002/12.html#L20021216 A Touch Of Class]
* [http://www.w3.org/TR/WD-htmllink-970328 Hypertext Links in HTML]
===Q. ''I thought one of the main goals of CSS was to separate data from presentation. Isn’t this sneaking presentation back into data?''===
A. This is a quite commonly expressed objection to the way microformats uses class, but it's based on a misunderstanding of the way the class attribute in HTML was designed. Yes, class is very commonly,and appropriately used by web designers in conjunction with CSS to style pages, and in truth, it is often overused for that, but despite this, class, according to the HTML specification "has several roles in HTML", including [http://www.w3.org/TR/html4/struct/global.html#h-7.5.2 "for general purpose processing by user agents"].
Microformats utilize this second aspect of the class (and id) attribute, and do so legitimately. It is not an abuse of the class or id attribute to use it to add semantic context to a document. Nor is the use of class in and of itself presentational - in fact, it is an important mechanism for separating presentation from structured content.
For some more on using class semantically, here are some articles
* [http://meyerweb.com/eric/thoughts/2004/07/18/competent-classing Competent Classing by Eric Meyer]
* [http://www.w3.org/QA/Tips/goodclassnames Use class with semantics in mind, W3C]
* [http://tantek.com/log/2004/07.html#d20t2359 More about the class attribute, Tantek Çelik]
== microformatsとspam ==
===''Q. Given that Google now looks at hidden content as potential spam, will invisible microformats be considered spam?''===
A. It is advisable not to hide information in your site, regardless of whether it is microformated or not.  Microformats provide a mechanism for marking up ''visible'' content. Any mechanism for embedding ''invisible'' or hidden content risks being considered spam due to the fact that invisible (meta)data inevitably ends up being abused.  Avoid invisible (meta)data.  Publish visible data.
== abbrとtitleに関するデザインパターン ==
===''Q. Why is ABBR being used when the title attribute is available on all HTML elements?''===
In the datetime design pattern the title attribute is used for the value of the property and the node value is used as the display value. &lt;abbr title="value-here"&gt;Display-Here&lt;/abbr&gt;.
A. The short answer is that &lt;abbr&gt; has the correct semantics.
The longer answer is that the value is often an abbreviated version of the formal value. Of course, if you don't want to use an &lt;abbr&gt;, you can use another element like this:
&lt;abbr title="2006-12-31T12:59:59Z" class="dtstamp"&gt;New Year&lt;/abbr&gt;
&lt;span class="dtstamp"&gt;2006-12-31T12:59:59Z&lt;/span&gt;
In addition, microformats encourage the content to be visible and thus prefer the text of an element rather than using the 'title' attribute or any other less visible alternative.  The exception is made for datetimes and abbr due to the fact that microformats are for humans first, machines second.  Thus the content of the abbr element is used to provide human visible content and the machine equivalent is placed in the less visible (but still easily verifiable) 'title' attribute.
== 要素の入れ子 ==
===''Q. <code>&lt;span class=&quot;vcard fn org&quot; id=&quot;club&quot;&gt;...&lt;/span&gt;</code>としたいのですが、良いのでしょうか?''===
A. ダメです。[[hcard-faq#nesting-properties]]を見てください。

Revision as of 13:08, 13 June 2007

Microformats FAQ

microfotmatsについてよく聞かれる質問とその答えのページです。 For frequently asked questions from the press, see press-faq.


Q: ユーザー名はどうやって作りますか? どのようなユーザー名が望ましいですか?

A: まずは、 http://en.wikipedia.org/wiki/Wikipedia:Username を読んでください。また、ユーザー名としては、ペンネームやハンドルなどよりも本名の方が好まれます。本名を用いると、より高い透明性や責任を伴うと考えられるからです。さらに、ユーザー名の最初の文字は大文字である必要があります。これは登録の際に最も問題になることの一つです。ユーザー名としては、例えば「RyanKing」のようにあなたの氏名のWikiCaseバージョンはどうでしょうか?

Email list

Q: I've joined the discussion mailing list but am not seeing my replies anywhere. Why?

A: There is no moderation on microformats-discuss, but it only accepts posts from subscribers. You MUST post to microformats-discuss using the email address you used to subscribe.

Q: What does "The message's content type was not explicitly allowed" mean?

A: Please go read mailinglists-policies. In particular note:

No HTML or RTF e-mail period, end of story, full stop. Your mail client should let you configure it so you can send plain text messages. Make use of this ability or else there are no guarantees that anyone will be able to read your email.

The mailing lists are set up to automatically reject email that is sent as text/html. Thus please configure your email client to send plain text (text/plain) email.


Q: When should I use a microformat? What are they for?"

A: You are writing some HTML that contains useful human-readable information (such as a piece of contact information). You say to yourself: I would like to mark this up with some classes now for styling. You look up the relevant microformat, and you pull in the standard names. You don't have to make your own up, and now your page is machine-readable too. Bonus!

Microformats are designed to make the data you already publish for humans available to machines. It allows applications as simple as cut-and-paste or as complex as a seach engine to use your data effectively.

Q: microformatsは(X)HTMLに依存していますか?

A: Microformatsは埋め込んで使うものです。(X)HTMLやRSS、Atomなどに埋め込むことができます。

Q: microformatsは素晴らしいと思います。私にも何か協力できることがありますか?

A: microformatsについての議論に参加するための方法は http://microformats.org/discuss にあります。to-doリストにある内容について一緒に話しましょう。

Q: I'd like to make a donation to the microformat cause. How can I do this?

A: Thank you for your willingness to support microformats. We've only recently started this site and have decided that while we are figuring out exactly how to accept donations, we will be passing along donations to other good causes. Please consider donating to another cause like Red Cross, perhaps directed to help victims of recent natural disasters.

Q: microformatsにはどのような実装がありますか?

A: 実装ページを見てください。

Q: Which microformats should I implement?

A: Chances are you that your website already has data very similar to several microformats. For example, you probably have people and/or their contact information somewhere. That information could be marked up with hCard, see the hCard authoring page for step by step instructions. If you are publishing press releases, try using hAtom.

Q: Do you have any link badges I can add to my website/blog?

A: There are some buttons but we can certainly use more! Please contribute what you come up with!

Q. Are there any tools that support microformats?

A. Yes...tons... implementations.

Q. Is there a way to indicate that a given web page contains markup that conforms to one or more microformats?

A. The HTML HEAD element's 'profile' attribute alerts applications to the potential presence of microformats. The W3C HTML Specification describes more about the profile attribute, and the XMDP description documents how it is used.

Q. What about using new URI schemes instead of class names, e.g. for geo information?

A. In general, it is more work, and less content-publisher friendly, to ask publishers to use URI schemes instead of class names.

Authors aren't publishing links to geo information.

They're publishing *visible text* of geo information.

So the easiest thing to do, for the author, is to leave it as visible text.

Thus, it makes the most sense to do the simple thing of just wrapping that visible text with a little bit of markup, rather than asking the author to move (or copy) it into an attribute, which may or may not require a reformatting of the data as well.

It would make sense from a usability persepective to hyperlink geo information to a maps page or something, so that clicking it actually does something. If you forced them to use a hypothetical "geo:" protocol instead, then that would interfere, since you can only hyperlink something to one destination.

Q: Who controls microformats?

A: An open community. Microformats are open standards licensed under Creative Commons Attribution. Much of the work here was begun on [Technorati's Developer Wiki], but Technorati has since divested control of these microformat standards to the open community here. The microformats.org domain is registered to Rohit Khare, CommerceNet is graciously hosting the servers, but claims no control over microformat standards. Anyone may follow the established process and contribute towards the development of microformat standards.

Q: Who is the registrar for microformats?

A: There is no central registry. Microformats are registered in a distributed manner using profiles. For more information on profiles see http://microformats.org/wiki/profile-uris and http://gmpg.org/xmdp/

Conflicts and interoperability are managed through social processes rather than a formal registry. Current microformat profiles can be found at http://gmpg.org, http://w3.org, and http://microformats.org.

Q: So multiple microformats with the same name can be valid?

A: Yes. The community at microformats.org can hopefully play a role in determining which is preferred by bringing interested folks together in one place and helping them resolve that question. As long as each microformat maintains a valid profile, each can be used effectively.

Q: How do I validate my microformated content?

A: Currently there is not an automatic general-purpose validator for microformats (See to-do). There are however some microformat specific tools listed on the implementations page.


Q. I would like to author a new microformats open standards specification for my site/business. How do I get started?

A. The first thing to do before attempting a new microformat open standard is to make as much use of existing microformats open standards as possible in whatever site you are looking to markup with your new microformat, as a way of learning what is left to be done. That is, at a minimum first:

  • Markup all people and organizations as hCards.
  • Markup all events and time based things as hCalendar events.
  • Markup all reviews as hReviews.
  • etc.

Then join the microformats discuss list, and ask folks what they think of your use of the microformats and if it can be improved.

From that experience you will then be able to figure out what is left to be specified. Otherwise it is too hard to approach the "whole problem".

Once you have completed that, take a look at the microformats process for how to walk through the steps of creating a new microformat, and note the specific problem you are trying to solve to the microformats-discuss list. This will help you find more people to help you solve the problems you are trying to solve.

Q 過去に提案されたmicroformatsのアイデアにを知りたいのですが、どうすればいいですか?

A. 提案されて却下されたmicroformatsのリストがありますので、それをチェックしてください。



Class interactions

Q. ページスタイリング上の問題が発生するようなclass名はありますか?

A. あるかも知れません。ただ、仮に問題が発生したとしても、文脈セレクタを用いることで容易に回避できるでしょう。

Q. How does the use of class values for semantics interact with the use of class values for attaching CSS styles?

A. The class attribute takes a space separated set of class names HTML4 reference. Thus both author and microformat defined class names may be used in the same class attribute. In addition, microformat class names provide the author with a consistent set of class names to use for styling. If the author is already using using specific class names, they can continue to do so, and include microformat class names. If the author is already using a class name that happens to also be a microformat class name, then the author may want to consider using contextual CSS class selectors to make sure that avoid any unintentional styling effects.

See also: