<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://microformats.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bloodypunk</id>
	<title>Microformats Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://microformats.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bloodypunk"/>
	<link rel="alternate" type="text/html" href="https://microformats.org/wiki/Special:Contributions/Bloodypunk"/>
	<updated>2026-05-13T17:43:12Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>https://microformats.org/wiki/index.php?title=machine-data&amp;diff=43124</id>
		<title>machine-data</title>
		<link rel="alternate" type="text/html" href="https://microformats.org/wiki/index.php?title=machine-data&amp;diff=43124"/>
		<updated>2010-09-21T07:53:05Z</updated>

		<summary type="html">&lt;p&gt;Bloodypunk: /* Related Pages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;entry-title&amp;gt;Machine Data in Microformats&amp;lt;/entry-title&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{TOC-right}}&lt;br /&gt;
&lt;br /&gt;
Microformats are designed to mark-up human consumable information, as commonly found in the wild. But, in a number of exceptional cases it has been necessary to specify precise data formats for particular properties. Formats for dates, times and locations are standardised in a way that doesn't always match the way information is visibly published. This is necessary to make the data understandable to parsers. Similarly, there are keywords in hCard that must be written in English (telephone ‘type’ in hCard, for example).&lt;br /&gt;
&lt;br /&gt;
It is necessary for these data formats to be fixed to make the data parsable by machines; the cost for a parser to support every commonly published date-time format in the world (include approximations like ‘five minutes ago’) is too high, as is handling international translation (such as mobile telephones; &amp;lt;abbr title=&amp;quot;United States&amp;quot;&amp;gt;US&amp;lt;/abbr&amp;gt;-English ‘cell’ published as British English ‘mobile’).&lt;br /&gt;
&lt;br /&gt;
In some cases, the human version of the data can be semantically described as an abbreviated form of the machine data, and the machine data may also be human consumable. For example, the [[date-design-pattern]] uses HTML's &amp;lt;code&amp;gt;abbr&amp;lt;/code&amp;gt; element to expand one human date representation into the ISO 8601 form date: ‘January 1st’ is an abbreviated form of ‘2008-01-01’. The latter is also legible to humans (and can be exposed to them through tool-tips and assistive screen readers).&lt;br /&gt;
&lt;br /&gt;
In other cases, this machine data is '''not''' legible to humans. In [[haudio|hAudio]], the [[haudio#Duration|duration]] property uses ISO 8601, resulting in machine data of &amp;lt;code&amp;gt;PT3M23S&amp;lt;/code&amp;gt;; not understandable to humans, and therefore not a valid expansion of ‘three minutes and twenty-three seconds’.&lt;br /&gt;
&lt;br /&gt;
==Cases of Fixed Data Formats in Microformats==&lt;br /&gt;
&lt;br /&gt;
The following are all current uses of fixed format machine data required by the various microformats.&lt;br /&gt;
&lt;br /&gt;
===hCalendar===&lt;br /&gt;
&lt;br /&gt;
* Uses ISO 8601 for &amp;lt;code&amp;gt;dtstart&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;dtend&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;duration&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;rdate&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;exdate&amp;lt;/code&amp;gt;&lt;br /&gt;
* enumerated value for the &amp;lt;code&amp;gt;role&amp;lt;/code&amp;gt; subproperty of the &amp;lt;code&amp;gt;attendee&amp;lt;/code&amp;gt; property. Example documented in [[hcalendar-brainstorming#hCard_attendees|hCalendar brainstorming: hCard attendees]]&lt;br /&gt;
&lt;br /&gt;
===hCard===&lt;br /&gt;
&lt;br /&gt;
* Telephone [[hcard#adr_tel_email_types|&amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; keywords]]: &amp;lt;code&amp;gt;voice&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;home&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;msg&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;work&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;pref&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;fax&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cell&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;pager&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;bbs&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;modem&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;car&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;isdn&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;pcs&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Address type keywords: &amp;lt;code&amp;gt;INTL&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;POSTAL&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PARCEL&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;WORK&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;dom&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;home&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;pref&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Email type keywords: &amp;lt;code&amp;gt;INTERNET&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;x400&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;pref&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Uses ISO 8601 date for &amp;lt;code&amp;gt;bday&amp;lt;/code&amp;gt;&lt;br /&gt;
* ISO 8601 time zone for &amp;lt;code&amp;gt;tz&amp;lt;/code&amp;gt;&lt;br /&gt;
* Telephone numbers requires a numerical form, whilst phone numbers can be presented in alpha-numeric form: e.g. +1-555-FORMATS&lt;br /&gt;
&lt;br /&gt;
===hReview===&lt;br /&gt;
* Uses an ISO 8601 date-time for &amp;lt;code&amp;gt;dtreviewed&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===hAtom===&lt;br /&gt;
&lt;br /&gt;
* Uses ISO 8601 date-time for &amp;lt;code&amp;gt;updated&amp;lt;/code&amp;gt;&lt;br /&gt;
* Uses ISO 8601 date-time for &amp;lt;code&amp;gt;published&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===hResume===&lt;br /&gt;
&lt;br /&gt;
* Uses ISO 8601 date for individual &amp;lt;code&amp;gt;experience&amp;lt;/code&amp;gt; items.&lt;br /&gt;
* Uses ISO 8601 date for individual &amp;lt;code&amp;gt;education&amp;lt;/code&amp;gt; items.&lt;br /&gt;
&lt;br /&gt;
===Geo===&lt;br /&gt;
&lt;br /&gt;
* Requires &amp;lt;code&amp;gt;latitude&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;longitude&amp;lt;/code&amp;gt; in decimal form (&amp;lt;code&amp;gt;1.23232;-2.343535&amp;lt;/code&amp;gt;), but may be published in degrees: &amp;lt;code&amp;gt;N 37° 24.491&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;W 122° 08.313&amp;lt;/code&amp;gt;&lt;br /&gt;
* Locations are most often published just as place names (not abbreviated co-ordinates)&lt;br /&gt;
&lt;br /&gt;
===hAudio===&lt;br /&gt;
&lt;br /&gt;
* Uses ISO 8601 for track &amp;lt;code&amp;gt;duration&amp;lt;/code&amp;gt;, e.g. &amp;lt;code&amp;gt;PT3M23S&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Misconceptions of Fixed Data Formats in Microformats==&lt;br /&gt;
There are also cases (at least one) of apparent fixed data formats in microformats which should not require the providing of a separate value.  It is useful to document these as a way to clear up apparent misconceptions.&lt;br /&gt;
&lt;br /&gt;
===hReview===&lt;br /&gt;
* ''Uses fixed-point integer values from &amp;lt;var&amp;gt;0&amp;lt;/var&amp;gt;-&amp;lt;var&amp;gt;5&amp;lt;/var&amp;gt; for &amp;lt;code&amp;gt;rating&amp;lt;/code&amp;gt; (publishers may, for example, display a percentage rating)''&lt;br /&gt;
&lt;br /&gt;
There are several misconceptions here.&lt;br /&gt;
# The ''default'' rating values in [[hReview]] are [[hreview#In_General|from 1.0-5.0]] (not 0-5)&lt;br /&gt;
# hReview permits the author to state their own 'worst' to 'best' range for any given 'rating'.&lt;br /&gt;
&lt;br /&gt;
Thus a publisher that wants to display a percentage rating can do so by simply specifying a 'worst' value for a rating of 0, and a 'best' value for a rating of 100.  Then the actual percentage rating can simply be marked up inline and no separate machine value is necessary.&lt;br /&gt;
&lt;br /&gt;
==Embedding Fixed Data Formats in Microformats==&lt;br /&gt;
&lt;br /&gt;
There are currently three supported methods of including these fixed data formats in a microformatted document.&lt;br /&gt;
&lt;br /&gt;
===As Visible Page Content===&lt;br /&gt;
&lt;br /&gt;
You may use the standard [[class-design-pattern]] to mark-up the data visibly in the page. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Ben was born on ''&amp;amp;lt;span class=&amp;quot;bday&amp;quot;&amp;gt;1984-02-09&amp;amp;lt;/span&amp;gt;''.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;We're meeting up on Northumberland Avenue (&amp;amp;lt;span class=&amp;quot;geo&amp;quot;&amp;gt;51.507033,-0.126343&amp;amp;lt;/span&amp;gt;).&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===As An Abbreviation===&lt;br /&gt;
&lt;br /&gt;
In some cases, the data formats specified make valid expansions of common human forms, such as dates in in an hCard birthday field:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Ben was born on &amp;amp;lt;abbr class=&amp;quot;bday&amp;quot; title=&amp;quot;1984-02-09&amp;quot;&amp;gt;9th February&amp;amp;lt;/abbr&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note, however, that not all data formats are valid expansions. In HTML, the &amp;lt;code&amp;gt;abbr&amp;lt;/code&amp;gt; element is working semantically at a text level, not a data level. Both the abbreviated form (the inner text) and the expanded form (the title) need to be consumable by humans.&lt;br /&gt;
&lt;br /&gt;
This means that in hAudio, using an abbreviation for &amp;lt;code&amp;gt;duration&amp;lt;/code&amp;gt; is incorrect:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;lt;abbr class=&amp;quot;duration&amp;quot; title=&amp;quot;PT3M23S&amp;quot;&amp;gt;3 minutes, 23 seconds&amp;amp;lt;/abbr&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Whilst the ''data'' ‘PT3M23S’ is an expanded form of ‘3 minutes, 23 seconds’, the text is not; ‘PT3M23S’ is nonsense to most human beings. &amp;lt;code&amp;gt;abbr&amp;lt;/code&amp;gt; is an element that describes the ''text'', not the data. HTML4 has no way to mark up arbitrary data.&lt;br /&gt;
&lt;br /&gt;
===Using the value-class-pattern===&lt;br /&gt;
&lt;br /&gt;
See [[value-class-pattern]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Related Pages==&lt;br /&gt;
&lt;br /&gt;
* [[value-excerption-pattern]]&lt;br /&gt;
* [[class-design-pattern]]&lt;br /&gt;
* [[abbr-design-pattern]]&lt;br /&gt;
* [[date-design-pattern]]&lt;br /&gt;
* [http://www.mac-how.net Mac How]&lt;br /&gt;
* [[datetime-design-pattern]]&lt;br /&gt;
* HTML 4.01 definition of &amp;lt;code&amp;gt;[http://www.w3.org/TR/REC-html40/struct/text.html#edef-ABBR &amp;amp;lt;abbr]&amp;gt;&amp;lt;/code&amp;gt; element&lt;/div&gt;</summary>
		<author><name>Bloodypunk</name></author>
	</entry>
</feed>