hNews Exemples

From Microformats Wiki
Jump to navigation Jump to search


Exemples de hNews - Chantier en cours !

Contributeurs

Echantillon d'Article

Ce qui suit est un article d'actualité typiquement formaté :

Renewing US ties with Latin America, Obama says he wants to lead, not lecture, on democracy

by BEN FELLER, Associated Press - 19 April 2009 18:17 GMT

PORT-OF-SPAIN, Trinidad (AP) -- Defending his brand of world politics, President Barack Obama said Sunday...

Both Graham and McCaskill spoke on "Fox News Sunday." Ensign was interviewed on CNN's "State of the Union."

Copyright 2009 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

Généralement, les organisations chargées de produire l'actualité auront une quantité significative de métadonnées derrière cet article, communiqué dans une varité de formats comme NewsML. Présentées aux lecteur, bon nombre des métadonnées (parfois dans certains cas quelques centaines de champs) sont supprimées. Nous pouvons en remettre, et en utilisant hNews, créer des possibilités de quelques actions sémantiques intéressantes. Prenons l'article ci-dessus et formatons le en hNews :


<div class="hnews hentry item">
  <h4>
    <a class="url entry-title" href="http://example.org/article/us-latam-obama-democracy.html" rel="bookmark">
      Renewing US ties with Latin America, Obama says he wants to lead, not lecture, on democracy</a>
  </h4>
	
  <div>
    <small> by 
      <span class="author vcard"><a class="email fn" 
        href="mailto:ben.feller@example.org">BEN FELLER</a></span>, 
      <span class="source-org vcard"><a class="url org fn" 
        href="http://www.ap.org">Associated Press</a></span>,
      <a href="http://www.ap.org/newsvalues/index.html" rel="principles"><img src="/wikidir/images/principles-button-blue.png" /></a>  - 
      <span class="updated dtstamp" 
        title="2009-04-19T18:17:29Z">19 April 2009 18:17 GMT</span>
    </small>
  </div>
	
  <div class="entry-content">
    <p><span class="dateline">PORT-OF-SPAIN, Trinidad</span> (AP) -- Defending his brand 
      of world politics, President Barack Obama said Sunday...</p>
    <p>Both Graham and McCaskill spoke on "Fox News Sunday." Ensign was interviewed on CNN's 
      "State of the Union."</p>
  </div>
	
  <div>
    <small>
      News Topics:
      <a href="http://example.org/Summits" rel="tag">Summits</a>, ...,
      <a href="http://example.org/Government+policy" rel="tag">Government policy</a>
      <br/>
      People, Places and Companies: 
      <a href="http://example.org/Barack+Obama" rel="tag">Barack Obama</a>, ..., 
      <a href="http://example.org/Hugo+Chavez" rel="tag">Hugo Chavez</a> 
    </small>
  </div>


  <div class="geo">
    <small>
      Lat: <span class="latitude">10.65715</span> 
      Long: <span class="longitude">-61.483582</span>
    </small>
  </div>

  <div id="first-sample-license">
    <small>
      Copyright 2009 The <a rel="item-license" href="#first-sample-license">Associated Press</a>. 
      All rights reserved. This material may not be published, broadcast, rewritten or redistributed.
    </small>
  </div>
</div>

Nous obteons un article d'actualité richement formaté qui améliore l'expérience-utilisateur avec l'actualité :


Renewing US ties with Latin America, Obama says he wants to lead, not lecture, on democracy

by BEN FELLER, Associated Press principles - 19 April 2009 18:17 GMT

(AP) -- Defending his brand of world politics, President Barack Obama said Sunday...

Both Graham and McCaskill spoke on "Fox News Sunday." Ensign was interviewed on CNN's "State of the Union."

News Topics: Summits, ..., Government policy
People, Places and Companies: Barack Obama, ..., Hugo Chavez

Lat: 10.65715 Long: -61.483582
Copyright 2009 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

Alternative Geo

Il existe quantité d'options sur la manière de formater cette information. Par exemple, plutôt que d'ajouter un ligne séparée geo, nous pourrions choisir de faire quelque chose proposé pour amélioration sur le geo-brainstorming :

<p><abbr title="10.65715,-61.483582" class="dateline geo">PORT-OF-SPAIN, Trinidad</abbr> (AP) -- Defending his brand 
	of world politics, President Barack Obama said Sunday...</p>

ce qui s'affiche ainsi :

(AP) -- Defending his brand of world politics, President Barack Obama said Sunday...

Bien sûr, une option valide (telle que discutée ici), est d'utiliser à la place l'élément <span>.

Exemple d'Article avec Media (Photo)

Un autre exemple est de combiner ce même article avec une photo en rapport en plaçant un item hMedia à l'intérieur de l'entrée hNews :

<div class="hnews hentry item">
  <div class="hmedia">
     <img class="photo" width="256" height="342" border="0" alt="President Barack Obama speaks on the South Lawn of the White House in Washington, Wednesday, Aug. 5, 2009, about the release of Laura Ling and Euna Lee, the two freed American journalists who were arrested in March after allegedly crossing into North Korea from China. (AP Photo/Ron Edmonds)" src="http://example.org/Obama_Mana.jpg"/>
     <span class="fn">President Barack Obama</span>
  </div>

  <h4>
    <a class="url entry-title" href="http://example.org/article/us-latam-obama-democracy.html" rel="bookmark">
      Renewing US ties with Latin America, Obama says he wants to lead, not lecture, on democracy</a>
  </h4>
	
  <div>
    <small> by 
      <span class="author vcard"><a class="email fn" 
        href="mailto:ben.feller@example.org">BEN FELLER</a></span>, 
      <span class="source-org vcard"><a class="url org fn" 
        href="http://www.ap.org">Associated Press</a></span>,
      <a href="http://www.ap.org/newsvalues/index.html" rel="principles"><img src="/wikidir/images/principles-button-blue.png</a>  - 
      <span class="updated dtstamp" 
        title="2009-04-19T18:17:29Z">19 April 2009 18:17 GMT</span>
    </small>
  </div>
	
  <div class="entry-content">
    <p><span class="dateline">PORT-OF-SPAIN, Trinidad</span> (AP) -- Defending his brand 
      of world politics, President Barack Obama said Sunday...</p>
    <p>Both Graham and McCaskill spoke on "Fox News Sunday." Ensign was interviewed on CNN's 
      "State of the Union."</p>
  </div>
	
  <div>
    <small>
      News Topics:
      <a href="http://example.org/Summits" rel="tag">Summits</a>, ...,
      <a href="http://example.org/Government+policy" rel="tag">Government policy</a>
      <br/>
      People, Places and Companies: 
      <a href="http://example.org/Barack+Obama" rel="tag">Barack Obama</a>, ..., 
      <a href="http://example.org/Hugo+Chavez" rel="tag">Hugo Chavez</a> 
    </small>
  </div>

  <div class="geo">
    <small>
      Lat: <span class="latitude">10.65715</span> 
      Long: <span class="longitude">-61.483582</span>
    </small>
  </div>

  <div>
    <small>
      Copyright 2009 The <a rel="item-license" href="http://www.ap.org">Associated Press</a>. 
      All rights reserved. This material may not be published, broadcast, rewritten or redistributed.
    </small>
  </div>
</div>