<?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=OrliaCcnab</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=OrliaCcnab"/>
	<link rel="alternate" type="text/html" href="https://microformats.org/wiki/Special:Contributions/OrliaCcnab"/>
	<updated>2026-05-28T19:14:17Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>https://microformats.org/wiki/index.php?title=implementation-guidelines-fr&amp;diff=37307</id>
		<title>implementation-guidelines-fr</title>
		<link rel="alternate" type="text/html" href="https://microformats.org/wiki/index.php?title=implementation-guidelines-fr&amp;diff=37307"/>
		<updated>2009-01-05T19:41:29Z</updated>

		<summary type="html">&lt;p&gt;OrliaCcnab: bocrolace&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;erlibosito&lt;br /&gt;
=Instructions et StratÃ©gies pour ImplÃ©menter les Microformats=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cette page a dÃ©marrÃ© sur [[implementation-guidelines]]. &lt;br /&gt;
La page originale a besoin de GROS MENAGE et de rÃ©organisation avant de passer en traduction afin d'Ãªtre utile pour y trouver des &amp;quot;instructions&amp;quot; pour les implÃ©menteurs. A cette heure la page originale ne contient qu'un vague ensemble dÃ©sordonnÃ© d'idÃ©es d'implÃ©mentations. Si vous Ãªtes un implÃ©menteur francophone, sentez-vous vraiment libre de sauter dans la page mentionnÃ©e au-dessus et d'aider au nettoyage. Merci d'avance -- Christophe .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Editeurs==&lt;br /&gt;
&lt;br /&gt;
* L'embarquement dans les documents XHTML est la chose la plus facile Ã  faire avec les microformats.&lt;br /&gt;
* Les microformats peuvent Ãªtre embarquÃ©s dans les entrÃ©es Atom : &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;entry&amp;gt;&lt;br /&gt;
   &amp;lt;title&amp;gt;Critique de N'importe Quel Objet&amp;lt;/title&amp;gt;&lt;br /&gt;
   &amp;lt;link href=&amp;quot;http://microformats.org/wiki/&amp;quot; /&amp;gt;&lt;br /&gt;
   &amp;lt;id&amp;gt;urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a&amp;lt;/id&amp;gt;&lt;br /&gt;
   &amp;lt;updated&amp;gt;20050730T1900-0700&amp;lt;/updated&amp;gt;&lt;br /&gt;
   &amp;lt;content type=&amp;quot;xhtml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;div xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;div class=&amp;quot;hreview&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;h3 class=&amp;quot;summary&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;item fn&amp;quot;&amp;gt;Un objet&amp;lt;/span&amp;gt; en cours de critique&amp;lt;/h4&amp;gt;&lt;br /&gt;
       &amp;lt;p&amp;gt;Critique : &amp;lt;span class=&amp;quot;reviewer fn&amp;quot;&amp;gt;nom auteur&amp;lt;/span&amp;gt; - &lt;br /&gt;
       &amp;lt;abbr class=&amp;quot;dtreviewed&amp;quot; title=&amp;quot;20050730T1900-0700&amp;quot;&amp;gt;30 juillet 2005&amp;lt;/abbr&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
       &amp;lt;blockquote class=&amp;quot;description&amp;quot;&amp;gt;&amp;lt;p&amp;gt;Le contenu de la critique&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
       &amp;lt;span&amp;gt;&amp;lt;span class=&amp;quot;rating&amp;quot;&amp;gt;5&amp;lt;/span&amp;gt; sur 5&amp;lt;/span&amp;gt;&lt;br /&gt;
     &amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;/div&amp;gt;&lt;br /&gt;
   &amp;lt;/content&amp;gt;&lt;br /&gt;
 &amp;lt;/entry&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Questions : &lt;br /&gt;
&lt;br /&gt;
* Est-ce qu'un profil XMDP devrait Ãªtre liÃ© Ã  l'entrÃ©e Atom ?&lt;br /&gt;
* Est-ce que la classe hreview apparaÃ®t dans la div du conteneur de contenu ?&lt;br /&gt;
&lt;br /&gt;
==Identification==&lt;br /&gt;
&lt;br /&gt;
There are several user agent identification strategies.  Currently, Firefox provides strong support for XPath based discovery methods.  Some of these can be adapted to Internet Explorer 6 with a small loss in efficiency and others not at all.  The following examples are in extreme summary form.  It is suggested that you click through on the links for more explanation.&lt;br /&gt;
&lt;br /&gt;
===StratÃ©gies Firefox/Mozilla===&lt;br /&gt;
&lt;br /&gt;
The simplest method is just to use an XPath expression to identify the microformat.  Here is an example that does just that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var allDivs, thisDiv;&lt;br /&gt;
&lt;br /&gt;
allDivs = document.evaluate(&lt;br /&gt;
    &amp;quot;//*[contains(@class, 'xfolkentry')]&amp;quot;,&lt;br /&gt;
    document,&lt;br /&gt;
    null,&lt;br /&gt;
    XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,&lt;br /&gt;
    null);&lt;br /&gt;
		&lt;br /&gt;
