GRDDL (pronounced "''griddle''") is a markup format for Gleaning Resource Descriptions from Dialects of Languages. It is a
W3C Recommendation
The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 and led by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working t ...
XML
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable ...
documents, including
XHTML
Extensible HyperText Markup Language (XHTML) is part of the family of XML markup languages. It mirrors or extends versions of the widely used HyperText Markup Language (HTML), the language in which Web pages are formulated.
While HTML, prior ...
A document specifies associated transformations, using one of a number of ways.
For instance, an XHTML document may contain the following markup:
Document consumers are informed that there are GRDDL transformations available in this page, by including the following in the profile attribute of the head element:
http://www.w3.org/2003/g/data-view
The available transformations are revealed through one or more link elements:
This code is valid for
XHTML
Extensible HyperText Markup Language (XHTML) is part of the family of XML markup languages. It mirrors or extends versions of the widely used HyperText Markup Language (HTML), the language in which Web pages are formulated.
While HTML, prior ...
1.x only. The profile attribute has been dropped in
HTML5
HTML5 is a markup language used for structuring and presenting content on the World Wide Web. It is the fifth and final major HTML version that is a World Wide Web Consortium (W3C) recommendation. The current specification is known as the HTML ...
, including its XML serialisation.
Microformats and profile transformations
If an XHTML page contains
Microformat
Microformats (μF) are a set of defined HTML classes created to serve as consistent and descriptive metadata about an element, designating it as representing a certain type of data (such as contact information, geographic coordinates, events ...
s, there is usually a specific profile.
For instance, a document with hcard information should have:
When fetched http://www.w3.org/2006/03/hcard has:
and
The GRDDL aware agent can then use that profileTransformation to extract all hcard data from pages that reference that link.
XML and transformations
In a similar fashion to XHTML, GRDDL transformations can be attached to XML documents.
XML namespace transformations
Just like a profileTransformation, an XML namespace can have a transformation associated with it.
This allows entire XML dialects (for instance, KML or Atom) to provide meaningful RDF.
An XML document simply points to a namespace
and when fetched, http://example.com/1.0/ points to a namespaceTransformation.
This also allows very large amounts of the existing XML data in the wild to become RDF/XML with minimal effort from the namespace author.
Output
Once a document has been transformed, there is an RDF representation of that data.
This output is generally put into a database and queried via
SPARQL
SPARQL (pronounced " sparkle" , a recursive acronym for SPARQL Protocol and RDF Query Language) is an RDF query language—that is, a semantic query language for databases—able to retrieve and manipulate data stored in Resource Description ...
.
Implementations
GRDDL consumers (also known as GRDDL aware agents)
PHP
PHP is a general-purpose scripting language geared toward web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1993 and released in 1995. The PHP reference implementation is now produced by The PHP Group. ...
Microformats
Microformats (μF) are a set of defined HTML classes created to serve as consistent and descriptive metadata about an element, designating it as representing a certain type of data (such as contact information, geographic coordinates, events ...
– a simplified approach to semantically annotate data in websites
* RDFa – a
W3C
The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 and led by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working to ...
Recommendation for annotating websites with RDF data
* eRDF – an alternative to RDFa