RDFa
≈ 5 min read
Names in other languages
No names in other languages are held for this entry yet.
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
RDFa or Resource Description Framework in Attributes is a W3C Recommendation that adds a set of attribute-level extensions to HTML, XHTML and various XML-based document types for embedding rich metadata within web documents. The Resource Description Framework (RDF) data-model mapping enables the use of RDFs for embedding RDF subject-predicate-object expressions within XHTML documents. RDFa also enables the extraction of RDF model triples by compliant user agents. The RDFa community runs a wiki website to host tools, examples, and tutorials.
RDFa or Resource Description Framework in Attributes is a W3C Recommendation that adds a set of attribute-level extensions to HTML, XHTML and various XML-based document types for embedding rich metadata within web documents. The Resource Description Framework (RDF) data-model mapping enables the use of RDFs for embedding RDF subject-predicate-object expressions within XHTML documents. RDFa also enables the extraction of RDF model triples by compliant user agents. The RDFa community runs a wiki website to host tools, examples, and tutorials.
Essence
The essence of RDFa is to provide a set of attributes that can be used to carry metadata in an XML language (hence the 'a' in RDFa). These attributes are: : a URI or CURIE specifying the resource the metadata is about and : specifying a relationship and reverse-relationship with another resource, respectively , and : specifying the partner resource : specifying a property for the content of an element or the partner resource : optional attribute that overrides the content of the element when using the property attribute : optional attribute that specifies the datatype of text specified for use with the property attribute : optional attribute that specifies the RDF type(s) of the subject or the partner resource (the resource that the metadata is about).
Benefits
There are five "principles of interoperable metadata" met by RDFa. Publisher Independence – each site can use its own standards Data Reuse – data are not duplicated. Separate XML and HTML sections are not required for the same content. Self Containment – the HTML and the RDF are separated Schema Modularity – the attributes are reusable Additionally RDFa may benefit web accessibility as more information is available to assistive technology.
Examples
The following is an example of adding Dublin Core metadata to an XML element in an XHTML file. Dublin Core data elements are data typically added to a book or article (title, author, subject etc.) Wikinomics Don Tapscott 20061-10-01 Moreover, RDFa allows the passages and words within a text to be associated with semantic markup: In his latest book Wikinomics , Don Tapscott explains deep changes in technology, demographics and business. The book is due to be published in October 2006 .
XHTML + RDFa 1.0
The following is an example of a complete XHTML+RDFa 1.0 document. It uses Dublin Core and FOAF, an ontology for describing people and their relationships with other people and things: John's Home Page John's Home Page My name is John D and I like Einstürzende Neubauten . My favorite book is the inspiring Weaving the Web by Tim Berners-Lee . In the example above, the document URI can be seen as representing an HTML document, but the document URI plus the "#me" string http://example.org/john-d/#me represents the actual person, as distinct from a document about them. The foaf:primaryTopic in the header tells us the URI of the person the document is about. The foaf:nick property (in the first span element) contains a nickname for this person, and the dc:creator property (in the meta element) tells us who created the document. The hyperlink to the Einstürzende Neubauten website contains rel="foaf:interest" , suggesting that John Doe is interested in this band. The URI of their website is a resource. The foaf:interest inside the second p element is referring to a book by ISBN. The resource attribute defines a resource in a similar way to the href attribute, but without defining a hyperlink. Further into the paragraph, a span element containing an about attribute defines the book as another resource to specify metadata about. The book title and author are defined within the contents of this tag using the dc:title and dc:creator properties. Here are the same triples when the above document is automatically converted to RDF/XML: Jonathan Doe John D Tim Berners-Lee Weaving the Web John's Home Page John's Home Page My name is John D and I like Einstürzende Neubauten . My favorite book is the inspiring Weaving the Web by Tim Berners-Lee . Note how the prefix foaf is still used without declaration. RDFa 1.1 automatically includes prefixes for popular vocabularies such as FOAF. The minimal document is: Example Document Welcome to my blog . That is, it is recommended that all of these attributes are used: vocab , typeof , property ; not only one of them. RDFa Structured Data Example Person Schema in RDFa. Manu Sporny , Founder/CEO Phone: (540) 961-4469 E-mail: msporny@digitalbazaar(.)com Links: Manu's homepage
See also
GRDDL, a way to extract (annotated) data out of XHTML and XML documents and transform it into an RDF graph Microdata - another approach at embedding semantics in HTML using additional attributes Microformats, a simplified approach to semantically annotate data in web pages Open Graph protocol, a way to use RDFa to integrate web pages into the Facebook social graph Schema.org, search-engine supported schemas for structured data markup on web pages that can be expressed as RDFa
References
External links
RDFa Primer hGRDDL RDFa – Implications for Accessibility Mark Birbeck presenting RDFa at Google in May 2008. Video archived at ghostarchive.org on 24 May 2022.
Text derived from https://en.wikipedia.org/w/index.php?oldid=1375803865 under CC BY-SA 4.0; modifications have been made.
References
- ↩Wikipedia “RDFa” publication date (×1) · confidence 0.95 revision URL