ArticleslgStudy

science

RDFa

RDFa is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand RDFa rather than just read about it. In short: 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 — main illustration
RDFa — illustration

Key takeaways

  • RDFa belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect RDFa to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of RDFa from memory before moving on to harder problems.

Reference excerpt

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.

History RDFa was first proposed by Mark Birbeck in the form of a W3C note entitled XHTML and RDF, which was then presented to the Semantic Web Interest Group at the W3C's 2004 Technical Plenary. Later that year the work became part of the sixth public Working Draft of XHTML 2.0. Although it is generally assumed that RDFa was originally intended only for XHTML 2, in fact the purpose of RDFa was always to provide a way to add metadata to any XML-based language. Indeed, one of the earliest documents bearing the RDF/A Syntax name has the sub-title A collection of attributes for layering RDF on XML languages. The document was written by Mark Birbeck and Steven Pemberton, and was made available for discussion on October 11, 2004. In April 2007 the XHTML 2 Working Group produced a module to support RDF annotation within the XHTML 1 family. As an example, it included an extended version of XHTML 1.1 dubbed XHTML+RDFa 1.0. Although described as not representing an intended direction in terms of a formal markup language from the W3C, limited use of the XHTML+RDFa 1.0 DTD did subsequently appear on the public Web. October 2007 saw the first public Working Draft of a document entitled RDFa in XHTML: Syntax and Processing. This superseded and expanded upon the April draft; it contained rules for creating an RDFa parser, as well as guidelines for organizations wishing to make practical use of the technology. In October 2008 RDFa 1.0 reached recommendation status. RDFa 1.1 reached recommendation status in June 2012. It differs from RDFa 1.0 in that it no longer relies on the XML-specific namespace mechanism. Therefore, it is possible to use RDFa 1.1 with non-XML document types such as HTML 4 or HTML 5. Details can be found in an appendix to HTML 5. An additional RDFa 1.1 Primer document was last updated 17 March 2015. (The first public Working Draft dates back to 10 March 2006.)

Versions and variants There are some main well-defined variants of the basic concepts, that are used as reference and as abbreviation to the W3C standards.

HTML+RDFa RDFa was defined in 2008 with the "RDFa in XHTML: Syntax and Processing" Recommendation. Its first application was to be a module of XHTML. The HTML applications remained, "a collection of attributes and processing rules for extending XHTML to support RDF" expanded to HTML5, are now expressed in a specialized standard, the "HTML+RDFa" (the last is "HTML+RDFa 1.1 - Support for RDFa in HTML4 and HTML5").

RDFa 1.0 The "HTML+RDFa" syntax of 2008 was also termed "RDFa 1.0", so, there is no "RDFa Core 1.0" standard. In general this 2008's RDFa 1.0 is used with the old XHTML standards (as long as RDFa 1.1 is used with XHTML5 and HTML5).

RDFa 1.1 Is the first generic (for HTML and XML) RDFa standard; the "RDFa Core 1.1" is in the Third Edition, since 2015.

RDFa Lite RDFa Lite is a W3C Recommendation (1.0 and 1.1) since 2009, where it is described as follows:

RDFa Lite is minimal subset of RDFa ... consisting of a few attributes that may be used to express machine-readable data in Web documents like HTML, SVG, and XML. While it is not a complete solution for advanced data markup tasks, it does work for most day-to-day needs and can be learned by most Web authors in a day.

RDFa Lite consists of five attributes: vocab, typeof, property, resource, and prefix. RDFa 1.1 Lite is upwards compatible with RDFa 1.1. In 2009 the W3C was positioned to retain RDFa Lite as unique and definitive standard alternative to Microdata. The position was confirmed with the publication of the HTML5 Recommendation in 2014.

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:

about a URI or CURIE specifying the resource the metadata is about rel and rev specifying a relationship and reverse-relationship with another resource, respectively src, href and resource specifying the partner resource property specifying a property for the content of an element or the partner resource content optional attribute that overrides the content of the element when using the property attribute datatype optional attribute that specifies the datatype of text specified for use with the property attribute typeof 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.

Usage There is a growing number of tools for better usage of RDFa vocabularies and RDFa annotation.

HTML+RDFa statistics

Simplified approaches to semantically annotate information items in webpages were greatly encouraged by the HTML+RDFa (released in 2008) and microformats (since ~2005) standards. As of 2013 these standards were encoding events, contact information, products, and so on. Despite the vCard semantics (only basic items of person and organization annotations) dominance, and some cloning of annotations along the same domain, the counting of webpages (URLs) and domains with annotations is an important statistical indicator for usage of semantically annotated information in the Web. The statistics of 2017 show that usage of HTML+RDFa is now less than that of Microformats.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with RDFa

Start with the simplest possible case. Write down what RDFa claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to RDFa before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about RDFa ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of RDFa

In research
RDFa appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses RDFa in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
RDFa is common in secondary-school and first-year university syllabi. It links to neighbouring topics Domain-specific knowledge representation languages, Metadata publishing, Resource Description Framework, so understanding it makes those chapters shorter.
In everyday life
Look for RDFa outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study RDFa in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what RDFa means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain RDFa out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is RDFa in simple terms?

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 us…

Why does RDFa matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study RDFa?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on RDFa.

Tags

  • Domain-specific knowledge representation languages
  • Metadata publishing
  • Resource Description Framework
  • Semantic HTML
  • Semantic Web
  • WordPress
  • World Wide Web Consortium standards
  • XML-based standards

Keep exploring