// Just run through all elements matched by the XPATH expression and change&lt;br /&gt;
// the background color to an attractive red.&lt;br /&gt;
for (var i = 0; i &amp;lt; allDivs.snapshotLength; i++) {&lt;br /&gt;
    thisDiv = allDivs.snapshotItem(i);&lt;br /&gt;
    // do something here.  For example, change the background color to red.&lt;br /&gt;
    thisDiv.style.backgroundColor = 'red';&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A greasemonkey script that applies this strategy to [http://de.lirio.us de.lirio.us] and an [http://thecommunityengine.com/webcites/ individual linkblog republished from del.icio.us] is available [http://thecommunityengine.com/resources/xfolk-colorize.user.js here] with a tutorial on how the script works and how to modify it for other microformats [http://thecommunityengine.com/home/archives/2005/07/greasemonkey_mi.html here].  Alf Eaton uses this exact XPath strategy in an early [http://hublog.hubmed.org/archives/001149.html script] that he created for [[hreview-fr|hreview]].&lt;br /&gt;
&lt;br /&gt;
However, as Alf Eaton also notes, the XPath-only strategy is subject to potential collisions where the class value that denotes the microformat's container element is contained in another class value.  For example 'xfolkentry' is contained in 'mixfolkentry', and the XPath expression would identify both as an [[xfolk-fr|xfolk]] entry.  While the danger of this particular collision occurring are slight, such may not be the case with other microformats.&lt;br /&gt;
&lt;br /&gt;
To avoid collisions in microformat container values, Alf proposes an amendment to the above strategy that works well for microformats where the container element is identified by a class value.  Alf's strategy is contained in the following code pattern (that does not run as is):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var mf = 'hreview';&lt;br /&gt;
&lt;br /&gt;
var micropath = &amp;quot;//*[contains(@class,'&amp;quot; + mf + &amp;quot;')]&amp;quot;;&lt;br /&gt;
var micromatch = new RegExp('\\b' + mf + '\\b');&lt;br /&gt;
&lt;br /&gt;
var mc = document.evaluate(micropath, document, null,&lt;br /&gt;
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);&lt;br /&gt;
for (var i = 0; i &amp;lt; mc.snapshotLength; i++) {&lt;br /&gt;
    iNode = mc.snapshotItem(i);&lt;br /&gt;
    if (iNode.className.match(micromatch))&lt;br /&gt;
        doSomething();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that this solution introduces regular expression checking as a second test on the nodes isolated by the XPath expression.  Modifying the first example to use this strategy in a bit of code that is runnable we get:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
var allDivs, thisDiv;&lt;br /&gt;
var mf = 'xfolkentry';&lt;br /&gt;
&lt;br /&gt;
var micropath = &amp;quot;//*[contains(@class,'&amp;quot; + mf + &amp;quot;')]&amp;quot;;&lt;br /&gt;
var micromatch = new RegExp('\\b' + mf + '\\b');&lt;br /&gt;
&lt;br /&gt;
allDivs = document.evaluate(&lt;br /&gt;
    micropath,&lt;br /&gt;
    document,&lt;br /&gt;
    null,&lt;br /&gt;
    XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,&lt;br /&gt;
    null);&lt;br /&gt;
		&lt;br /&gt;
for (var i = 0; i &amp;lt; allDivs.snapshotLength; i++) {&lt;br /&gt;
    thisDiv = allDivs.snapshotItem(i);&lt;br /&gt;
    // do something here.  For example, change the background color to red.&lt;br /&gt;
    if (iNode.className.match(micromatch)) // apply the second test&lt;br /&gt;
    thisDiv.style.backgroundColor = 'red';&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===StratÃ©gies Internet Explorer===&lt;br /&gt;
&lt;br /&gt;
XPath-based strategies can be made to work sometimes in Internet Explorer with [http://glazkov.com/blog/archive/2004/04/06/168.aspx Dimitri Glazkov's javascript library] that harnesses IE's built-in XPath support for traversing HTML DOM.&lt;br /&gt;
&lt;br /&gt;
== Parsage ==&lt;br /&gt;
&lt;br /&gt;
Parsing Microformats can be as easy or as hard as you want it to be. Since many of the elementary building blocks are based on anchor tags, its possible possible to implement some fairly effective functionality without needing to mess around with the complexities of tag nesting and unknown class names. Simple rule: ignore anything you don't need.&lt;br /&gt;
&lt;br /&gt;
=== hCard ===&lt;br /&gt;
&lt;br /&gt;
voir : [[hcard-parsing-fr|hCard Parsing]]&lt;br /&gt;
&lt;br /&gt;
== voir aussi ==&lt;br /&gt;
&lt;br /&gt;
* [[xmdp-faq-fr|XMDP FAQ]]&lt;/div&gt;</summary>
		<author><name>OrliaCcnab</name></author>
	</entry>
</feed>