Utilizing and building the Semantic Web with PHP

Christian Weiske

Semantic data?

Semantic data?

Semantic data representation

Making it better since 2001™

RDF - Resource Description Framework

Statements

Resources

RDF #2

RDF #3

RDF #4

The good

The bad

RDFa - Embedding RDF

RDFa #2

<p xmlns:cal="http://www.w3.org/2002/12/cal/ical#">
 I will be giving the talk
 <span  property="cal:summary">
  Utilizing and building the Semantic Web with PHP
 </span>
 on
 <span property="cal:dtstart"
  content="2010-08-19T14:00:00+02:00"
  datatype="xsd:dateTime"
 >
  Saturday 21st at 14:00
 </span>.
</p>

RDFa #3

The good

The bad

Microformats

Microformat usage

  1. Define profile to use
    <head profile='http://microformats.org/profile/vote-links'/>
    <link rel="profile" href="http://microformats.org/profile/vote-links"/>
    This content uses 
    <a rel="profile"
       href="http://microformats.org/profile/vote-links"
    >
     vote links
    </a>.
    

Microformat usage #2

  1. Add classes
    <a
     rev="vote-against"
     href="http://www.whitehouse.gov/president/gwbbio.html"
    >
     George W. Bush
    </a>
    
  2. Test it

GRDDL

Gleaning Resource Descriptions from Dialects of Languages

GRDDL #2

  1. Write XSL to transform custom XML dialect to RDF/XML
  2. Link transformation XSL in XML header
    <xml version="1.0" encoding="utf-8"?>
    <superduperdata
     xmlns:grddl='http://www.w3.org/2003/g/data-view#'
     grddl:transformation="http://example.org/my/trans.xsl"
    >
    

Use cases

Data storage

Generating semantic data

Consuming semantic data

Libraries

Redland - librdf

RDF API 4 PHP

ARC

Virtuoso Universal Server

Erfurt

PEAR RDF packages

PEAR's XML_GRDDL

hkit

Tools

Triplify

OntoWiki

LESS

LDAP2Sparql

That's it

Questions?