hcard-validator.jpg

Der hCard Validator…is an unofficial validator/conformance checker of the hCard microformat„. Während der Optimus-Validator ein breites Spektrum an Microformats unterstützt, bring der hCard Validator (wie der Name schon sagt) ein paar schicke extra Features zum validieren von hCards mit sich.

Im Gegensatz zu Optimus, muss die hCard nicht zwingend über eine URL erreichbar sein, sondern kann auch bequem über ein Textfeld oder einen statischen Upload überprüft werden.

Weitere tolle Features sind z.B. der Profile-URI check:

<head> uses profile “http://gmpg.org/xfn/11” which is unrelated to 'http://www.w3.org/2006/03/hcard'
This may suggest that document does not use hCard microformat.

oder der E-Mail – Adressen – Check:

Value of email property doesn’t look like an e-mail
Found “webmaster-at-notiz.blog”, but expected simple syntax in form mailto:joe@example.com?subject=is%20optional.

(Test-hCard)

Zum Test habe ich die gleiche URL auch noch mit dem Chef-Transformer validiert, dem aber (leider) diese Liebe fürs Detail fehlt…

Angelehnt an die, für Profile-URIs geschaffene URI-Services wie z.B. PURL (oder XMLNS für XML-Namespaces), schafft XRDSType.net einen zentralen und „community-neutral URIspace“ für XRDS-Simple Types.

Zum besseren Verständnis hier zwei Beispiele…

Profile-URI:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">

  <head profile="http://gmpg.org/xfn/11">
...Code-Sprache: HTML, XML (xml)

XRDS-Simple Type:

<Service>
  <Type>http://gmpg.org/xfn/11</Type>
  <URI simple:httpMethod="POST">http://twitter.com/pfefferle</URI>
</Service>Code-Sprache: HTML, XML (xml)

Zwei wesentliche Aspekte für den Einsatz von XRDSTypes.net:

  • Besteht schon eine Profile-URI bzw. XMLNS wird dieser verwendet.
  • XRDSTypes soll ein community-unabhängiger Platz sein, um Type-URIs zu definieren.

Für Microformats könnten also die im Microformats Wiki definierten Profile URIs genutzt werden.

(via Mr. Topf)

Um auf die im HTML-Quellcode verwendeten Microformats hinweisen zu können, wurden vom Microformats-Team jetzt einheitliche Profile URIs veröffentlicht. Berücksichtigt wurden alle non-draft Microformats (Stand: März 2008) ausgenommen XOXO und XMDP:

SpecificationProfile(s)
geo http://purl.org/uF/geo/0.9/
hAtom http://purl.org/uF/hAtom/0.1/
hCalendar http://purl.org/uF/hCalendar/1.0/
hCard http://www.w3.org/2006/03/hcard or http://purl.org/uF/hCard/1.0/
hResume http://microformats.org/wiki/hresume-profile
rel-license http://purl.org/uF/rel-license/1.0/
rel-nofollow http://purl.org/uF/rel-nofollow/1.0/
rel-tag http://purl.org/uF/rel-tag/1.0/
VoteLinks http://purl.org/uF/VoteLinks/1.0/
XFN http://gmpg.org/xfn/11

Eine komplette Übersicht findet man auch über purl.org/uF/2008/03/ oder im Microformats Wiki.

Diese URIs können, gemäß der W3C namespace policy <head /> der HTML Datei angegeben werden. Beispiel:

<head profile="http://www.ietf.org/rfc/rfc2731.txt
               http://www.w3.org/2006/03/hcard
               http://purl.org/uF/hAtom/0.1/">Code-Sprache: HTML, XML (xml)

Quelle: ‘This Week in Microformats’ für März.