slide1 n.
Skip this Video
Loading SlideShow in 5 Seconds..
Semantic Microformats PowerPoint Presentation
Download Presentation
Semantic Microformats

Loading in 2 Seconds...

play fullscreen
1 / 39

Semantic Microformats - PowerPoint PPT Presentation

  • Uploaded on

Semantic Microformats. Uche Ogbuji. About the presenter. XML expert since 1997 RDF/Semantic Web expert since 1999 Web services/SOA expert since 1999 Heavy work with XML and RDF/SemWeb/SOA best practices Lead developer of key open specs and OSS, e.g.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

Semantic Microformats

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

Semantic Microformats

Uche Ogbuji

about the presenter
About the presenter
  • XML expert since 1997
  • RDF/Semantic Web expert since 1999
  • Web services/SOA expert since 1999
  • Heavy work with XML and RDF/SemWeb/SOA best practices
  • Lead developer of key open specs and OSS, e.g.
    • Versa RDF query language
    • 4Suite XML/RDF processing toolkit
    • Amara XML toolkit
about zepheira llc
About Zepheira, LLC
  • Firm offering Semantic technologies solutions bridging technology and business
  • Team of leaders in next generation Web technology and business applications
  • Founded in 2007, already featured in MIT Tech Review and BusinessWeek
  • If you see me in the halls later, ask me about “Zepheira 3D”
  • A brief intro to microformats
      • The basic concepts
      • The Good, the bad and the ugly
  • Bringing Semantic Technology to microformats
      • Semantic transparency
      • GRDDL
  • Leapfrogging microformats altogether
      • XML or even JSON with Semantic schema
      • RDF/A
in their own words
In their own words...

“Designed for humans first and machines second, microformats are a set of simple, open data formats built upon existing and widely adopted standards. Instead of throwing away what works today, microformats intend to solve simpler problems first by adapting to current behaviors and usage patterns”


basic idea
Basic idea
  • Start with a base schema such as XHTML, or Atom
  • Define specialized variations
    • Conventions for use of, say, attribute values already defined by the base schema
    • Modest set of extensions to the base schema

Embed minor, specialized variations within established vocabularies

it s just jargon
It’s just Jargon
  • Jargon is not inventing a completely new language
    • Start with an existing language
    • Come up with variations: specialized syntax or specialized vocabulary (mostly the latter)
  • Establishing and propagating conventions in the language variation
    • Formal terms and definitions (professional glossaries)
    • Informally shared trends
elemental microformat examples

<p>Nice blog. Buy your medz <a href='' rel='nofollow'>here</a></p>

<div class='blogroll'>

<a href="" rel="brother met">Chimezie</a>


<p>We decided not to implement <a rev="vote-against" href="" title="way too complex">XQuery</a>...</p>

Elemental microformat examples
compound microformat example

<ol class='xoxo'>

<li>Subject 1


<li>subpoint a</li>

<li>subpoint b</li>



<li>Subject 2

<ol compact="compact">

<li>subpoint c</li>

<li>subpoint d</li>




Compound microformat example

XOXO is a microformat for “outline”, which can be anything from “Blogrolls” to presentations

a seriously mixed bag
A seriously mixed bag

The good: Rough consensus is good, even for minor syntactic details

The bad: It’s very easy for microformats to clash, because of the lack of Semantic grounding (yes, this is biting people in practice already)

The ugly: Putting it bluntly, have you ever seen an format as horrid as XOXO? That’s what you get when you try to tunnel one set of semantics into another.

(OK granted OPML might be even uglier, but we can create a far more humane format)

Note: XOXO was inspired by desire to avoid the horrid macro-format OPML

the ugly absurd markup indirection







<element tagname='description'>

My favorite Weblog




<dd>My favorite Weblog</dd>


<product xml:id='xyz123'>

<name>Widget wonder</name>



My favorite Weblog


The Ugly: Absurd markup indirection

A condition where the attempt to fit a microformat into a host leads to unnaturally indirect markup design

what to do about the ugly
What to do about the ugly

Elemental microformats minimize syntactic footprint, and are thus harmless.

Most compound microformats are hopeless cases. In almost all cases its better to Just Use XML.

Who needs hAtom when Atom does the trick, and is thriving?

XBEL is a more humane alternative to XOXO (and even OPML)

BTW “Ugly” is not a negligible problem. Form is Function.

the bad semantic waffling
The bad: Semantic waffling
  • Microformats have to in effect steal and re-purpose the host format’s Semantics
  • Some formats make somewhat dodgy use of host language constructs (e.g. a/@rev in vote-links)
  • Few microformats have even reasonable syntactic schema, let alone semantic

Note: Schematron is a great schema language for the likes of microformats, and even for their semantics. Ask me later about Schematron Abstract Patterns

microformat profiles

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">

<html xmlns="">

<head profile="">

<title>Sample document</title>


Microformat profiles

Microformat advocates have taken a stab at alleviating the “bad” by specifying a “profile” link from the source document to a description of the microformat.

xmdp for microformat profiles
XMDP for microformat profiles

Microformats descriptions were originally ad-hoc Wiki pages. Profiles movement has defined a super-simple format based on a subset of XHTML.

Called XHTML Meta Data Profile (XMDP)

Example Web view of XMDP

what else to do about the bad
What else to do about the bad

XMDP is all about prose description, and is very non-formal

We can do so much better

beyond syntax
Beyond syntax

We know that XML is a useful alphabet, but a library of XML needs a reference section for true advancement

That’s what we’re all at this conference to talk about, right?

Microformats need a reference section even more badly, because they often turn simple alphabets into arcane substitution ciphers

Θe quik βroυν φox jυμπσ oveρ θe λειζy δoγ

semantic transparency
Semantic transparency

Semantic transparency is the ability to share context between systems by accessing resources that can be automatically located from the syntax.

Microformats seek to share context, but in their basic form do not offer the tools for context sharing.

Semantic transparency would add value and longevity to documents using microformats.

just use rdf
Just use RDF?

RDF does provide for semantic transparency, unlike XML, or microformats. It has very formalized semantic expressiveness, and healthy support in tools and standards

We could just advocate standardizing on RDF representations of such rich data.

let s get real
Let’s get real

RDF/XML’s syntax is awkward, especially for the sorts of prose/narrative documents that serve as host to microformats

RDF is not popular with many in the XML and Web 2.0 world; this “political” battle distracts from getting useful work done

practical meeting
Practical meeting

Time is finally right for a practical meeting of XML and RDF technology I’ve been personally advocating for seven years

Why not use syntax transform technology to extract Semantic details from whatever conventions we can identify in XML and microformats?

enter grddl
  • W3C draft for using transforms such as XSLT to convert XML to RDF
    • General conventions for associating XML languages with GRDDL transforms
  • Piggy-backs off microformats profiles
    • Rather than XMDP the profile link is to a XHTML page with embedded RDF
  • You would add transforms to the base GRRDL profile for the host language

Pronounced “Griddle”

Short for “Gleaning Resource Descriptions from Dialects of Languages”

dublin core rdf from xhtml


<xsl:template match='xhtml:title'>




Dublin Core/RDF from XHTML

Part of a theoretical script, dc-from-xhtml.xslt, for generating Dublin Core in RDF/XML from XHTML metadata

W3C hosts a very convoluted implementation of this: dc-extract.xsl

xhtml grddl profile

<html xmlns="">

<head profile="">

<title>Some Document</title>

<link rel="transformation"


<meta name="DC.Subject"

content="ADAM; Simple Search; Index+; prototype" />







rdf xml result





<rdf:Description rdf:about="">

<dc:title>Some Document</dc:title>



RDF/XML result
using grddl with microformats
Using GRDDL with microformats


grddl in practice
GRDDL in practice
  • The main implementation is a Firefox “GreaseMonkey” script
    • microcontentextractor.user.js applies GRDDL profiles and builds an aggregated model for the user
  • GRDDL does provide a way of increasing the formality of microformat models, an important step towards semantic transparency
  • With GRDDL in place the microformats buzz at least offers Webmasters an rough and ready path toward Semantic technology
just use xml or json or



<weblog href="">

<title>Example Weblog</title>

<webfeed href="" type="application/atom+xml"/>

<description>That good ole Weblog</description>




{"blog": "",

"feed": "",

"description": "My buddy's Weblog",

"tags": ["buddy"]



Just use XML (or JSON or...)

Blogroll example in plain XML (compare XOXO)

Blogroll example in plain JSON

not as ugly but just as bad right
Not as ugly, but just as bad, right?

Semantic technology advocates need to do a better job of building on plain old XML. GRDDL is a good first step, but more is needed.

This is my primary space of professional interest.

Again: if you see me later, ask me about Schematron Abstract Patterns

As for JSON. Work is just starting, but let’s not forget the XML lesson:

Collaborate rather than compete with emerging syntax.

rdf a

RDF/A is a system for embedding triples right into documents using ideas similar to microformats.

It eliminates the extra transform step required by GRDDL for extracting RDF

Note: RDF/A predates both microformats and GRDDL

rel license microformat example

<html xmlns="">


<title>Some Document</title>




<p>This document is licensed under a

<a rel="license" href="">

Creative Commons Non-Commercial License






rel-license microformat example

rel-license is a microformat for providing a link specifically to the license for the source document.

rdf a license example

<html xmlns=""



<title>Some Document</title>




<p>This document is licensed under a

<arel="cc:license" href="">

Creative Commons Non-Commercial License






RDF/A license example

In RDF/A you would repurpose an existing RDF vocabulary for a license relationship, and just embed this into the host document

Yes, QNames in content stink, but they’re all over the XML and RDF worlds

advantage rdf a
Advantage RDF/A?

Qualification of the license relationship provides for discovery and semantic precision. The namespace can be treated as a link and dereferenced for discovery and hence Semantic transparency.

That fixes the “bad”, but RDF/A is no help with the “ugly”. Stretching RDF to fit an XHTML skeleton gets grungy in a hurry.

Note: RDF/A is not the same as the Talis “RDF in HTML” system used in the GRDDL profile document. Yeah, we need to get our act together, folks.




Microformats home


“Thinking XML” column

“Perspective on XML” column


“Microformats in Context”


more fun links

More fun links