RDFa Core 1.1 - Deutsche Übersetzung der W3C-Empfehlung

Übersetzung vom 21.04.2013

Die einzige normative Version ist die englische Version unter:
http://www.w3.org/TR/2012/REC-rdfa-core-20120607/

Diese Übersetzung ist zu finden unter:
http://www.schumacher-netz.de/TR/2012/REC-rdfa-core-20120607.de.html

Diese Übersetzung kann Fehler enthalten. Kommentare oder Korrekturvorschläge zu dieser deutschen Übersetzung bitte per E-Mail an den Übersetzer.

Weitere Übersetzungen von W3C-Dokumenten finden Sie auf den Seiten des Übersetzers.

Übersetzer: Stefan Schumacher (www.schumacher-netz.de)
Informationen zum Urheberrecht.

Kommentare des Übersetzers werden durch eine andere Hintergrundfarbe hervorgehoben und befinden sich normalerweise in Bereichen wie diesem. Die Kommentare können jedoch auch im laufenden Text ohne eigenen Kasten auftauchen, bitte achten Sie auf diese Hintergrundfarbe. Die Kommentare sind nicht Teil der Spezifikation, sie dienen nur der Erläuterung einzelner Begriffe oder Abschnitte.

W3C

RDFa Core 1.1

Syntax und Verarbeitungsregeln zur Einbettung von RDF durch Attribute

W3C-Empfehlung vom 07. Juni 2012

Diese Version:
http://www.w3.org/TR/2012/REC-rdfa-core-20120607/
Aktuelle Version:
http://www.w3.org/TR/rdfa-core/
Vorherige Version:
http://www.w3.org/TR/2012/PR-rdfa-core-20120508/
Vorherige Empfehlung in Version 1.0:
http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014/
Editoren:
Ben Adida, Creative Commons, ben@adida.net
Mark Birbeck, webBackplane, mark.birbeck@webBackplane.com
Shane McCarron, Applied Testing and Technology, Inc., shane@aptest.com
Ivan Herman, W3C, ivan@w3.org

Bitte konsultieren Sie die Errata dieses Dokuments, die einige normative Berichtigungen enthalten können.

Dieses Dokument ist auch in diesen nicht normativen Formaten erhältlich: Diff zur Vorgeschlagenen Empfehlung, PostScript-Version und PDF-Version.

Die englische Version dieser Spezifikation ist die einzige normative Version. Nicht normative Übersetzungen könnten auch verfügbar sein.


Zusammenfassung

Abstract

Das aktuelle Internet besteht überwiegend aus unzähligen Dokumenten, die mit HTML erzeugt wurden. Diese Dokumente enthalten eine bedeutsame Menge strukturierter Daten, die für Tools und Anwendungen überwiegend nicht zur Verfügung stehen. Wenn Autoren diese Daten umfassender ausdrücken können, und wenn Tools sie lesen können, wird eine neue Welt der Benutzerfunktionalität verfügbar. Benutzer können strukturierte Daten zwischen Anwendungen und Webseiten austauschen und Browser-Anwendungen können das Benutzererlebnis verbessern: eine Veranstaltung auf einer Internetseite kann direkt in den Kalender des Benutzers importiert werden; die Lizenz eines Dokuments kann erkannt werden, so dass Benutzer automatisch über ihre Rechte informiert werden; der Macher eines Fotos, Informationen über die Kameraeinstellung, Auflösung, Ort und Thema können ebenso einfach veröffentlicht werden wie das betreffende Foto selbst. Eine strukturierte Suche und ein Weitergeben des Fotos mit den betreffenden Informationen wird möglich.

The current Web is primarily made up of an enormous number of documents that have been created using HTML. These documents contain significant amounts of structured data, which is largely unavailable to tools and applications. When publishers can express this data more completely, and when tools can read it, a new world of user functionality becomes available, letting users transfer structured data between applications and web sites, and allowing browsing applications to improve the user experience: an event on a web page can be directly imported into a user's desktop calendar; a license on a document can be detected so that users can be informed of their rights automatically; a photo's creator, camera setting information, resolution, location and topic can be published as easily as the original photo itself, enabling structured search and sharing.

RDFa Core ist eine Spezifikation, um strukturierte Daten mit Attributen in allen Bezeichnersprachen auszudrücken. Die eingebetteten Daten in der Bezeichnersprache können oft mit Hilfe vom RDFa-Quelltext wiederverwendet werden, so dass Autoren signifikante Daten im Dokumentinhalt nicht wiederholen müssen. Die zugrundeliegende abstrakte Darstellung ist RDF [RDF-PRIMER]. Autoren können mit RDF ihre eigenen Vokabulare erstellen, andere erweitern und ihre Vokabulare im Laufe der Zeit mit höchstmöglicher Interoperabilität weiterentwickeln. Die angegebene Struktur ist eng mit den Daten verbunden, so dass dargestellte Daten mit ihrer maßgeblichen Struktur kopiert und eingefügt werden können.

RDFa Core is a specification for attributes to express structured data in any markup language. The embedded data already available in the markup language (e.g., HTML) can often be reused by the RDFa markup, so that publishers don't need to repeat significant data in the document content. The underlying abstract representation is RDF [RDF-PRIMER], which lets publishers build their own vocabulary, extend others, and evolve their vocabulary with maximal interoperability over time. The expressed structure is closely tied to the data, so that rendered data can be copied and pasted along with its relevant structure.

Die Regeln für die Interpretation der Daten sind allgemeingültig, so dass für unterschiedliche Formate keine unterschiedlichen Reglen formuliert werden müssen; Autoren und Herausgeber von Daten können so ihre eigenen Formate definieren, ohne Software aktualisieren zu müssen oder Formate über eine zentrale Autorität registrieren zu müssen. Noch müssen sie befürchten, dass zwei Formate miteinander in Konflikt geraten könnten.

The rules for interpreting the data are generic, so that there is no need for different rules for different formats; this allows authors and publishers of data to define their own formats without having to update software, register formats via a central authority, or worry that two formats may interfere with each other.

RDFa und [MICROFORMATS] haben einige Gemeinsamkeiten. Während Microformats sowohl die Syntax zur Einbettung von strukturieren Daten in HTML-Dokumente als auch ein Vokabular mit bestimmten Begriffen für jedes Microformat angibt, gibt RDFa nur eine Syntax an und verlässt sich auf unabhängige Begriffsspezifikationen anderer (oft Vokabular oder Taxonomie genannt). Mit RDFa können Begriffe aus mehreren unabhängig entwickelten Vokabularen frei miteinander kombiniert werden. RDFa ist so gestaltet, dass die Sprache ohne das Wissen des im speziellen Fall verwendeten Vokabulars verarbeitet werden kann.

RDFa shares some of the same goals with microformats [MICROFORMATS]. Whereas microformats specify both a syntax for embedding structured data into HTML documents and a vocabulary of specific terms for each microformat, RDFa specifies only a syntax and relies on independent specification of terms (often called vocabularies or taxonomies) by others. RDFa allows terms from multiple independently-developed vocabularies to be freely intermixed and is designed such that the language can be parsed without knowledge of the specific vocabulary being used.

Dieses Dokument ist eine detaillierte Syntax-Spezifikation für RDFa, gerichtet an:

This document is a detailed syntax specification for RDFa, aimed at:

Suchen Sie eine Einführung in die Verwendung von RDFa und einige Beispiele aus dem wahren Leben, dann schauen Sie doch in den [RDFA-PRIMER].

For those looking for an introduction to the use of RDFa and some real-world examples, please consult the [RDFA-PRIMER].

Wie dieses Dokument zu lesen ist

How to Read this Document

Zu aller Erst, kennen Sie weder RDFa noch RDF, und möchten RDFa einfach nur zum Quelltext Ihrer Dokumente hinzufügen, dann könnte Sie der RDFa Primer [RDFA-PRIMER] als Einführung eher ansprechen.

First, if you are not familiar with either RDFa or RDF, and simply want to add RDFa to your documents, then you may find the RDFa Primer [RDFA-PRIMER] to be a better introduction.

Kennen Sie sich bereits mit RDFa aus und möchten Sie die Verarbeitungsregeln durchsehen - eventuell um einen RDFa-Prozessor zu programmieren - dann wird Sie der Abschnitt Verarbeitungsmodell am meisten interessieren. Er enthält einen Überblick über die Verarbeitungsschritte, gefolgt von detaillierteren Bereichen, einem Bereich für jede Regel.

If you are already familiar with RDFa, and you want to examine the processing rules — perhaps to create an RDFa Processor — then you'll find the Processing Model section of most interest. It contains an overview of each of the processing steps, followed by more detailed sections, one for each rule.

Kennen Sie sich mit RDFa nicht aus, dafür aber mit RDF, dann finden Sie womöglich interessante Informationen im Syntaxüberblick, bevor Sie das Verarbeitungsmodell lesen, weil er Ihnen verschiedene Quelltextbeispiele mit RDFa-Code zeigt. Zuerst einige Beispiele in Augenschein zu nehmen, sollte das Lesen der Verarbeitungsreglen vereinfachen.

If you are not familiar with RDFa, but you are familiar with RDF, then you might find reading the Syntax Overview useful, before looking at the Processing Model since it gives a range of examples of markup that use RDFa. Seeing some examples first should make reading the processing rules easier.

Kennen Sie sich mit RDF nicht aus, dann möchten Sie vielleicht einen Blick auf den Abschnitt über die RDF-Terminologie werfen, bevor Sie versuchen, zu viel mit RDFa zu machen. Auch wenn RDFa so gestaltet ist, dass es einfach zu verfassen ist - und Autoren RDF nicht verstehen müssen, um es zu verwenden - wird jeder RDF verstehen müssen, der Anwendungen schreibt, die RDFa konsumieren. Es gibt viel Material über RDF im Internet und immer mehr Tools, die RDFa unterstützen. Dieses Dokument enthält nur soviel Hintergrundwissen zu RDF, wie nötig, um die Ziele von RDFa klarer zu machen.

If you are not familiar with RDF, then you might want to take a look at the section on RDF Terminology before trying to do too much with RDFa. Although RDFa is designed to be easy to author — and authors don't need to understand RDF to use it — anyone writing applications that consume RDFa will need to understand RDF. There is a lot of material about RDF on the web, and a growing range of tools that support RDFa. This document only contains enough background on RDF to make the goals of RDFa more clear.

RDFa ist eine Methode, um RDF-artige Verwandschaften durch Verwendung von Attributen in existierenden Bezeichnersprachen wie HTML auszudrücken. RDF ist vollständig internationalisiert und erlaubt die Verwendung von Internationalized Resource Indentifiers oder IRIs. Sie werden den Begriff 'IRI' überall in diesem Dokument finden. Auch wenn Sie den Begriff IRI nicht kennen, haben Sie wahrscheinlich schon einmal die Begriffe 'URI' oder 'URL' gesehen. IRIs sind die Erweiterung von URIs, sie können mehr als nur die reinen ASCII-Zeichen enthalten. RDF gestattet die Verwendung dieser Zeichen, und so auch RDFa. Diese Spezifikation war sehr bedacht bei der Verwendung des richtigen Begriffs, IRI, um klar zu machen, dass dies der Fall ist.

RDFa is a way of expressing RDF-style relationships using simple attributes in existing markup languages such as HTML. RDF is fully internationalized, and permits the use of Internationalized Resource Identifiers, or IRIs. You will see the term 'IRI' used throughout this specification. Even if you are not familiar with the term IRI, you probably have seen the term 'URI' or 'URL'. IRIs are an extension of URIs that permits the use of characters outside those of plain ASCII. RDF allows the use of these characters, and so does RDFa. This specification has been careful to use the correct term, IRI, to make it clear that this is the case.

Auch wenn sich diese Spezifikation exklusiv auf IRIs bezieht, ist es möglich, dass eine Wirtsprache die Syntax für ihre Attribute auf eine Untermenge der IRIs beschränkt (zum Beispiel @href in HTML5). Unabhängig von Validierungsbeschränkungen in Wirtsprachen, ist ein RDFa-Prozessor in der Lage, IRIs zu verarbeiten.

Even though this specification exclusively references IRIs, it is possible that a Host Language will restrict the syntax for its attributes to a subset of IRIs (e.g., @href in HTML5). Regardless of validation constraints in Host Languages, an RDFa Processor is capable of processing IRIs.

Status dieses Dokuments

Status of This Document

Dieser Abschnitt beschreibt den Status dieses Dokuments zum Zeitpunkt seiner Veröffentlichung. Andere Dokumente könnten dieses Dokument in Zukunft ersetzen. Eine Liste mit aktuellen W3C-Veröffentlichungen und die aktuelle Revision dieses Technischen Berichts können im Index der Technischen Berichte des W3C unter http://www.w3.org/TR/ gefunden werden.

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

Dieses Dokument wurde von W3C-Mitgliedern, Software-Entwicklern und anderen W3C-Gruppen und Interessierten überprüft und ist vom Direktor als eine W3C-Empfehlung anerkannt worden. Es ist ein beständiges Dokument und kann als Referenzmaterial verwendet oder von einem anderen Dokument zitiert werden. Die Aufgabe des W3C bei der Erstellung der Empfehlung ist es, die Aufmerksamkeit auf diese Spezifikation zu lenken und ihre weitläufige Anwendung zu fördern. Dies verbessert die Funktionalität und die Interoperabilität des Internets.

This document has been reviewed by W3C Members, by software developers, and by other W3C groups and interested parties, and is endorsed by the Director as a W3C Recommendation. It is a stable document and may be used as reference material or cited from another document. W3C's role in making the Recommendation is to draw attention to the specification and to promote its widespread deployment. This enhances the functionality and interoperability of the Web.

Dies ist eine Revision von RDFa Syntax 1.0 [RDFA-SYNTAX]. Dieses Dokument ersetzt die vorherige Empfehlung. Es gibt mehrere substanzielle Unterschiede zwischen dieser Version und ihrer vorherigen Version, einschließlich:

This is a revision of RDFa Syntax 1.0 [RDFA-SYNTAX]. This document supersedes the previous Recommendation. There are a number of substantive differences between this version and its predecessor, including:

  1. Entfernen der für XHTML bestimmten Regeln - diese sind nun in XHTML+RDFa [XHTML-RDFA] definiert.
  2. Eine Erweiterung der Datentypen einiger RDFa-Attribute, so dass sie nun Begriffe, CURIES oder 'Absolute IRIs' enthalten können.
  3. Wirtssprachen ist es erlaubt, eine eigene Zusammenstellung voreingestellter Begriffe, voreingestellte Präfix-Abbildungen und ein voreingestelltes Vokabular zu definieren.
  4. Die Fähigkeit, ein voreingestelltes Vokabular für Begriffe zu verwenden, die nicht definiert sind.
  5. Begriffe müssen ohne Beachtung der Groß- und Kleinschreibung verglichen werden.
  6. Eine umfassendere Funktionalität des Attributs @property, die in vielen Fällen das Attribut @rel ersetzen kann.
  7. Ein leicht veränderter Umgang mit @typeof, um es besser an den alltäglichen Gebrauch anzupassen.
  1. The removal of the specific rules for XHTML - these are now defined in XHTML+RDFa [XHTML-RDFA]
  2. An expansion of the datatypes of some RDFa attributes so that they can contain Terms, CURIES, or Absolute IRIs.
  3. Host languages are permitted to define collections of default terms, default prefix mappings, and a default vocabulary.
  4. The ability to define a default vocabulary to use for Terms that are undefined.
  5. Terms are required to be compared in a case-insensitive manner.
  6. A richer behavior of the @property attribute, that can replace, in many cases the @rel attribute.
  7. A slightly different handling of @typeof, making it better adapted to practical usage.

Es gibt eine ausführlichere Aufstellung der Änderungen in Änderungen.

Eine Testumgebung mit Beispielen ist verfügbar. Diese Testumgebung soll nicht allumfassend sein, jedoch könnten sich die Beispiele in der Testumgebung als nützliche Beispiele einer RDFa-Anwendung erweisen.

There is a more complete list of changes in Changes.

A sample test harness is available. This set of tests is not intended to be exhaustive. Users may find the tests to be useful examples of RDFa usage.

Diese Dokument wurde von der RDF Web Applications Working Group als eine W3C-Empfehlung veröffentlicht. Sollten Sie Kommentare zu diesem Dokument machen wollen, senden Sie diese bitte an public-rdfa@w3.org (abonnieren, Archiv). Jegliche Rückmeldung ist willkommen. Kommentare sollten auf Englisch verfasst werden.

This document was published by the RDF Web Applications Working Group as a Recommendation. If you wish to make comments regarding this document, please send them to public-rdfa@w3.org (subscribe, archives). All feedback is welcome.

Dieses Dokument wurde von einer Gruppe erstellt, die unter der W3C Patent Policy vom 5. Februar 2005 arbeitet. W3C unterhält eine öffentliche Liste aller Patentoffenlegungen, die in Verbindung mit den Ergebnissen dieser Gruppe stehen; jene Seite enthält gleichwohl eine Anleitung zur Offenlegung eines Patents. Ein Individuum, das tatsächliches Wissen über ein Patent hat, welches nach Glauben des Individuums Essentiellen Anspruch (Essentielle Ansprüche) enthält, muss die Informationen in Übereinstimmung mit Abschnitt 6 der W3C Patent Policy offenlegen.

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

Inhaltsverzeichnis

1. Motivation

1. Motivation

Dieser Abschnitt ist nicht normativ.

This section is non-normative.

RDF/XML [RDF-SYNTAX] ist flexibel genug, um alle abstrakten Konzepte aus RDF [RDF-CONCEPTS] darzustellen. Jedoch gibt es einige Herausforderungen; erstens ist es schwierig oder unmöglich, Dokumente, die RDF/XML enthalten, mit XML-Schema oder DTDs zu validieren. Infolgedessen wird es schwierig, diese Dokumente in andere Bezeichnersprachen zu importieren. Obwohl neuere Schema-Sprachen wie RELAX NG [RELAXNG-SCHEMA] einen Weg bieten, Dokumente zu validieren, die beliebiges RDF/XML enthalten, wird es noch einige Zeit dauern, bis sie weitreichend unterstützt werden.

RDF/XML [RDF-SYNTAX] provides sufficient flexibility to represent all of the abstract concepts in RDF [RDF-CONCEPTS]. However, it presents a number of challenges; first it is difficult or impossible to validate documents that contain RDF/XML using XML Schemas or DTDs, which therefore makes it difficult to import RDF/XML into other markup languages. Whilst newer schema languages such as RELAX NG [RELAXNG-SCHEMA] do provide a way to validate documents that contain arbitrary RDF/XML, it will be a while before they gain wide support.

Zweitens, selbst wenn man RDF/XML direkt in einen XML-Dialekt wie XHML einfügen könnte, würde es eine signifikante Datenverdoppelung durch die dargestellten Daten und die RDF/XML-Daten geben. Es wäre bei Weitem besser, dem Dokument RDF hinzuzufügen, ohne die existierenden Daten des Dokuments zu wiederholen. Stellt ein XHTML-Dokument zum Beispiel den Namen seines Autors im Text dar - vielleicht durch eine Verfasserzeile auf einer News-Seite - sollte es nicht nötig sein, diesen Namen für einen RDF-Ausdruck desselben Konzepts noch einmal zu wiederholen: es sollte möglich sein, den vorhandenen Quelltext in einer Weise zu ergänzen, so dass er als RDF interpretiert werden kann.

Second, even if one could add RDF/XML directly into an XML dialect like XHTML, there would be significant data duplication between the rendered data and the RDF/XML structured data. It would be far better to add RDF to a document without repeating the document's existing data. For example, an XHTML document that explicitly renders its author's name in the text — perhaps as a byline on a news site — should not need to repeat this name for the RDF expression of the same concept: it should be possible to supplement the existing markup in such a way that it can also be interpreted as RDF.

Es gibt einen weiteren Grund, die dargestellten Daten mit den strukturierten Daten zu vereinen. Es ist höchst vorteilhaft, die Internetdatenstruktur 'im Kontext' auszudrücken; da Benutzer oft Daten von einer Anwendung in eine andere übertragen möchten, manchmal in eine nicht internetbasierte Anwendung oder aus einer nicht internetbasierten Anwendung heraus, kann das Benutzererlebnis verbessert werden. Zum Beispiel könnten einem Benutzer Informationen über bestimmte dargestellte Daten über einen 'Rechts-Klick' auf das Objekt von Interesse präsentiert werden. Weiterhin könnten es Organisationen, die viel Inhalt produzieren (zum Beispiel Nachrichtenkanäle), für einfacher halten, die semantischen Daten im Quelltext einzubetten statt diese getrennt zu pflegen.

Another reason for aligning the rendered data with the structured data is that it is highly beneficial to express the web data's structure 'in context'; as users often want to transfer structured data from one application to another, sometimes to or from a non-web-based application, the user experience can be enhanced. For example, information about specific rendered data could be presented to the user via 'right-clicks' on an item of interest. Moreover, organizations that generate a lot of content (e.g., news outlets) find it easier to embed the semantic data inline than to maintain it separately.

In der Vergangenheit waren viele Attribute fest in der Bezeichnersprache 'verankert', um bestimmte Konzepte zu repräsentieren. Zum Beispiel gibt es in XHTML 1.1 [XHTML11] und HTML [HTML401] das Attribut @cite; mit diesem Attribut kann ein Autor einem Dokument Informationen über die Quelle eines Zitats hinzuzufügen.

In the past, many attributes were 'hard-wired' directly into the markup language to represent specific concepts. For example, in XHTML 1.1 [XHTML11] and HTML [HTML401] there is @cite; the attribute allows an author to add information to a document which is used to indicate the origin of a quote.

Jedoch machen es diese 'verankerten' Attribute schwer, einen allgemeinen Prozess zum Auslesen von Metadaten in einem beliebigen Dokument zu definieren. Ein RDFa-Prozessor müsste über jedes dieser speziellen Attribute Kenntnis haben. Eine Motivation für RDFa war es, eine Methode zu entwickeln, die im Gegensatz zur 'verankerten' Vorgehensweise, Dokumente auf allgemeine Art mit Metadaten ergänzt. Dies wurde durch Festlegung bestimmter Attribute und Verarbeitungsregeln erreicht, wobei diese Attribute jedoch Eigenschaften aus allen verfügbaren und stetig wachsenden RDF-Vokabularen enthalten können. In den meisten Fällen sind die Werte dieser Attribute die Informationen, die schon im Dokument des Autors vorhanden sind.

However, these 'hard-wired' attributes make it difficult to define a generic process for extracting metadata from any document since an RDFa Processor would need to know about each of the special attributes. One motivation for RDFa has been to devise a means by which documents can be augmented with metadata in a general, rather than hard-wired, manner. This has been achieved by creating a fixed set of attributes and parsing rules, but allowing those attributes to contain properties from any of a number of the growing range of available RDF vocabularies. In most cases the values of those properties are the information that is already in an author's document.

RDFa nimmt den Druck von den Designern einer Bezeichnersprache, alle strukturellen Forderungen vorauszusehen, die Benutzer ihrer Sprache haben könnten. Dies geschieht durch den Entwurf einer neuen Syntax für RDF, die nur auf Attributen beruht. Den Konzepten und Regeln dieser Spezifikation folgend, können Sprachdesigner RDFa ohne größere Schwierigkeiten in ihre Sprachumgebung importieren und zuversichtlich sein, dass konforme Prozessoren die semantischen Daten aus ihren Dokumenten auslesen können.

RDFa alleviates the pressure on markup language designers to anticipate all the structural requirements users of their language might have, by outlining a new syntax for RDF that relies only on attributes. By adhering to the concepts and rules in this specification, language designers can import RDFa into their environment with a minimum of hassle and be confident that semantic data will be extractable from their documents by conforming processors.

2. Ein Überblick über die Syntax

2. Syntax Overview

Dieser Abschnitt ist nicht normativ.

This section is non-normative.

Die folgenden Beispiele sind eine Hilfe für Leser, die mit RDFa noch nicht vertraut sind, um einen schnellen Eindruck davon zu bekommen, wie RDFa funktioniert. Für eine gründlichere Einführung lesen Sie bitte den RDFa Primer [RDFA-PRIMER].

The following examples are intended to help readers who are not familiar with RDFa to quickly get a sense of how it works. For a more thorough introduction, please read the RDFa Primer [RDFA-PRIMER].

In RDF ist es üblich, Vokabularbegriffe durch abgekürzte IRIs zu ersetzen, die ein 'Präfix' und einen 'Verweis' verwenden. Dieser Mechanismus wird im Abschnitt Compact URI Expressions detailliert beschrieben. Für alle Beispiele in diesem Dokument wird angenommen, dass die folgenden Vokabular-Präfixe definiert wurden:

In RDF, it is common for people to shorten vocabulary terms via abbreviated IRIs that use a 'prefix' and a 'reference'. This mechanism is explained in detail in the section titled Compact URI Expressions. The examples throughout this document assume that the following vocabulary prefixes have been defined:

bibo: http://purl.org/ontology/bibo/
cc: http://creativecommons.org/ns#
dbp: http://dbpedia.org/property/
dbp-owl: http://dbpedia.org/ontology/
dbr: http://dbpedia.org/resource/
dc: http://purl.org/dc/terms/
ex: http://example.org/
foaf: http://xmlns.com/foaf/0.1/
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfa: http://www.w3.org/ns/rdfa#
rdfs: http://www.w3.org/2000/01/rdf-schema#
xhv: http://www.w3.org/1999/xhtml/vocab#
xsd: http://www.w3.org/2001/XMLSchema#

Errata weist auf eine fehlende Zuweisung in der Tabelle oben hin:

owl: http://www.w3.org/2002/07/owl#

In einigen untenstehenden Beispielen haben wir IRIs mit Fragment-Identifiziern verwendet, die lokal im gleichen Dokument verweisen, das die gezeigten Fragment-Identifizierer enthält (zum Beispiel 'about="#me"'). Diese Ausdrucksweise, die auch in RDF/XML [RDF-SYNTAX-GRAMMAR] und anderen RDF-Serialisierungen verwendet wird, beschert einen einfachen Weg, neue IRIs für Entitäten, die von RDFa beschrieben werden, zu 'prägen' und trägt somit wesentlich zu einer starken Ausdrucksfähigkeit von RDFa bei. Die genaue Bedeutung von IRIs mit Fragment-Identifizierer, wenn sie im RDF-Graphen erscheinen, wird im Abschnitt 7 von [RDF-CONCEPTS] gegeben. Um sicherzustellen, dass solche Fragmentidentifizierer richtig interpretiert werden können, sollten Medientypregistrierungen für Bezeichnersprachen, die RDFa einbeziehen, direkt oder indirekt auf diese Spezifikation verweisen.

In some of the examples below we have used IRIs with fragment identifiers that are local to the document containing the RDFa fragment identifiers shown (e.g., 'about="#me"'). This idiom, which is also used in RDF/XML [RDF-SYNTAX-GRAMMAR] and other RDF serializations, gives a simple way to 'mint' new IRIs for entities described by RDFa and therefore contributes considerably to the expressive power of RDFa. The precise meaning of IRIs which include fragment identifiers when they appear in RDF graphs is given in Section 7 of [RDF-CONCEPTS]. To ensure that such fragment identifiers can be interpreted correctly, media type registrations for markup languages that incorporate RDFa should directly or indirectly reference this specification.

2.1 Die RDFa-Attribute

2.1 The RDFa Attributes

RDFa verwendet einige allgemein bekannte Attribute, beschreibt jedoch auch einige neue Attribute. Attribute, die bereits in weit verbreiteten Sprachen (wie HTML) existieren, behalten die gleiche Bedeutung wie zuvor, nur ihre Syntax wurde in einigen Fällen leicht verändert. Zum Beispiel gibt es in (X)HTML keinen eindeutigen Weg, neue @rel-Werte hinzuzufügen; RDFa nimmt sich genau dieses Problems an und löst es dadurch, dass IRIs als Werte gestattet werden. RDFa führt ebenso die Konzepte der Begriffe (terms) und der 'kompakten URI-Ausdrücke' ein — in diesem Dokument CURIEs genannt - die es gestatten, dass ein IRI-Wert kurz und bündig ausgedrückt werden kann. Die vollständige Liste der RDFa-Attributnamen und deren Syntax findet sich in Attribute und Syntax.

RDFa makes use of a number of commonly found attributes, as well as providing a few new ones. Attributes that already exist in widely deployed languages (e.g., HTML) have the same meaning they always did, although their syntax has been slightly modified in some cases. For example, in (X)HTML there is no clear way to add new @rel values; RDFa sets out to explicitly solve this problem, and does so by allowing IRIs as values. It also introduces the concepts of terms and 'compact URI expressions' — referred to as CURIEs in this document — which allow a full IRI value to be expressed succinctly. For a complete list of RDFa attribute names and syntax, see Attributes and Syntax.

2.2 Beispiele

2.2 Examples

In (X)HTML können Autoren Metadaten und Verwandtschaften, die das aktuelle Dokument betreffen, mit Hilfe der Elemente meta und link ausdrücken (in diesen Beispielen wird XHTML+RDFa [XHTML-RDFA] verwendet). Zum Beispiel kann über die Elemente link und meta ausgedrückt werden, wer der Autor einer Seite ist, und welche Seite der aktuellen Seite vorausgeht und welche ihr folgt:

In (X)HTML, authors can include metadata and relationships concerning the current document by using the meta and link elements (in these examples, XHTML+RDFa [XHTML-RDFA] is used). For example, the author of the page along with the pages preceding and following the current page can be expressed using the link and meta elements:

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Page 7</title>
    <meta name="author" content="Mark Birbeck" />
    <link rel="prev" href="page6.html" />
    <link rel="next" href="page8.html" />
  </head>
  <body>...</body>
</html>

RDFa verwendet dieses Konzept und erweitert es mit der Möglichkeit, andere Vokabulare durch die Angabe vollständiger IRIs zu verwenden:

RDFa makes use of this concept, enhancing it with the ability to make use of other vocabularies by using full IRIs:

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>My home-page</title>
    <meta property="http://purl.org/dc/terms/creator" content="Mark Birbeck" />
    <link rel="http://xmlns.com/foaf/0.1/topic" href="http://www.example.com/#us" />
  </head>
  <body>...</body>
</html>

Weil die Verwendung vollständiger IRIs umständlich sein kann, gestattet RDFa auch die Verwendung von kompakten URI-Ausdrücken. So kann ein Autor eine Abkürzung verwenden, um auf Begriffe aus mehreren Vokabularen zu verweisen:

Because using full IRIs like those above can be cumbersome, RDFa also permits the use of compact URI expressions so an author can use a shorthand to reference terms in multiple vocabularies:

<html
  xmlns="http://www.w3.org/1999/xhtml"
  prefix="foaf: http://xmlns.com/foaf/0.1/
          dc: http://purl.org/dc/terms/"
  >
  <head>
    <title>My home-page</title>
    <meta property="dc:creator" content="Mark Birbeck" />
    <link rel="foaf:topic" href="http://www.example.com/#us" />
  </head>
  <body>...</body>
</html>

RDFa unterstützt die Verwendung von @rel und @rev für jedes Element. Dies ist in Kombination mit der zusätzlichen Unterstützung für verschiedene Vokabulare noch praktischer:

RDFa supports the use of @rel and @rev on any element. This is even more useful with the addition of support for different vocabularies:

Dieses Dokument ist lizensiert unter der 
<a prefix="cc: http://creativecommons.org/ns#"
   rel="cc:license"
   href="http://creativecommons.org/licenses/by-nc-nd/3.0/"
   >Lizenz Creative Commons By-NC-ND</a>.

Im Dokument können nicht nur IRIs wiederverwendet werden, um Metadaten anzugeben, sondern auch eingebetteter Text in Verbindung mit dem Attribut @property:

Not only can IRIs in the document be re-used to provide metadata, but so can inline text when used with @property:

<html
  xmlns="http://www.w3.org/1999/xhtml"
  prefix="dc: http://purl.org/dc/terms/"
  >
  <head><title>Meine Homepage</title></head>
  <body>
    <h1 property="dc:title">Meine Homepage</h1>
    <p>Letzte Änderung: 16. September 2015</p>
  </body>
</html>

Unterscheidet sich der dargestellte Text vom wirklichen 'Wert', den er repräsentiert, dann kann ein genauerer Wert mit Hilfe des Attributs @content hinzugefügt werden. Mit dem Attribut @datatype kann der Typ eines Wertes klassifiziert werden:

If some displayed text is different from the actual 'value' it represents, a more precise value can be added using @content. A value can also optionally be typed using @datatype:

<html
  xmlns="http://www.w3.org/1999/xhtml"
  prefix="xsd: http://www.w3.org/2001/XMLSchema#
          dc: http://purl.org/dc/terms/"
  >
  <head><title>Meine Homepage</title></head>
  <body>
    <h1 property="dc:title">Meine Homepage</h1>
    <p>Last modified: <span property="dc:modified"
            content="2015-09-16T16:00:00-05:00"
            datatype="xsd:dateTime">16. September 2015</span>.</p>
  </body>
</html>

RDFa gestattet Meta-Informationen über andere Dokumente und Quellen im Dokument:

RDFa allows the document to contain metadata information about other documents and resources:

<html
  xmlns="http://www.w3.org/1999/xhtml"
  prefix="bibo: http://purl.org/ontology/bibo/
          dc: http://purl.org/dc/terms/"
  >
  <head>
    <title>Bücher von Marco Pierre White</title>
  </head>
  <body>
    Ich glaube, das Buch 
    '<span about="urn:ISBN:0091808189" 
           property="dc:title">Canteen Cuisine</span>'
    von White ist es wert, gelesen zu werden, denn auch wenn es ziemlich
    fortgeschrittene Sachen sind, hat er es so geschrieben, dass es einfach 
    zu verstehen ist. Vielleicht gefällt Ihnen auch 
    <span 
     about="urn:ISBN:1596913614" 
     property="dc:description"
     >White's Autobiographie</span>.
  </body>
</html>

In vielen Fällen wird ein Abschnitt eines Quelltextes mehrere Eigenschaften enthalten, die sich auf dasselbe Item beziehen. RDFa kann den Typ dieses Items mit dem Attribut @typeof anzeigen:

In many cases a block of markup will contain a number of properties that relate to the same item. It's possible with RDFa to indicate the type of that item using @typeof:

<html
  xmlns="http://www.w3.org/1999/xhtml"
  prefix="bibo: http://purl.org/ontology/bibo/
          dc: http://purl.org/dc/terms/"
  >
  <head>
    <title>Bücher von Marco Pierre White</title>
  </head>
  <body>
    Ich glaube, das Buch 
    '<span about="urn:ISBN:0091808189" typeof="bibo:Book"
           property="dc:title">Canteen Cuisine</span>'
    von White ist es wert, gelesen zu werden, denn auch wenn es ziemlich
    fortgeschrittene Sachen sind, hat er es so geschrieben, dass es einfach 
    zu verstehen ist. Vielleicht gefällt Ihnen auch
    <span 
     about="urn:ISBN:1596913614"
     typeof="bibo:Book"
     property="dc:description"
     >White's Autobiographie</span>.
  </body>
</html>

Wenn mit wenig Quelltext gearbeitet wird, ist es manchmal einfacher keine CURIES zu verwenden, sondern vollständige IRIs. Das vorherige Beispiel kann auch wie folgt geschrieben werden:

When dealing with small amounts of markup, it is sometimes easier to use full IRIs, rather than CURIEs. The previous example can also be written as follows:

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Bücher von Marco Pierre White</title>
  </head>
  <body>
    Ich glaube, das Buch 
    '<span
     about="urn:ISBN:0091808189"
     typeof="http://purl.org/ontology/bibo/Book"
     property="http://purl.org/dc/terms/title"
     >Canteen Cuisine</span>'
    von White ist es wert, gelesen zu werden, denn auch wenn es ziemlich
    fortgeschrittene Sachen sind, hat er es so geschrieben, dass es einfach 
    zu verstehen ist. Vielleicht gefällt Ihnen auch
    <span
     about="urn:ISBN:1596913614"
     typeof="http://purl.org/ontology/bibo/Book"
     property="http://purl.org/dc/terms/description"
     >White's Autobiographie</span>.
  </body>
</html>
<div vocab="http://xmlns.com/foaf/0.1/" about="#me">
   Mein Name ist <span property="name">John Doe</span> und mein Blog nennt sich
   <a rel="homepage" href="http://example.org/blog/">Understanding Semantics</a>.
</div>

Das Beispiel oben wird die folgenden Tripel erzeugen, in diesem Fall wird die Turtle-Syntax verwendet:

The example above will produce the following triples, expressed here in Turtle syntax:

@prefix foaf: <http://xmlns.com/foaf/0.1/> .
<#me> foaf:name "John Doe" ;
      foaf:homepage <http://example.org/blog/> .

In einfachen Fällen kann das Eigenschaftsattribut @property statt des Attributs @rel verwendet werden. Enthält das Element kein @rel, @datatype oder @content, aber zum Beispiel ein @href, dann ist die Auswirkung von @property in der Tat analog zur Auswirkung von @rel. Zum Beispiel hätte das vorherige Beispiel auch wie folgt geschrieben werden können:

In simple cases the @property property can also be used in place of @rel. Indeed, in case when the element does not contain @rel, @datatype, or @content, but there is, for example, a @href, the effect of @property is analogous to the role of @rel. For example, the previous example could have been written:

<div vocab="http://xmlns.com/foaf/0.1/" about="#me">
   Mein Name ist <span property="name">John Doe</span> und mein Blog nennt sich
   <a property="homepage" href="http://example.org/blog/">Understanding Semantics</a>.
</div>

3. RDF-Terminologie

3. RDF Terminology

Dieser Abschnitt ist nicht normativ.

This section is non-normative.

Der vorherige Abschnitt enthält typische Quelltextbeispiele, um die Struktur von RDFa-Quelltext zu verdeutlichen. RDFa ist eine Kurzform für "RDF in Attributen". Obwohl es sicherlich helfen würde, RDF zu verstehen, müssen Sie dies nicht, um ihren Quelltexten RDFa hinzuzufügen. Sollten Sie jedoch ein System aufbauen, das RDF-Ausgaben einer Sprache verarbeitet, die RDFa unterstützt, müssen Sie mit ziemlicher Sicherheit RDF verstehen. Dieser Abschnitt gibt einen Einblick in die Konzepte und in die Terminologie von RDF. Ausführlichere Erklärungen zu RDF befinden sich in den Dokumenten RDF Concepts [RDF-CONCEPTS] und RDF Syntax [RDF-SYNTAX].

The previous section gave examples of typical markup in order to illustrate the structure of RDFa markup. RDFa is short for "RDF in Attributes". In order to author RDFa you do not need to understand RDF, although it would certainly help. However, if you are building a system that consumes the RDF output of a language that supports RDFa you will almost certainly need to understand RDF. This section introduces the basic concepts and terminology of RDF. For a more thorough explanation of RDF, please refer to the RDF Concepts document [RDF-CONCEPTS] and the RDF Syntax Document [RDF-SYNTAX].

3.1 Aussagen

3.1 Statements

Die strukturierten Daten, auf die mit Hilfe von RDFa zugegriffen werden kann, sind eine Zusammenstellung von Aussagen. Eine Aussage ist eine grundlegende Informationseinheit, die in einem bestimmten Format erzeugt wurde, um die Verarbeitung zu vereinfachen. Wenn große Informationsblöcke in eine Zusammenstellung von Aussagen aufgespaltet werden, können selbst sehr komplizierte Metadaten mit einfachen Regeln verarbeitet werden.

The structured data that RDFa provides access to is a collection of statements. A statement is a basic unit of information that has been constructed in a specific format to make it easier to process. In turn, by breaking large sets of information down into a collection of statements, even very complex metadata can be processed using simple rules.

Zur Verdeutlichung nehmen wir an, dass wir die folgenden Fakten haben:

To illustrate, suppose we have the following set of facts:

Albert wurde am 14. März 1879 im Deutschen Kaiserreich geboren. Ein Bild von ihm befindet 
sich unter der Internetadresse http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg.
Albert was born on March 14, 1879, in the German Empire. There is a picture of him at
the web address, http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg.

Für eine Maschine wäre dies nicht einfach zu interpretieren, und es ist sicherlich kein Format, dass von einer Anwendung in eine andere übergeben werden kann. Konvertieren wir die Informationen jedoch in eine Zusammenstellung von Aussagen, ist der erste Schritt zur Vereinfachung der Verarbeitung getan. Die gleichen Informationen könnten in diesem Sinne durch die folgenden kürzeren 'Aussagen' repräsentiert werden:

This would be quite difficult for a machine to interpret, and it is certainly not in a format that could be passed from one data application to another. However, if we convert the information to a set of statements it begins to be more manageable. The same information could therefore be represented by the following shorter 'statements':

Albert wurde geboren am 14. März 1879.
Albert wurde geboren im Deutschen Kaiserreich.
Albert hat ein Bild unter
  http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg.
Albert was born on March 14, 1879.
Albert was born in the German Empire.
Albert has a picture at
  http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg.

3.2 Tripel

3.2 Triples

Um diese Informationen maschinenlesbar zu machen, definiert RDF eine Struktur für diese Aussagen. Eine Aussage wird formal Tripel (englisch: triple) genannt, das bedeutet, dass die Aussage aus drei Komponenten besteht. Die erste ist das Subjekt des Tripels, über dieses machen wir unsere Aussage. In all diesen Beispielen ist das Subjekt 'Albert'.

To make this information machine-processable, RDF defines a structure for these statements. A statement is formally called a triple, meaning that it is made up of three components. The first is the subject of the triple, and is what we are making our statements about. In all of these examples the subject is 'Albert'.

Der zweite Teil eines Tripels ist die Eigenschaft des Subjekts, die wir definieren möchten. In diesem Beispiel wären die Eigenschaften: 'wurde geboren am', 'wurde geboren im' und 'hat ein Bild unter'. Diese Eigenschaften werden in RDF gewöhnlich Prädikat genannt.

The second part of a triple is the property of the subject that we want to define. In the examples here, the properties would be 'was born on', 'was born in', and 'has a picture at'. These properties are typically called predicates in RDF.

Ein Kommentar wies darauf hin, dass der Begriff Prädikat verwirrend wirkt, auch wenn er richtig ist. Es wurde angeregt, dass wir den Begriff im gesamten Dokument in Eigenschaft (property) ändern. Die Arbeitsgruppe zieht diese Änderung in Betracht, glaubt aber, dass dies nur eine redaktionelle Änderung ist.

A commentor indicated that the use of the term predicate is confusing even though it is correct. They asked that we change the term to 'property' throughout the document. The working group is considering this change, but believes it to be completely editorial.

Der letzte Teil eines Tripels wird Objekt genannt. In diesen Beispielen haben die drei Objekte die Werte '14. März 1879', 'das Deutsche Kaiserreich' und 'http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg'.

The final part of a triple is called the object. In the examples here the three objects have the values 'March 14, 1879', 'the German Empire', and 'http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg'.

RDFa unterstützt alle internationalen Zeichen, einschließlich internationaler Zeichen für die Ortsangabe des Subjekts, der Eigenschaft und des Objekts.

RDFa has complete support for internationalized characters. This includes internationalized characters in the subject, property and object location.

3.3 IRI-Verweise

3.3 IRI References

Komplexe Informationen in einfach zu verarbeitende Einheiten zu zerstückeln, hilft uns, unsere Daten präzise zu formulieren. Dennoch gibt es immer noch Mehrdeutigkeiten. Über welchen Albert sprechen wir zum Beispiel? Wenn ein anderes System mehr Informationen über 'Albert' hat, wie können wir wissen, ob die Informationen über dieselbe Person sind, so dass wir die Informationen zu der Liste der Dinge hinzufügen, die wir über diese Person wissen? Wenn wir Menschen finden möchten, die im Deutschen Kaiserreich geboren wurden, wie können wir wissen, dass das Prädikat 'wurde geboren in' den gleichen Zweck erfüllt wie 'Geburtsort', das eventuell in einem anderen System verwendet wird? RDF löst dieses Problem, indem unsere ungenauen Begriffe durch IRI-Verweise ersetzt werden.

Breaking complex information into manageable units helps us be specific about our data, but there is still some ambiguity. For example, which 'Albert' are we talking about? If another system has more facts about 'Albert', how could we know whether they are about the same person, and so add them to the list of things we know about that person? If we wanted to find people born in the German Empire, how could we know that the predicate 'was born in' has the same purpose as the predicate 'birthplace' that might exist in some other system? RDF solves this problem by replacing our vague terms with IRI references.

IRIs werden im Allgemeinen verwendet, um Internetseiten zu identifizieren, RDF verwendet sie jedoch, um eindeutige Identifizierer für Konzepte anzugeben. Zum Beispiel könnten wir das Subjekt aller unserer Aussagen (der erste Teil eines jeden Tripels) durch den IRI der DBPedia [http://dbpedia.org] für Albert Einstein identifizieren, anstatt die mehrdeutige Zeichenkette 'Albert' zu verwenden:

IRIs are most commonly used to identify web pages, but RDF makes use of them as a way to provide unique identifiers for concepts. For example, we could identify the subject of all of our statements (the first part of each triple) by using the DBPedia [http://dbpedia.org] IRI for Albert Einstein, instead of the ambiguous string 'Albert':

<http://dbpedia.org/resource/Albert_Einstein>
   hat den Namen 
   Albert Einstein.
<http://dbpedia.org/resource/Albert_Einstein>
   wurde geboren am 
   14. März 1879.
<http://dbpedia.org/resource/Albert_Einstein>
   wurde geboren im 
   Deutschen Kaiserreich.
<http://dbpedia.org/resource/Albert_Einstein>
   hat ein Bild unter
   http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg.
<http://dbpedia.org/resource/Albert_Einstein>
   has the name 
   Albert Einstein.
<http://dbpedia.org/resource/Albert_Einstein>
   was born on 
   March 14, 1879.
<http://dbpedia.org/resource/Albert_Einstein>
   was born in 
   the German Empire.
<http://dbpedia.org/resource/Albert_Einstein>
   has a picture at
   http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg.

IRI-Verweise werden auch verwendet, um die Objekte in Metadatenaussagen eindeutig zu identifizieren (der dritte Teil eines jeden Tripels). Das Bild von Einstein ist schon ein IRI, wir könnten ebenso einen IRI verwenden, um das Land 'Deutsches Kaiserreich' eindeutig zu identifizieren. Zur gleichen Zeit geben wir an, dass der Name und das Geburtsdatum Literale sind (und keine IRIs), indem wir sie in Anführungszeichen stellen:

IRI references are also used to uniquely identify the objects in metadata statements (the third part of each triple). The picture of Einstein is already an IRI, but we could also use an IRI to uniquely identify the country 'German Empire'. At the same time we'll indicate that the name and date of birth really are literals (and not IRIs), by putting quotes around them:

<http://dbpedia.org/resource/Albert_Einstein> 
   hat den Namen
   "Albert Einstein".
<http://dbpedia.org/resource/Albert_Einstein> 
   wurde geboren am 
   "14. März 1879".
<http://dbpedia.org/resource/Albert_Einstein> 
   wurde geboren im  
   <http://dbpedia.org/resource/German_Empire>.
<http://dbpedia.org/resource/Albert_Einstein> 
   hat ein Bild unter
   <http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg>.
<http://dbpedia.org/resource/Albert_Einstein> 
   has the name 
   "Albert Einstein".
<http://dbpedia.org/resource/Albert_Einstein> 
   was born on 
   "March 14, 1879".
<http://dbpedia.org/resource/Albert_Einstein> 
   was born in 
   <http://dbpedia.org/resource/German_Empire>.
<http://dbpedia.org/resource/Albert_Einstein> 
   has a picture at
   <http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg>.

IRI-Verweise werden auch verwendet, um sicherzustellen, dass Prädikate eindeutig sind: nun können wir sicher sein, dass 'Geburtsort', 'Ort der Geburt', 'Lieu de naissance' und so weiter alle das Gleiche bedeuten:

IRI references are also used to ensure that predicates are unambiguous; now we can be sure that 'birthplace', 'place of birth', 'Lieu de naissance' and so on, all mean the same thing:

<http://dbpedia.org/resource/Albert_Einstein>
  <http://xmlns.com/foaf/0.1/name>
  "Albert Einstein".
<http://dbpedia.org/resource/Albert_Einstein>
  <http://dbpedia.org/property/dateOfBirth>
  "14. März 1879".
<http://dbpedia.org/resource/Albert_Einstein>
  <http://dbpedia.org/property/birthPlace>
  <http://dbpedia.org/resource/German_Empire>.
<http://dbpedia.org/resource/Albert_Einstein>
  <http://xmlns.com/foaf/0.1/depiction>
  <http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg>.
<http://dbpedia.org/resource/Albert_Einstein>
  <http://xmlns.com/foaf/0.1/name>
  "Albert Einstein".
<http://dbpedia.org/resource/Albert_Einstein>
  <http://dbpedia.org/property/dateOfBirth>
  "March 14, 1879".
<http://dbpedia.org/resource/Albert_Einstein>
  <http://dbpedia.org/property/birthPlace>
  <http://dbpedia.org/resource/German_Empire>.
<http://dbpedia.org/resource/Albert_Einstein>
  <http://xmlns.com/foaf/0.1/depiction>
  <http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg>.

3.4 Einfache Literale

3.4 Plain Literals

Auch wenn für Subjekte und Prädikate in jedem Fall IRI-Quellen verwendet werden, kann das Objekt des Tripels entweder ein IRI oder ein Literal sein. In den Beispiel-Tripeln wird Einsteins Name durch ein einfaches Literal repräsentiert, ausdrücklich eine einfache Zeichenkette ohne Typ- oder Sprachinformationen:

Although IRI resources are always used for subjects and predicates, the object part of a triple can be either an IRI or a literal. In the example triples, Einstein's name is represented by a plain literal, specifically a basic string with no type or language information:

<http://dbpedia.org/resource/Albert_Einstein>
  <http://xmlns.com/foaf/0.1/name> "Albert Einstein".

Einem einfachen Literal kann auch ein Sprach-Tag zugewiesen werden, um einfachem Text eine Sprache zuzuordnen. Zum Beispiel hat Einsteins Geburtsort im Englischen und im Deutschen verschiedene Namen:

A plain literal can also be given a language tag, to capture plain text in a natural language. For example, Einstein's birthplace has different names in English and German:

<http://dbpedia.org/resource/German_Empire>
  rdfs:label "German Empire"@en;
  rdfs:label "Deutsches Kaiserreich"@de .

3.5 Typisierte Literale

3.5 Typed Literals

Einige Literale, wie Datumsangaben und Nummern, habe bestimmte Bedeutungen. Dafür bietet RDF einen Mechanismus, der anzeigt, welchem Typ ein Literal angehört. Ein typisiertes Literal wird durch das Anhängen eines IRIs an das Ende eines einfachen Literals angezeigt, und dieser IRI zeigt den Datentyp des Literals an. Dieser IRI basiert normalerweise auf Datentypen, die in der Spezifikation XML Schema Datatypes [XMLSCHEMA11-2] definiert sind. Die folgende Syntax würde verwendet, um Einsteins Geburtsdatum eindeutig als Literal des Typs http://www.w3.org/2001/XMLSchema#date auszudrücken:

Some literals, such as dates and numbers, have very specific meanings, so RDF provides a mechanism for indicating the type of a literal. A typed literal is indicated by attaching an IRI to the end of a plain literal, and this IRI indicates the literal's datatype. This IRI is usually based on datatypes defined in the XML Schema Datatypes specification [XMLSCHEMA11-2]. The following syntax would be used to unambiguously express Einstein's date of birth as a literal of type http://www.w3.org/2001/XMLSchema#date:

<http://dbpedia.org/resource/Albert_Einstein>
  <http://dbpedia.org/property/dateOfBirth> 
     "1879-03-14"^^<http://www.w3.org/2001/XMLSchema#date>.

3.6 Turtle

3.6 Turtle

RDF selbst schreibt nicht vor, wie Tripel auszudrücken sind, da die beiden Schlüsselideen von RDF die Tripel und die Verwendung von IRIs sind und keine bestimmte Syntax. Es gibt jedoch mehrere Mechanismen, um Tripel zum Ausdruck zu bringen, wie RDF/XML [RDF-SYNTAX-GRAMMAR], Turtle [TURTLE] und natürlich RDFa. In vielen Erörterungen um RDF wird die Turtle-Syntax verwendet, um Ideen auszudrücken, da es ziemlich kompakt ist. Die oben gesehenen Beispiele verwenden diese Syntax bereits, und wir werden sie im gesamten Dokument verwenden, wenn wir über das RDF reden müssen, das aus irgendeinem RDFa werden könnte. Turtle gestattet die Abkürzung langer IRIs durch eine IRI-Abbildung (mapping), die verwendet werden kann, um kompakte IRI-Ausdrücke wie folgt auszudrücken:

RDF itself does not have one set way to express triples, since the key ideas of RDF are the triple and the use of IRIs, and not any particular syntax. However, there are a number of mechanisms for expressing triples, such as RDF/XML [RDF-SYNTAX-GRAMMAR], Turtle [TURTLE], and of course RDFa. Many discussions of RDF make use of the Turtle syntax to explain their ideas, since it is quite compact. The examples we have just seen are already using this syntax, and we'll continue to use it throughout this document when we need to talk about the RDF that could be generated from some RDFa. Turtle allows long IRIs to be abbreviated by using an IRI mapping, which can be used to express a compact IRI expression as follows:

@prefix dbp: <http://dbpedia.org/property/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
<http://dbpedia.org/resource/Albert_Einstein>
  foaf:name "Albert Einstein" .
<http://dbpedia.org/resource/Albert_Einstein>
  dbp:birthPlace <http://dbpedia.org/resource/German_Empire> .

Hier wurde 'dbp:' dem IRI für DBPedia zugeordnet und 'foaf:' dem IRI für das Vokabular 'Friend of a Friend'.

Jeder IRI in Turtle könnte auf diese Weise abgekürzt werden. Das bedeutet, dass wir die gleiche Technik ebenfalls für den Identifizierer von Albert Einstein, sowie für den Anzeiger des Datentyps hätten verwenden können:

Here 'dbp:' has been mapped to the IRI for DBPedia and 'foaf:' has been mapped to the IRI for the 'Friend of a Friend' vocabulary.

Any IRI in Turtle could be abbreviated in this way. This means that we could also have used the same technique to abbreviate the identifier for Einstein, as well as the datatype indicator:

@prefix dbp: <http://dbpedia.org/property/> .
@prefix dbr: <http://dbpedia.org/resource/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

dbr:Albert_Einstein
  foaf:name "Albert Einstein";
  dbp:birthPlace dbr:German_Empire;
  dbp:dateOfBirth "1879-03-14"^^xsd:date;
  foaf:depiction <http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg> .

dbr:German_Empire
  rdfs:label "German Empire"@en;
  rdfs:label "Deutsches Kaiserreich"@de .

In Beispielen werden Sie oft den folgenden IRI in der Turtle-Darstellung finden:

When writing examples, you will often see the following IRI in the Turtle representation:

<>

Dieser IRI gibt das 'aktuelle Dokument' an, zum Beispiel das Dokument, das gerade verarbeitet wird. In der Realität würde dort immer ein vollständiger IRI stehen, der vom Ort des Dokuments abhängt. Aber diese Abkürzung hilft, die Beispiele kompakter zu gestalten. Beachten Sie, die gesamte Technik der Abkürzung ist lediglich ein Weg, um Beispiele kompakter zu machen. Die wirklich erzeugten Tripel würden immer vollständige IRIs verwenden.

This indicates the 'current document', i.e., the document being processed. In reality there would always be a full IRI based on the document's location, but this abbreviation serves to make examples more compact. Note in particular that the whole technique of abbreviation is merely a way to make examples more compact, and the actual triples generated would always use the full IRIs.

3.7 Graphen

3.7 Graphs

Eine Tripel-Zusammenstellung wird Graph genannt. Alle in dieser Spezifikation definierten Tripel sind im Ausgabegraphen eines RDFa-Prozessors enthalten. Mehr Informationen zu Graphen und anderen RDF-Konzepten finden Sie in [RDF-CONCEPTS].

A collection of triples is called a graph. All of the triples that are defined by this specification are contained in the output graph by an RDFa Processor. For more information on graphs and other RDF concepts, see [RDF-CONCEPTS].

3.8 Kompakte URI-Ausdrücke

3.8 Compact URI Expressions

Um die kompakte Ausdrucksweise für RDF-Aussagen zu ermöglichen, gestattet RDFa die Verkürzung der meisten IRI-Verweise in eine Form, die 'kompakter URI-Ausdruck' (engl.: 'compact URI expression') heißt, oder CURIE. Eine detaillierte Erörterung zu diesem Mechanismus befindet sich im Abschnitt CURIE- und IRI-Verarbeitung.

In order to allow for the compact expression of RDF statements, RDFa allows the contraction of most IRI references into a form called a 'compact URI expression', or CURIE. A detailed discussion of this mechanism is in the section CURIE and IRI Processing.

Beachten Sie, dass CURIES nur im Quelltext und in Turtle-Beispielen verwendet werden. Sie werden niemals in den erzeugten Tripeln erscheinen, denn diese müssen nach RDF-Definition IRI-Verweise verwenden.

Note that CURIEs are only used in the markup and Turtle examples, and will never appear in the generated triples, which are defined by RDF to use IRI references.

3.9 Quelltextfragmente und RDFa

3.9 Markup Fragments and RDFa

Quelltextfragmente von einem Dokument in ein anderes zu übernehmen, ist eine immer häufiger auftretende Anwendung eingebetteter Metadaten. Dies kann durch die Verwendung von Tools geschehen, wie Drag-and-Drop in einem Internet-Browser oder durch Code-Schnipsel, die Autoren zur Verwendung in ihren Dokumenten zur Verfügung gestellt werden. Ein gutes Beispiel für Letzteres ist das Lizenzfragment, das von Creative Commons zur Verfügung gestellt wird.

A growing use of embedded metadata is to take fragments of markup and move them from one document to another. This may happen through the use of tools, such as drag-and-drop in a browser, or through snippets of code provided to authors for inclusion in their documents. A good example of the latter is the licensing fragment provided by Creative Commons.

Jedoch sollten diejenigen, die Fragmente erzeugen (entweder durch Entwicklung von Tools oder durch Schreiben von Code-Schnipseln), davon Kenntnis nehmen, dass diese Spezifikation nichts darüber aussagt, wie Fragmente verarbeitet werden. Insbesondere ist die Verarbeitung eines Fragments 'außerhalb' eines vollständigen Dokuments nicht definiert, weil die RDFa-Verarbeitung im Wesentlichen den Kontext betrifft. Zukünftige Versionen dieser oder verwandter Spezifikationen könnten dieses Verhalten genauer definieren.

However, those involved in creating fragments (either by building tools, or authoring snippets), should be aware that this specification does not say how fragments are processed. Specifically, the processing of a fragment 'outside' of a complete document is undefined because RDFa processing is largely about context. Future versions of this or related specifications may do more to define this behavior.

Entwickler von Tools, die Fragmente verarbeiten, oder Autoren, die Fragmente zur manuellen Einbettung erstellen, sollten im Hinterkopf behalten, was mit ihren Fragmenten passiert, wenn Sie in vollständige Dokumente eingefügt werden. Sie sollten sorgfältig über die Menge der 'Kontextinformationen' nachdenken, die notwendig sind, um sicherzustellen, dass ihre Fragmente richtig interpretiert werden.

Developers of tools that process fragments, or authors of fragments for manual inclusion, should also bear in mind what will happen to their fragment once it is included in a complete document. They should carefully consider the amount of 'context' information that will be needed in order to ensure a correct interpretation of their fragment.

3.10 Eine Beschreibung von RDFa mit Begriffen aus RDF

3.10 A Description of RDFa in RDF Terms

Das Folgende ist eine kurze Beschreibung von RDFa mit Begriffen aus der RDF-Terminologie, die hier vorgestellt wird. Es könnte für Leser mit einem RDF-Hintergrund nützlich sein:

The following is a brief description of RDFa in terms of the RDF terminology introduced. It may be useful to readers with an RDF background:

Ein RDF-Graph besteht aus Knoten, die durch Beziehungen verknüpft sind. Die Zielsetzung von RDFa ist, die Übertragung eines einzelnen RDF-Graphen in verschiedene Arten von Dokumentquelltext zu ermöglichen. Die grundlegende Einheit eines RDF-Graphen ist ein Tripel, in welchem ein Subjektknoten mit einem Objektknoten über ein Prädikat verknüpft ist. Der Subjektknoten ist immer entweder ein IRI-Verweis oder ein leerer Knoten (bnode), das Prädikat ist immer ein IRI-Verweis und das Objekt der Aussage kann ein IRI-Verweis, ein Literal oder ein bnode sein.

An RDF graph comprises nodes linked by relationships. The aim of RDFa is to allow a single RDF graph to be carried in various types of document markup. The basic unit of an RDF graph is a triple, in which a subject node is linked to an object node via a predicate. The subject node is always either a IRI reference or a blank node (or bnode), the predicate is always a IRI reference, and the object of a statement can be a IRI reference, a literal, or a bnode.

In RDFa wird der IRI-Verweis eines Subjekts im Allgemeinen mit @about angezeigt und Prädikate werden durch @property, @rel oder @rev angezeigt. IRI-Verweise von Objekten werden durch @resource, @src oder @href angezeigt, während Objekte, die als Literal eingebracht werden, entweder mit @content oder dem Inhalt des entsprechenden Elements angezeigt werden (mit einem optionalen Datentypen, der durch @datatype ausgedrückt wird, und einer optionalen Sprachangabe, die durch einen in der Wirtsprache definierten Mechanismus wie @xml:lang ausgedrückt werden kann).

In RDFa, a subject IRI reference is generally indicated using @about and predicates are represented using one of @property, @rel, or @rev. Objects which are IRI references are represented using @resource, @src, or @href, whilst objects that are literals are represented either with @content or the content of the element in question (with an optional datatype expressed using @datatype, and an optional language expressed using a Host Language-defined mechanism such as @xml:lang).

4. Konformität

4. Conformance

Genauso wie die als nicht normativ bezeichneten Bereiche, sind auch alle Autorenrichtlinien, Diagramme, Beispiele und Anmerkungen in dieser Spezifikation nicht normativ. Alles andere in dieser Spezifikation ist normativ.

As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.

Die Schlüsselworte muss, darf nicht/darf keine, erforderlich, sollte, sollte nicht, empfohlen, kann und optional in dieser Spezifikation sind zu interpretieren wie in [RFC2119] beschrieben.

The key words must, must not, required, should, should not, recommended, may, and optional in this specification are to be interpreted as described in [RFC2119].

4.1 RDFa-Prozessorkonformität

4.1 RDFa Processor Conformance

Diese Spezifikation verwendet den Begriff Ausgabegraph für alle Tripel, die aus einem Dokument nach den Regeln des Verarbeitungsmodells erstellt werden. Ein konformer RDFa-Prozessor muss einer 'konsumierenden' Anwendung einen einzigen RDF-Graphen zur Verfügung stellen, der alle möglichen Tripel enthält, die nach den Regeln im Bereich Verarbeitungsmodell erzeugt werden. Der Begriff Prozessorgraph wird verwendet, um alle Informations-, Warn- und Fehlertripel zu beschreiben, die vom RDFa-Prozessor erzeugt werden könnten, um über seinen Status zu berichten. Der Ausgabegraph und der Prozessorgraph sind eigenständige Graphen und dürfen nicht im gleichen Graphen untergebracht sein.

This specification uses the term output graph to mean all of the triples asserted by a document according to the Processing Model section. A conforming RDFa Processor must make available to a consuming application a single RDF graph containing all possible triples generated by using the rules in the Processing Model section. The term processor graph is used to denote the collection of all informational, warning, and error triples that may be generated by the RDFa Processor to report its status. The output graph and the processor graph are separate graphs and must not be stored in the same graph by the RDFa Processor.

Ein konformer RDFa-Prozessor könnte zusätzliche Tripel verfügbar machen, die nach Regeln erzeugt wurden, die hier nicht beschrieben sind, aber diese Tripel dürfen nicht im Ausgabegraph verfügbar gemacht werden. (Ob diese zusätzlichen Tripel in einem oder mehreren zusätzlichen RDF-Graphen verfügbar gemacht werden, hängt von der Implementierung ab und ist infolgedessen hier nicht definiert.)

A conforming RDFa Processor may make available additional triples that have been generated using rules not described here, but these triples must not be made available in the output graph. (Whether these additional triples are made available in one or more additional RDF graphs is implementation-specific, and therefore not defined here.)

Ein konformer RDFa-Prozessor muss Leerzeichen sowohl in einfachen Literalen als auch in XML-Literalen beibehalten. Jedoch kann der Fall eintreten, dass die Architektur, in der ein Prozessor arbeitet, Änderungen an den Leerzeichen in einem Dokument vorgenommen hat, bevor dieses Dokument überhaupt den RDFa-Prozessor erreicht (zum Beispiel ist es [XMLSCHEMA11-1]-Prozessoren gestattet, Leerzeichen in Attributwerten zu 'normalisieren' - siehe Abschnitt 3.1.4). Um eine maximale Konsistenz zwischen Verarbeitungsumgebungen sicherzustellen, sollten Autoren alle unnötigen Leerzeichen aus dem Inhalt entfernen, der aus einfachen Literalen und XML-Literalen besteht.

A conforming RDFa Processor must preserve white space in both plain literals and XML literals. However, it may be the case that the architecture in which a processor operates has made changes to the white space in a document before that document ever reaches the RDFa Processor (e.g., [XMLSCHEMA11-1] processors are permitted to 'normalize' white space in attribute values - see section 3.1.4). To ensure maximum consistency between processing environments, authors should remove any unnecessary white space in their plain and XML Literal content.

Ein konformer RDFa-Prozessor muss den Medientypen des zu verarbeitenden Dokuments untersuchen, um die Wirtsprache des Dokuments zu bestimmen. Ist der RDFa-Prozessor nicht in der Lage den Medientypen zu bestimmen, oder unterstützt er den Medientypen nicht, dann muss der RFDa-Prozessor das Dokument so verarbeiten als wäre der Medientyp application/xml. Siehe XML+RDFa-Dokumentkonformität. Eine Wirtsprache kann zusätzliche Mechanismen für Meldungen angeben.

A conforming RDFa Processor must examine the media type of a document it is processing to determine the document's Host Language. If the RDFa Processor is unable to determine the media type, or does not support the media type, the RDFa Processor must process the document as if it were media type application/xml. See XML+RDFa Document Conformance. A Host Language may specify additional announcement mechanisms.

Falls der Medientyp nicht verfügbar ist, könnte ein konformer RDFa-Prozessor zusätzliche Mechanismen verwenden (zum Beispiel DOCTYPE, eine Dateiendung, das Wurzelelement, einen übergeordneten benutzerdefinierten Parameter), um zu versuchen, die Wirtsprache zu bestimmen. Diese Mechanismen sind nicht spezifiziert.

A conforming RDFa Processor may use additional mechanisms (e.g., the DOCTYPE, a file extension, the root element, an overriding user-defined parameter) to attempt to determine the Host Language if the media type is unavailable. These mechanisms are unspecified.

4.2 RDFa-Wirtsprachenkonformität

4.2 RDFa Host Language Conformance

Wirtsprachen, die RDFa integrieren, müssen sich an folgende Regeln halten:

Host Languages that incorporate RDFa must adhere to the following:

  • All of the facilities required in this specification must be included in the Host Language.
  • The required attributes defined in this specification must be included in the content model of the Host Language.
    For the avoidance of doubt, there is no requirement that attributes such as @href and @src are used in a conforming Host Language. Nor is there any requirement that all required attributes are incorporated into the content model of all elements. The working group recommends that Host Language designers ensure that the required attributes are incorporated into the content model of elements that are commonly used througout the Host Language.
  • If the Host Language uses XML Namespaces [XML-NAMES], the attributes in this specification should be defined in 'no namespace'. (e.g., when the attributes are used on elements in the Host Language's namespace, they can be used with no qualifying prefix: <myml:myElement property="license">). When a Host Language does not use the attributes in 'no namespace', they must be referenced via the XHTML Namespace (http://www.w3.org/1999/xhtml).
  • If the Host Language has its own definition for any attribute defined in this specification, that definition must be such that the processing required by this specification remains possible when the attribute is used in a way consistent with the requirements herein.
  • The Host Language may specify an initial context (e.g., IRI mappings and/or a definition of terms or a default vocabulary IRI). Such an initial context should be defined using the conventions defined in RDFa Initial Contexts.

4.3 XML+RDFa-Dokumentkonformität

4.3 XML+RDFa Document Conformance

Diese Spezifikation definiert keinen selbstständigen Dokumenttyp. Die hier beschriebenen Attribute sind zur Integration in andere Wirtsprachen bestimmt (zum Beispiel HTML+RDFa oder XHTML+RDFa). Sie definiert jedoch allgemeine Verarbeitungsregeln für Dokumente der XML-Familie - eben jene Dokumente, die mit dem Medientypen text/xml oder application/xml ausgeliefert werden. Solche Dokumente müssen alle folgenden Kriterien erfüllen:

This specification does not define a stand-alone document type. The attributes herein are intended to be integrated into other host languages (e.g., HTML+RDFa or XHTML+RDFa). However, this specification does define processing rules for generic XML documents - that is, those documents delivered as media types text/xml or application/xml. Such documents must meet all of the following criteria:

  1. Das Dokument muss wohlgeformt sein wie in [XML10-4e] definiert.
  2. Das Dokument sollte die in dieser Spezifikation definierten Attribute 'ohne Namensraum' verwenden. (Wenn die Attribute zum Beispiel in Elementen verwendet werden, werden sie ohne qualifizierendes Präfix verwendet: <myml:myElement property="license">.)

    Es ist möglich, dass eine XML-Grammatik eigene Attribute hat, die mit Attributen dieser Spezifikation in Konflikt treten. Dies könnte bedeuten, dass der RDFa-Prozessor unerwartete Tripel erzeugt.

  1. The document must be well-formed as defined in [XML10-4e].
  2. The document should use the attributes defined in this specification in 'no namespace'. (e.g., when the attributes are used on elements they are used with no qualifying prefix: <myml:myElement property="license">).

    It is possible that an XML grammar will have native attributes that conflict with attributes in this specification. This could result in an RDFa processor generating unexpected triples.

Wenn ein RDFa-Prozessor ein XML+RDFa-Dokument verarbeitet, dann geschieht dies über den folgenden Anfangskontext:

When an RDFa Processor processes an XML+RDFa document, it does so via the following initial context:

  1. Es gibt voreingestellte Begriffe (zum Beispiel describedby, license und role), definiert in http://www.w3.org/2011/rdfa-context/rdfa-1.1.
  2. Es gibt voreingestellte Präfix-Abbildungen (zum Beispiel dc), definiert in http://www.w3.org/2011/rdfa-context/rdfa-1.1.
  3. Es gibt keinen IRI für ein voreingestelltes Vokabular.
  4. base kann mit dem Attribut @xml:base festgelegt werden wie es in [XML10-4e] definiert ist.
  5. Die aktuelle Sprache kann mit dem Attribut @xml:lang festgelegt werden.
  1. There are default terms (e.g., describedby, license, and role), defined in http://www.w3.org/2011/rdfa-context/rdfa-1.1.
  2. There are default prefix mappings (e.g., dc), defined in http://www.w3.org/2011/rdfa-context/rdfa-1.1.
  3. There is no default vocabulary IRI.
  4. The base can be set using the @xml:base attribute as defined in [XML10-4e].
  5. The current language can be set using @xml:lang attribute.

5. Attribute und Syntax

5. Attributes and Syntax

Diese Spezifikation definiert mehrere Attribute und die Weise, in welcher die Werte jener Attribute zu interpretieren sind, wenn RDF-Tripel erzeugt werden. Dieser Abschnitt definiert die Attribute und die Syntax ihrer Werte.

This specification defines a number of attributes and the way in which the values of those attributes are to be interpreted when generating RDF triples. This section defines the attributes and the syntax of their values.

about
ein SafeCURIEorCURIEorIRI, der verwendet wird, um auszusagen, über was die Daten sind (ein 'Subjekt' in RDF-Terminologie);
content
eine CDATA-Zeichenkette, um maschinenlesbaren Inhalt für ein Literal zur Verfügung zu stellen (ein 'Literal-Objekt' in RDF-Terminologie);
datatype
ein TERMorCURIEorAbsIRI, der einen Datentyp repräsentiert, um den Datentyp eines Literals auszudrücken;
href (optional)
ein traditionell verfolgbarer IRI, um die Partnerquelle einer Beziehung auszudrücken (ein 'Quellenobjekt' in RDF-Terminologie);
inlist
ein Attribut, das angibt, dass das Objekt, das mit dem Attribut rel oder property verknüpft ist, der Liste für das Prädikat hinzugefügt werden muss. Der Wert dieses Attributs muss ignoriert werden. Die Gegenwart dieses Attributs bewirkt die Erzeugung einer Liste, wenn sie nicht schon vorhanden ist.
prefix
eine durch Leerzeichen getrennte Liste mit Paaren von Präfix-Namen und IRIs in der Form
NCName ':' ' '+ xsd:anyURI
property
eine durch Leerzeichen getrennte Liste von TERMorCURIEorAbsIRIs, die verwendet wird, um die Beziehung zwischen einem Subjekt und entweder einem Quellenobjekt, sofern gegeben, oder irgendeinem Literal auszudrücken (auch 'Prädikate' genannt);
rel
eine durch Leerzeichen getrennte Liste von TERMorCURIEorAbsIRIs, die verwendet wird, um Beziehungen zwischen zwei Quellen auszudrücken ('Prädikate in RDF-Terminologie);
resource
ein SafeCURIEorCURIEorIRI, um die Partner-Quelle einer Beziehung auszudrücken, die nicht weiter verfolgbar sein soll (zum Beispiel kein 'klickbarer' Verweis) (auch 'Objekt' genannt);
rev
eine durch Leerzeichen getrennte Liste mit TERMorCURIEorAbsIRIs, die verwendet wird, um umgekehrte Beziehungen zwischen zwei Quellen auszudrücken, (auch 'Prädikate' genannt);
src (optional)
ein IRI, um die Partner-Quelle einer Beziehung auszudrücken, wenn die Quelle eingebettet ist (auch ein 'Quellenobjekt');
typeof
eine durch Leerzeichen getrennte Liste von TERMorCURIEorAbsIRIs, welche den/die RDF-Typ(en) anzeigen, mit welche(m/n) das Subjekt zu verknüpfen ist;
vocab
ein IRI, der die Abbildung (mapping) definiert, die verwendet wird, wenn in einem Attributwert auf einen Begriff (TERM) verwiesen wird. Siehe Allgemeine Verwendung von Begriffen in Attributen und den Abschnitt über Vokabularerweitung.
about
a SafeCURIEorCURIEorIRI, used for stating what the data is about (a 'subject' in RDF terminology);
content
a CDATA string, for supplying machine-readable content for a literal (a 'literal object', in RDF terminology);
datatype
a TERMorCURIEorAbsIRI representing a datatype, to express the datatype of a literal;
href (optional)
a traditionally navigable IRI for expressing the partner resource of a relationship (a 'resource object', in RDF terminology);
inlist
An attribute used to indicate that the object associated with a rel or property attribute on the same element is to be added to the list for that predicate. The value of this attribute must be ignored. Presence of this attribute causes a list to be created if it does not already exist.
prefix
a white space separated list of prefix-name IRI pairs of the form
NCName ':' ' '+ xsd:anyURI
property
a white space separated list of TERMorCURIEorAbsIRIs, used for expressing relationships between a subject and either a resource object if given or some literal text (also a 'predicate');
rel
a white space separated list of TERMorCURIEorAbsIRIs, used for expressing relationships between two resources ('predicates' in RDF terminology);
resource
a SafeCURIEorCURIEorIRI for expressing the partner resource of a relationship that is not intended to be navigable (e.g., a 'clickable' link) (also an 'object');
rev
a white space separated list of TERMorCURIEorAbsIRIs, used for expressing reverse relationships between two resources (also 'predicates');
src (optional)
an IRI for expressing the partner resource of a relationship when the resource is embedded (also a 'resource object');
typeof
a white space separated list of TERMorCURIEorAbsIRIs that indicate the RDF type(s) to associate with a subject;
vocab
A IRI that defines the mapping to use when a TERM is referenced in an attribute value. See General Use of Terms in Attributes and the section on Vocabulary Expansion.

In allen Fällen ist es möglich, diese Attribute ohne Wert zu verwenden (zum Beispiel @datatype="") oder mit einem Wert, der nach der Auswertung der Regeln für CURIE- und IRI-Verarbeitung zu keinem Wert führt (zum Beispiel @datatype="[noprefix:foobar]").

In all cases it is possible for these attributes to be used with no value (e.g., @datatype="") or with a value that evaluates to no value after evaluation using the rules for CURIE and IRI Processing (e.g., @datatype="[noprefix:foobar]").

5.1 Aufgabe von Attributen

5.1 Roles of attributes

Die RDFa-Attribute übernehmen verschiedene Aufgaben in Dokumenten mit zahlreichen semantischen Inhalten. Kurz gesagt sind die Aufgaben:

The RDFa attributes play different roles in a semantically rich document. Briefly, those roles are:

5.2 Leerzeichen in Attributwerten

5.2 White space within attribute values

Viele Attribute akzeptieren eine durch Leerzeichen getrennte Liste mit Werten. Diese Spezifikation definiert Leerzeichen als:

Many attributes accept a white space separated list of tokens. This specification defines white space as:

whitespace      ::=  (#x20 | #x9 | #xD | #xA)+ 

Akzeptieren Attribute eine durch Leerzeichen getrennte Liste mit Werten, dann muss ein RDFa-Prozessor alle führenden oder angehängten Leerzeichen ignorieren.

When attributes accept a white space separated list of tokens, an RDFa Processor must ignore any leading or trailing white space.

Diese Definition ist im Einklang mit der Definition in [XML10].

This definition is consistent with the definition found in [XML10].

6. Syntax-Definition für CURIEs

6. CURIE Syntax Definition

Die Arbeitsgruppe untersucht aktuell die Definition für CURIE unten in Bezug auf Kommentare, die kürzlich von der Arbeitsgruppe RDF und den Mitgliedern der Arbeitsgruppe RDF Web Application eingetroffen sind. Es ist möglich, dass es in Zukunft geringfügige Änderungen zu den Definitionsregeln unten geben wird und dass diese Änderungen nicht rückwärtskompatibel sein werden. Jedoch wird diese Unkompatibilität auf Härtefälle beschränkt sein.

The working group is currently examining the productions for CURIE below in light of recent comments received from the RDF Working Group and members of the RDF Web Applications Working Group. It is possible that there will be minor changes to the production rules below in the near future, and that these changes will be backward incompatible. However, any such incompatibility will be limited to edge cases.

Die Schlüsselkomponente von RDF ist der IRI, aber diese sind normalerweise lang und unhandlich. RDFa unterstützt deshalb einen Mechanismus mit dem IRIs abgekürzt werden können, sogenannte 'kompakte URI-Ausdrücke' oder einfach CURIEs (Abkürzung aus dem Englischen von 'Compact URI Expressions').

The key component of RDF is the IRI, but these are usually long and unwieldy. RDFa therefore supports a mechanism by which IRIs can be abbreviated, called 'compact URI expressions' or simply, CURIEs.

Wenn (ein CURIE) zum IRI aufgelöst wird, muss der erzeugte IRI ein syntaktisch gültiger IRI sein [RFC3987]. Eine detailliertere Beschreibung ist im Abschnitt CURIE- und IRI-Verarbeitung zu finden. Der lexikalische Raum eines CURIEs ist unten in curie definiert. Der Werteraum ist eine Zusammenstellung von IRIs.

When expanded, the resulting IRI must be a syntactically valid IRI [RFC3987]. For a more detailed explanation see CURIE and IRI Processing. The lexical space of a CURIE is as defined in curie below. The value space is the set of IRIs.

Ein CURIE besteht aus zwei Komponenten, aus einem Präfix und einem Verweis. Das Präfix wird vom Verweis durch einen Doppelpunkt (:) getrennt. Im Allgemeinen ist es möglich, das Präfix wegzulassen und so einen CURIE zu erzeugen, der die 'voreingestellte Präfixabbildung' verwendet; in RDFa ist die 'voreingestellte Präfixabbildung' http://www.w3.org/1999/xhtml/vocab#. Es ist auch möglich, sowohl das Präfix als auch den Doppelpunkt wegzulassen, und so einen CURIE zu erzeugen, der nur einen Verweis enthält, der die Abbildung 'ohne Präfix' verwendet. Diese Spezifikation definiert keine Abbildung 'ohne Präfix'. RDFa-Wirtsprachen dürfen keine Abbildungen 'ohne Präfix' definieren.

A CURIE is comprised of two components, a prefix and a reference. The prefix is separated from the reference by a colon (:). In general use it is possible to omit the prefix, and so create a CURIE that makes use of the 'default prefix' mapping; in RDFa the 'default prefix' mapping is http://www.w3.org/1999/xhtml/vocab#. It's also possible to omit both the prefix and the colon, and so create a CURIE that contains just a reference which makes use of the 'no prefix' mapping. This specification does not define a 'no prefix' mapping. RDFa Host Languages must not define a 'no prefix' mapping.

Das 'voreingestellte Präfix' von RDFa sollte nicht mit dem 'voreingestellten Namensraum' verwechselt werden, der in [XML-NAMES] beschrieben ist. Ein RDFa-Prozessor darf die Deklaration eines 'voreingestellten Namensraums' nach XML-NAMES nicht so verwenden, als wäre sie das 'voreingestellte Präfix'.

The RDFa 'default prefix' should not be confused with the 'default namespace' as defined in [XML-NAMES]. An RDFa Processor must not treat an XML-NAMES 'default namespace' declaration as if it were setting the 'default prefix'.

Die allgemeine Syntax eines CURIEs kann wie folgt zusammengefasst werden:

The general syntax of a CURIE can be summarized as follows:

prefix      ::=   NCName

reference   ::=   ( ipath-absolute / ipath-rootless / ipath-empty ) 
                     [ "?" iquery ] [ "#" ifragment ] (wie in [RFC3987] definiert)

curie       ::=   [ [ prefix ] ':' ] reference

safe_curie  ::=   '[' [ [ prefix ] ':' ] reference ']'
prefix      ::=   NCName

reference   ::=   ( ipath-absolute / ipath-rootless / ipath-empty ) 
                     [ "?" iquery ] [ "#" ifragment ] (as defined in [RFC3987])

curie       ::=   [ [ prefix ] ':' ] reference

safe_curie  ::=   '[' [ [ prefix ] ':' ] reference ']'

Das Produkt safe_curie ist nicht erforderlich, auch nicht in Situationen, in denen es einem Attributwert gestattet ist, ein CURIE oder ein IRI zu sein: Ein IRI, der ein Schema verwendet, das nicht im Bereich der Abbildung ist, darf nicht mit einem CURIE verwechselt werden. Das Konzept eines safe_curie ist für die Rückwärtskompatibilität vorbehalten.

The production safe_curie is not required, even in situations where an attribute value is permitted to be a CURIE or an IRI: An IRI that uses a scheme that is not an in-scope mapping cannot be confused with a CURIE. The concept of a safe_curie is retained for backward compatibility.

Es ist möglich eine CURIE-Präfixabbildung so zu definieren, dass es ein definiertes IRI-Schema überschreibt. Zum Beispiel könnte ein Dokument das Präfix 'mailto' auf 'http://www.example.com/addresses/' abbilden. Dann könnte ein Attribut @resource, das 'mailto:user@example.com' enthält, ein Tripel mit dem Objekt 'http://www.example.com/addresses/user@example.com' erzeugen. Vielmehr noch ist es möglich, wenn auch nicht wahrscheinlich, dass in Zukunft Schemas eingeführt werden, die mit Präfixabbildungen kollidieren, die in einem Dokument definiert sind (zum Beispiel das neu vorgeschlagene 'widget'-Schema [WIDGETS-URI]). In keinem Fall würde dieses RDFa, das mit der darunter liegenden Schicht kollidiert, die Weise verändern, in der Konsumenten des IRIs diesen IRI behandeln. Es könnte jedoch dazu führen, dass die vom Dokumentautor beabsichtigte Darstellung des CURIEs von einem anderen Konsumenten fälschlich als IRI interpretiert wird. Die Arbeitsgruppe glaubt, dass dieses Risiko als minimal einzustufen ist.

It is possible to define a CURIE prefix mapping in such a way that it would overshadow a defined IRI scheme. For example, a document could map the prefix 'mailto' to 'http://www.example.com/addresses/'. Then a @resource that contained 'mailto:user@example.com' might create a triple with the object 'http://www.example.com/addresses/user@example.com'. Moreover, it is possible though unlikely, that schemes will be introduced in the future that will conflict with prefix mappings defined in a document (e.g., the newly proposed 'widget' scheme [WIDGETS-URI]). In neither case would this RDFa overshadowing of the underlying scheme alter the way other consumers of the IRI treat that IRI. It could, however, mean that the document author's intended use of the CURIE is mis-interpreted by another consumer as an IRI. The working group considers this risk to be minimal.

In normalen CURIE-Evaluierungen müssten die folgenden Inhaltsinformationen zur Verfügung gestellt werden:

In normal evaluation of CURIEs the following context information would need to be provided:

In RDFa sind diese Werte wie folgt definiert:

In RDFa these values are defined as follows:

Ein CURIE ist eine Repräsentation eines vollständigen IRIs. Die Regeln zur Bestimmung des IRIs sind:

A CURIE is a representation of a full IRI. The rules for determining that IRI are:

Beachten Sie Allgemeine Verwendung von Begriffen in Attributen, um einen Hinweis zu erhalten, wie RDFa-Prozessoren Items ohne Doppelpunkt, die bestimmten Datentypen angehören, interpretieren könnten.

See General Use of Terms in Attributes for the way items with no colon can be interpreted in some datatypes by RDFa Processors.

6.1 Warum CURIEs und nicht QNames?

6.1 Why CURIEs and not QNames?

Dieser Abschnitt ist nicht normativ.

This section is non-normative.

In vielen Fällen haben Sprachdesigner versucht, QNames für einen Erweiterungsmechanismus zu verwenden [XMLSCHEMA11-2]. QNames gestatten eine unabhängige Verwaltung der Namenszusammenstellung, und können die Namen auf einer Quelle abbilden. Leider sind QNames in den meisten Fällen ungeeignet, weil erstens die Verwendung von QName als Identifizierer in Attributwerten und Elementinhalten problematisch ist (näher beschrieben in [QNAMES]) und zweitens die Syntax von QNames zu eingeschränkt ist und demzufolge nicht alle möglichen IRIs ausgedrückt werden können.

In many cases, language designers have attempted to use QNames for an extension mechanism [XMLSCHEMA11-2]. QNames do permit independent management of the name collection, and can map the names to a resource. Unfortunately, QNames are unsuitable in most cases because 1) the use of QName as identifiers in attribute values and element content is problematic as discussed in [QNAMES] and 2) the syntax of QNames is overly restrictive and does not allow all possible IRIs to be expressed.

Ein typisches Beispiel für das Problem, das so aufgeworfen wird, ist der Versuch der Definition einer Namenszusammenstellung für Bücher. In einem QName muss der Teil hinter dem Doppelpunkt ein gültiger Elementname sein. Ein Beispiel wie das folgende ist somit nicht gültig: isbn:0321154991

A specific example of the problem this causes comes from attempting to define the name collection for books. In a QName, the part after the colon must be a valid element name, making an example such as the following invalid: isbn:0321154991

Dies ist einfach deshalb kein gültiger QName, weil "0321154991" kein gültiger Elementname ist. In dem gegebenen Beispiel möchten wir jedoch sowieso keinen gültigen Elementnamen definieren. Der einzige Grund, einen QName zu verwenden, war, auf einen Eintrag in einem geschlossenen Geltungsbereich zu verweisen - dem der ISBNs. Weiterhin möchten wir in diesem Beispiel die Namen im Geltungsbereich auf einen IRI abbilden, der die Bedeutung der ISBN offenbart. Wie Sie sehen können, stehen die Definition von QNames und dieser (relativ alltägliche) Anwendungsfall im Konflikt miteinander.

This is not a valid QName simply because "0321154991" is not a valid element name. Yet, in the example given, we don't really want to define a valid element name anyway. The whole reason for using a QName was to reference an item in a private scope - that of ISBNs. Moreover, in this example, we want the names within that scope to map to an IRI that will reveal the meaning of that ISBN. As you can see, the definition of QNames and this (relatively common) use case are in conflict with one another.

Diese Spezifikation geht dieses Problem an, indem Sie CURIEs definiert. Syntaktisch sind CURIEs eine Obermenge von QNames.

This specification addresses the problem by defining CURIEs. Syntactically, CURIEs are a superset of QNames.

Beachten Sie, dass diese Spezifikation an Sprachdesigner gerichtet ist, nicht an Dokumentautoren. Jeder Sprachdesigner, der in Erwägung zieht, QNames zu verwenden, um IRIs oder eindeutige Token zu repräsentieren, sollte stattdessen CURIEs in Erwägung ziehen:

Note that this specification is targeted at language designers, not document authors. Any language designer considering the use of QNames as a way to represent IRIs or unique tokens should consider instead using CURIEs:

  • CURIEs are designed from the ground up to be used in attribute values. QNames are designed for unambiguously naming elements and attributes.
  • CURIEs expand to IRIs, and any IRI can be represented by such an expansion. QNames are treated as value pairs, but even if those pairs are combined into a string, only a subset of IRIs can be represented.
  • CURIEs can be used in non-XML grammars, and can even be used in XML languages that do not support XML Namespaces. QNames are limited to XML Namespace-aware XML Applications.

7. Verarbeitungsmodell

7. Processing Model

Dieser Abschnitt betrachtet allgemeine Verarbeitungsregeln, um eine Zusammenstellung von Tripeln zu erzeugen, die die strukturierten Daten in einem RDFa-Dokument repräsentieren. Die Verarbeitung muss nicht nach der hier beschriebene Technik des DOM Traversal geschehen, dennoch muss das Ergebnis einer anderen Art der Verarbeitung das gleiche sein, als wäre die hier beschriebene Verarbeitung angewendet worden. Das Verarbeitungsmodell wird mit Hilfe der Idee des DOM Traversal erklärt, um die Erläuterungen einfacher zu gestalten (insbesondere in Bezug auf den Evaluierungskontext).

This section looks at a generic set of processing rules for creating a set of triples that represent the structured data present in an RDFa document. Processing need not follow the DOM traversal technique outlined here, although the effect of following some other manner of processing must be the same as if the processing outlined here were followed. The processing model is explained using the idea of DOM traversal which makes it easier to describe (particularly in relation to the evaluation context).

Beachten Sie, dass in diesem Abschnitt Erklärungen zum Verarbeitungsmodell oder Ratschläge für Entwickler in Bereichen wie diesem eingeschlossen sind.
Note that in this section, explanations about the processing model or guidance to implementors are enclosed in sections like this.

7.1 Übersicht

7.1 Overview

Die Evaluierung eines Dokuments zur Bestimmung von RDFa-Tripeln beginnt beim Dokumentobjekt und folgt dann jedem Kindelement in Dokumentreihenfolge unter Anwendung der Verarbeitungsregeln. Die Verarbeitung ist rekursiv, der Prozessor folgt jedem Kindelement und wiederum jedem eigenen Kindelement des Kindelements unter Anwendung der gleichen Verarbeitungsregeln.

Evaluating a document for RDFa triples is carried out by starting at the document object, and then visiting each of its child elements in turn, in document order, applying processing rules. Processing is recursive in that for each child element the processor also visits each of its child elements, and applies the same processing rules.

In einigen Umgebungen wird es nur einen geringen Unterschied machen, ob beim Wurzelelement des Dokuments oder beim Dokumentobjekt selbst begonnen wird. Es wurde in dieser Weise definiert, weil in einigen Umgebungen wichtige Informationen auf der Ebene des Dokumentobjekts vorhanden sind, jedoch nicht im Wurzelelement.

In some environments there will be little difference between starting at the root element of the document, and starting at the document object itself. It is defined this way because in some environments important information is present at the document object level which is not present on the root element.

Mit fortschreitender Verarbeitung werden Regeln angewandt, die Tripel erzeugen könnten und auch die Informationen des Evaluierungskontextes verändern könnten. Die veränderten Informationen des Evaluierungskontextes könnten im weiteren Verlauf verwendet werden, wenn Elemente niedrigerer Ebenen verarbeitet werden.

As processing continues, rules are applied which may generate triples, and may also change the evaluation context information that will then be used when processing descendant elements.

Diese Spezifikation sagt nichts darüber aus, was mit den erzeugten Tripeln geschehen sollte, oder ob mehr Tripel während der Verarbeitung erzeugt werden könnten als hier umschrieben sind. Jedoch muss sich ein konformer RDFa-Prozessor so verhalten, als ob mindestens die in diesem Abschnitt beschriebenen Regeln eingehalten werden - ein einziger RDF-Graph muss erzeugt werden. Wie im Abschnitt RDFa-Prozessorkonformität beschrieben, darf kein zusätzlicher Tripel im Ausgabegraph erscheinen. Sie könnten einen Platz im Prozessorgraph erhalten.

This specification does not say anything about what should happen to the triples generated, or whether more triples might be generated during processing than are outlined here. However, to be conforming, an RDFa Processor must act as if at a minimum the rules in this section are applied, and a single RDF graph produced. As described in the RDFa Processor Conformance section, any additional triples generated must not appear in the output graph. They may be included in the processor graph.

7.2 Evaluierungskontext

7.2 Evaluation Context

Während der Verarbeitung wird jede Regel mit Informationen aus einem Evaluierungskontext angewendet. Ein Anfangskontext wird erzeugt, wenn die Verarbeitung beginnt. Der Kontext besteht aus folgenden Komponenten:

During processing, each rule is applied using information provided by an evaluation context. An initial context is created when processing begins. That context has the following members:

  • The base. This will usually be the IRI of the document being processed, but it could be some other IRI, set by some other mechanism, such as the (X)HTML base element. The important thing is that it establishes an IRI against which relative paths can be resolved.
  • The parent subject. The initial value will be the same as the initial value of base, but it will usually change during the course of processing.
  • The parent object. In some situations the object of a statement becomes the subject of any nested statements, and this member is used to convey this value. Note that this value may be a bnode, since in some situations a number of nested statements are grouped together on one bnode. This means that the bnode must be set in the containing statement and passed down.
  • A list of current, in-scope IRI mappings.
  • A list of incomplete triples. A triple can be incomplete when no object resource is provided alongside a predicate that requires a resource (i.e., @rel or @rev). The triples can be completed when a resource becomes available, which will be when the next subject is specified (part of the process called chaining).
  • A list mapping that associates IRIs with lists.
  • The language. Note that there is no default language.
  • The term mappings, a list of terms and their associated IRIs. This specification does not define an initial list. Host Languages may define an initial list.
  • The default vocabulary, a value to use as the prefix IRI when an undefined term is used. This specification does not define an initial setting for the default vocabulary. Host Languages may define an initial setting.

Während der Verarbeitung werden neue Evaluierungskontexte erzeugt, die an jedes Kindelement weitergegeben werden. Die Anfangsregeln unten werden die Werte der Items im Kontext bestimmen. Dann werden die Hauptregeln dafür sorgen, dass neue Tripel durch die Kombination aus den Informationen eines Elements mit den Informationen des Evaluierungskontextes erzeugt werden.

During the course of processing, new evaluation contexts are created which are passed to each child element. The initial rules described below will determine the values of the items in the context. Then the core rules will cause new triples to be created by combining information provided by an element with information from the evaluation context.

Während der Verarbeitung werden einige lokal gültige Werte benötigt, diese sind:

During the course of processing a number of locally scoped values are needed, as follows:

  • An initially empty list of IRI mappings, called the local list of IRI mappings.
  • An initially empty list of incomplete triples, called the local list of incomplete triples.
  • An initially empty language value.
  • A skip element flag, which indicates whether the current element can safely be ignored since it has no relevant RDFa attributes. Note that descendant elements will still be processed.
  • A new subject value, which once calculated will set the parent subject property in an evaluation context, as well as being used to complete any incomplete triples, as described in the next section.
  • A value for the current property value, the literal to use when creating triples that have a literal object, or IRI-s in the absence of @rel or @rev.
  • A value for the current object resource, the resource to use when creating triples that have a resource object.
  • A value for the typed resource, the source for creating rdf:type relationships to types specified in @typeof.
  • The local term mappings, a list of terms and their associated IRIs.
  • The local list mapping, mapping IRIs to lists
  • A local default vocabulary, an IRI to use as a prefix mapping when a term is used.

7.3 Verkettung

7.3 Chaining

Aussagenverkettung ist eine RDFa-Eigenschaft, die dem Autor gestattet, RDF-Aussagen zu verknüpfen, ohne unnötigen, wiederholten Quelltext verwenden zu müssen. Muss ein Autor zum Beispiel Aussagen als Kinder eines Objekts, das eine Quelle ist, hinzufügen, dann sollten diese Aussagen so interpretiert werden, als seien sie über diese Quelle:

Statement chaining is an RDFa feature that allows the author to link RDF statements together while avoiding unnecessary repetitive markup. For example, if an author were to add statements as children of an object that was a resource, these statements should be interpreted as being about that resource:

<div about="http://dbpedia.org/resource/Albert_Einstein">
  <span property="foaf:name">Albert Einstein</span>
  <span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
  <div rel="dbp:birthPlace" resource="http://dbpedia.org/resource/German_Empire">
    <span property="dbp:conventionalLongName">the German Empire</span>
  </div>
</div>
<div about="http://dbpedia.org/resource/Albert_Einstein">
  <span property="foaf:name">Albert Einstein</span>
  <span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
  <div rel="dbp:birthPlace" resource="http://dbpedia.org/resource/German_Empire">
    <span property="dbp:conventionalLongName">the German Empire</span>
  </div>
</div>

In diesem Beispiel können wir sehen, dass eine Objektquelle ('German_Empire') das Subjekt für eine verschachtelte Aussage geworden ist. Dieser Quelltext verdeutlicht auch das grundlegende Verkettungsmuster 'A hat ein B hat ein C' (zum Beispiel: Einstein hat einen Geburtsort (namens) German Empire, welches den langen Namen "the German Empire" hat).

In this example we can see that an object resource ('German_Empire'), has become the subject for nested statements. This markup also illustrates the basic chaining pattern of 'A has a B has a C' (i.e., Einstein has a birth place of the German Empire, which has a long name of "the German Empire").

Es ist dem Subjekt einer verschachtelten Aussage ebenfalls möglich, das Objekt für enthaltende Aussagen zu stellen - im Grunde genommen die Umkehrung des Beispiels, das wir gerade gesehen haben. Um es zu verdeutlichen, nehmen wir ein Beispiel der gerade beschriebenen Art der Verkettung, und zeigen wie es effizienter ausgezeichnet werden könnte. Als Erstes beschreiben wir die Tatsache, dass Albert Einstein, zu einer bestimmten Zeit seines Lebens, seinen Wohnsitz sowohl im German Empire, als auch in Switzerland hatte:

It's also possible for the subject of nested statements to provide the object for containing statements — essentially the reverse of the example we have just seen. To illustrate, we'll take an example of the type of chaining just described, and show how it could be marked up more efficiently. To start, we mark up the fact that Albert Einstein had, at some point in his life, a residence both in the German Empire and in Switzerland:

<div about="http://dbpedia.org/resource/Albert_Einstein">
  <div rel="dbp-owl:residence" resource="http://dbpedia.org/resource/German_Empire"></div>
  <div rel="dbp-owl:residence" resource="http://dbpedia.org/resource/Switzerland"></div>
</div>
<div about="http://dbpedia.org/resource/Albert_Einstein">
  <div rel="dbp-owl:residence" resource="http://dbpedia.org/resource/German_Empire"></div>
  <div rel="dbp-owl:residence" resource="http://dbpedia.org/resource/Switzerland"></div>
</div>

Jetzt zeigen wir die gleiche Information, aber dieses Mal erzeugen wir ein unvollständiges Tripel vom Wohnsitzteil und verwenden dann eine beliebige Anzahl weiterer Subjekte, um diesen Tripel wie folgt zu vervollständigen:

Now, we show the same information, but this time we create an incomplete triple from the residence part, and then use any number of further subjects to 'complete' that triple, as follows:

<div about="http://dbpedia.org/resource/Albert_Einstein" rel="dbp-owl:residence">
  <span about="http://dbpedia.org/resource/German_Empire"></span>
  <span about="http://dbpedia.org/resource/Switzerland"></span>
</div>
<div about="http://dbpedia.org/resource/Albert_Einstein" rel="dbp-owl:residence">
  <span about="http://dbpedia.org/resource/German_Empire"></span>
  <span about="http://dbpedia.org/resource/Switzerland"></span>
</div>

In diesem Beispiel wird das unvollständige Tripel gleich zweimal vervollständigt, einmal für German Empire und einmal für Switzerland. Dies gibt uns exakt die gleichen Informationen wie im Beispiel zuvor:

In this example, the incomplete triple actually gets completed twice, once for the German Empire and once for Switzerland, giving exactly the same information as we had in the earlier example:

<http://dbpedia.org/resource/Albert_Einstein>
  dbp-owl:residence <http://dbpedia.org/resource/German_Empire> .
<http://dbpedia.org/resource/Albert_Einstein>
  dbp-owl:residence <http://dbpedia.org/resource/Switzerland> .
<http://dbpedia.org/resource/Albert_Einstein>
  dbp-owl:residence <http://dbpedia.org/resource/German_Empire> .
<http://dbpedia.org/resource/Albert_Einstein>
  dbp-owl:residence <http://dbpedia.org/resource/Switzerland> .

Verkettung kann manchmal Elemente mit einbeziehen, die relativ wenig Quelltext enthalten, die zum Beispiel nur eine Quelle oder ein Prädikat zeigen. Hier wird das Element img verwendet, um das Bild von Einstein darzustellen:

Chaining can sometimes involve elements containing relatively minimal markup, for example showing only one resource, or only one predicate. Here the img element is used to carry a picture of Einstein:

<div about="http://dbpedia.org/resource/Albert_Einstein">
  <div rel="foaf:depiction">
    <img src="http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg" />
  </div>
</div>
<div about="http://dbpedia.org/resource/Albert_Einstein">
  <div rel="foaf:depiction">
    <img src="http://en.wikipedia.org/wiki/Image:Albert_Einstein_Head.jpg" />
  </div>
</div>

Wenn so wenig Quelltext verwendet wird, könnte jedes der Attribute, die sich auf die Quelle beziehen, als Subjekt oder Objekt in der Verkettung auftreten:

When such minimal markup is used, any of the resource-related attributes could act as a subject or an object in the chaining:

<div about="http://dbpedia.org/resource/Albert_Einstein">
  <div rel="dbp-owl:residence">
    <span about="http://dbpedia.org/resource/German_Empire"></span>
    <span about="http://dbpedia.org/resource/Switzerland"></span>
  </div>
</div>

Beachten Sie, wie oben angesprochen, sind die Attribute @property und @rel in vielen Situationen austauschbar. Dies ist nicht zutreffend für die Verkettung. Nehmen wir das erste Beispiel, und verändern es wie folgt:

Note that, as noted above, in many situations the @property and @rel are interchangeable. This is not true for chaining. Taking the first example, if that example was used as follows:

<div about="http://dbpedia.org/resource/Albert_Einstein">
  <span property="foaf:name">Albert Einstein</span>
  <span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
  <div property="dbp:birthPlace" resource="http://dbpedia.org/resource/German_Empire">
    <span property="dbp:conventionalLongName">the German Empire</span>
  </div>
</div>
<div about="http://dbpedia.org/resource/Albert_Einstein">
  <span property="foaf:name">Albert Einstein</span>
  <span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
  <div property="dbp:birthPlace" resource="http://dbpedia.org/resource/German_Empire">
    <span property="dbp:conventionalLongName">the German Empire</span>
  </div>
</div>

Das Subjekt für 'German Empire' würde Albert Einstein bleiben (und das wäre natürlich ein Fehler). Das ist der Hauptunterschied zwischen @property und @rel: das letztere Attribut führt eine Verkettung herbei, das erstere normalerweise nicht.

Die Erklärung im englischen Original ist nicht präzise. Albert Einstein würde Subjekt für "the German Empire" bleiben, welches der lange Namen für http://dbpedia.org/resource/German_Empire ist. Das Objekt 'the German Empire' befindet sich im Element span mit dem Attribut property="dbp:conventionalLongName". Der englische Text könnte falsch verstanden werden, da weiter oben im Dokument mit der Zeichenkette "German Empire" der IRI für das Deutsche Kaiserreich http://dbpedia.org/resource/German_Empire in Verbindung gebracht wurde. Zur Richtigstellung muss nur das Apostroph verschoben werden, richtig würde der Satz im Abschnitt oben lauten:
Das Subjekt für 'the German Empire' würde Albert Einstein bleiben ... .
Dieser Fehler ist den Editoren bekannt und wird in der nächsten Revision der Spezifikation behoben werden.

The subject for the 'German Empire' would remain Albert Einstein (and that would, of course, be an error). This is the main difference between @property and @rel: the latter induces chaining, whereas the former, usually, does not.

7.4 CURIE- und IRI-Verarbeitung

7.4 CURIE and IRI Processing

Da RDFa letztendlich ein Weg ist, um RDF zu transportieren, ist die Quelle und deren Manifestierung als IRI ein Schlüsselkonzept. RDF arbeitet mit vollständigen IRIs (nicht mit relativen Pfaden); wenn RDFa in Tripel verwandelt wird, muss jeder relative IRI mit dem in Abschnitt 6.5 von RFC 3987 [RFC3987] beschriebenen Algorithmus, Reference Resolution, gegen den Basis-IRI aufgelöst werden. Die Werte von RDFa-Attributen, die sich auf IRIs beziehen, verwenden drei verschiedene Datentypen: IRI, SafeCURIEorCURIEorIRI oder TERMorCURIEorAbsIRI. Jedes dieser Attribute wird nach der Verarbeitung auf IRIs abgebildet. Die Verwendung dieser Attribute geschieht wie folgt:

Since RDFa is ultimately a means for transporting RDF, a key concept is the resource and its manifestation as an IRI. RDF deals with complete IRIs (not relative paths); when converting RDFa to triples, any relative IRIs must be resolved relative to the base IRI, using the algorithm defined in section 6.5 of RFC 3987 [RFC3987], Reference Resolution. The values of RDFa attributes that refer to IRIs use three different datatypes: IRI, SafeCURIEorCURIEorIRI, or TERMorCURIEorAbsIRI. All these attributes are mapped, after processing, to IRIs. The handling of these attributes is as follows:

IRI
Der Inhalt ist ein IRI und wird auch so verwendet.
SafeCURIEorCURIEorIRI
  • Ist der Wert von eckigen Klammern umgeben, dann wird der Inhalt zwischen den Klammern nach der Syntaxdefinition für CURIE evaluiert. Ist er kein gültiger CURIE, dann muss der Wert ignoriert werden.
  • Ansonsten wird der Wert als CURIE evaluiert. Ist er ein gültiger CURIE, wird der daraus abgeleitete IRI verwendet; ansonsten wird der Wert als IRI verarbeitet.

Als Folge daraus wird der Wert eines Attributs, wenn er eine leere Zeichenkette ist (zum Beispiel @about=""), als IRI aufgelöst. Ein IRI "" ist ein relativer IRI, der so interpretiert wird als wäre er gleich der Basis. Mit anderen Worten wird der Wert "" normalerweise als IRI des aktuellen Dokuments aufgelöst.

Eine weitere Folge ist, dass der Wert nicht zu einen IRI aufgelöst wird, und somit ignoriert wird, wenn der Wert eines Attributs dieses Datentyps ein leerer SafeCURIE (zum Beispiel @about="[]") ist.

TERMorCURIEorAbsIRI
  • Ist der Wert ein Begriff, dann wird er als Begriff nach Allgemeine Verwendung von Begriffen in Attributen evaluiert. Beachten Sie, dass dieser Schritt dazu führen kann, dass der Wert ignoriert werden muss.
  • Ist der Wert ein gültiger CURIE, dann wird der resultierende IRI verwendet.
  • Ist der Wert ein absoluter IRI, wird dieser Wert verwendet.
  • Ansonsten wird der Wert ignoriert.
IRI
The content is an IRI, and is used as such.
SafeCURIEorCURIEorIRI
  • When the value is surrounded by square brackets, then the content within the brackets is evaluated as a CURIE according to the CURIE Syntax Definition. If it is not a valid CURIE, the value must be ignored.
  • Otherwise, the value is evaluated as a CURIE. If it is a valid CURIE, the resulting IRI is used; otherwise, the value is processed as an IRI.

A consequence of this is that when the value of an attribute of this datatype is the empty string (e.g., @about=""), that value resolves to an IRI. An IRI of "" is a relative IRI that is interpreted as being the same as the base. In other words, a value of "" will usually resolve to the IRI of the current document.

A related consequence of this is that when the value of an attribute of this datatype is an empty SafeCURIE (e.g., @about="[]"), that value does not result in an IRI and therefore the value is ignored.

TERMorCURIEorAbsIRI
  • If the value is a term then it is evaluated as a term according to General Use of Terms in Attributes. Note that this step may mean that the value is to be ignored.
  • If the value is a valid CURIE, then the resulting IRI is used.
  • If the value is an absolute IRI, that value is used.
  • Otherwise, the value is ignored.

Beachten Sie, dass es möglich ist, dass alle Werte in einem Attribut ignoriert werden. Wenn das geschieht, muss das Attribut so behandelt werden, als wäre es leer.

Note that it is possible for all values in an attribute to be ignored. When that happens, the attribute must be treated as if it were empty.

Zum Beispiel ist der vollständige IRI für Albert Einstein in DBPedia:

For example, the full IRI for Albert Einstein on DBPedia is:

http://dbpedia.org/resource/Albert_Einstein
http://dbpedia.org/resource/Albert_Einstein

Dies kann von Autoren abgekürzt werden, um die Informationen einfacher zu verwalten; mit einem CURIE. Der erste Schritt für den Autor ist, eine Präfixabbildung zu erzeugen, die ein Präfix mit einem Anfangssegment dieses IRIs verknüpft. In RDFa werden diese Abbildungen mit @prefix ausgedrückt:

This can be shortened by authors to make the information easier to manage, using a CURIE. The first step is for the author to create a prefix mapping that links a prefix to some leading segment of the IRI. In RDFa these mappings are expressed using @prefix:

<div prefix="db: http://dbpedia.org/">
  ...
</div>
<div prefix="db: http://dbpedia.org/">
  ...
</div>

Wenn das Präfix festgelegt worden ist, kann ein Autor es verwenden, um einen IRI wie folgt abzukürzen:

Once the prefix has been established, an author can then use it to shorten an IRI as follows:

<div prefix="db: http://dbpedia.org/">
  <div about="db:resource/Albert_Einstein">
    ...
  </div>
</div>
<div prefix="db: http://dbpedia.org/">
  <div about="db:resource/Albert_Einstein">
    ...
  </div>
</div>

Dem Autor ist freigestellt, den IRI an einer beliebigen Stelle zu trennen. Da jedoch die allgemeine Verwendung von CURIEs darauf zielt, Begriffsbibliotheken und Werte zur Verfügung zu stellen, wird das Präfix normalerweise auf einem gebräuchlichen Segment abgebildet, das den höchsten Wiederverwendungswert hat. Dieses Segment wird oft von denen angeboten, die diese Begriffsbibliothek verwalten. Da DBPedia zum Beispiel eine gewaltige Quellenliste hat, ist es effizienter, eine Präfixabbildung zu erzeugen, die den Ausgangsort der Quellen verwendet:

The author is free to split the IRI at any point. However, since a common use of CURIEs is to make available libraries of terms and values, the prefix will usually be mapped to some common segment that provides the most re-use, often provided by those who manage the library of terms. For example, since DBPedia contains an enormous list of resources, it is more efficient to create a prefix mapping that uses the base location of the resources:

<div prefix="dbr: http://dbpedia.org/resource/">
  <div about="dbr:Albert_Einstein">
    ...
  </div>
  <div about="dbr:Baruch_Spinoza">
    ...
  </div>
</div>
<div prefix="dbr: http://dbpedia.org/resource/">
  <div about="dbr:Albert_Einstein">
    ...
  </div>
  <div about="dbr:Baruch_Spinoza">
    ...
  </div>
</div>
Beachten Sie, dass es im Allgemeinen keine gute Idee ist, relative Pfade in Präfixdeklarationen zu verwenden. Weil es möglich ist, dass ein Autor diese Richtlinie ignorieren könnte, ist es weiterhin möglich, dass der IRI, der aus einem CURIE hervorgeht, relativ ist. Da jedoch alle IRIs relativ zur Basis aufgelöst werden müssen, bevor sie zur Erzeugung von Tripeln verwendet werden, sollte die Verwendung von relativen Pfaden keinen Einfluss auf die Verarbeitung haben.
Note that it is generally considered a bad idea to use relative paths in prefix declarations. Since it is possible that an author may ignore this guidance, it is further possible that the IRI obtained from a CURIE is relative. However, since all IRIs must be resolved relative to base before being used to create triples, the use of relative paths should not have any effect on processing.

7.4.1 Geltungsbereich von Präfixabbildungen

7.4.1 Scoping of Prefix Mappings

Präfixabbildungen für CURIEs werden im aktuellen Element und dessen Nachfahren definiert. Die nächstliegende Abbildung für ein gegebenes Präfix hat Vorrang. Zum Beispiel sind die beiden folgenden CURIEs unterschiedlich, obwohl sie das gleiche Präfix besitzen, weil die Präfixabbildungen lokal gültig sind:

CURIE prefix mappings are defined on the current element and its descendants. The inner-most mapping for a given prefix takes precedence. For example, the IRIs expressed by the following two CURIEs are different, despite the common prefix, because the prefix mappings are locally scoped:

<div prefix="dbr: http://dbpedia.org/resource/">
  <div about="dbr:Albert_Einstein">
    ...
  </div>
</div>
<div prefix="dbr: http://someotherdb.org/resource/">
  <div about="dbr:Albert_Einstein">
    ...
  </div>
</div>
<div prefix="dbr: http://dbpedia.org/resource/">
  <div about="dbr:Albert_Einstein">
    ...
  </div>
</div>
<div prefix="dbr: http://someotherdb.org/resource/">
  <div about="dbr:Albert_Einstein">
    ...
  </div>
</div>

Es ist im Allgemeinen keine gute Idee, Präfixe innerhalb eines Dokuments wiederholt neu zu definieren. Insbesondere könnte die Abbildung von Präfixen auf verschiede Werte an unterschiedlichen Stellen im Dokument zu Verwirrung führen, auch wenn dies erlaubt ist. Die Arbeitsgruppe empfiehlt, dass Autoren ein Präfix im gesamten Dokument nur für die Abbildung auf ein und dasselbe Vokabular verwenden. Viele Vokabulare besitzen empfohlene Präfixnamen. Die Arbeitsgruppe empfiehlt, diese Namen möglichst immer zu nutzen.

In general it is a bad practice to redefine prefix mappings within a document. In particular, while it is permitted, mapping a prefix to different values at different places within a document could lead to confusion. The working group recommends that document authors use the same prefix to map to the same vocabulary throughout a document. Many vocabularies have recommended prefix names. The working group recommends that these names are used whenever possible.

7.4.2 Allgemeine Verwendung von CURIEs in Attributen

7.4.2 General Use of CURIEs in Attributes

Es gibt mehrere Möglichkeiten, wie Attribute CURIEs einsetzen können und sie müssen unterschiedlich behandelt werden:

There are a number of ways that attributes make use of CURIEs, and they need to be dealt with differently. These are:

  1. Ein Attribut kann einen oder mehrere Werte beinhalten, die eine Mischung aus Begriffen, CURIEs und absoluten IRIs sind.
  2. Ein Attribut kann einen oder mehrere Werte beinhalten, die eine Mischung aus CURIEs und IRIs sind. In diesem Fall wird jeder Wert, der kein CURIE ist, als IRI verarbeitet; beschrieben im Abschnitt Syntaxdefinition für CURIE.
  3. Ist der Wert in eckigen Klammern eingeschlossen, dann wird der Inhalt in den Klammern immer nach den Reglen aus dem Abschnitt Syntaxdefinition für CURIE evaluiert - und ist der Inhalt kein CURIE, dann muss der Inhalt ignoriert werden.
  1. An attribute may allow one or more values that are a mixture of TERMs, CURIEs, and absolute IRIs.
  2. An attribute may allow one or more values that are a mixture of CURIEs and IRIs. In this case any value that is not a CURIE, as outlined in section CURIE Syntax Definition, will be processed as an IRI.
  3. If the value is surrounded by square brackets, then the content within the brackets is always evaluated according to the rules in CURIE Syntax Definition - and if that content is not a CURIE, then the content must be ignored.

Ein leerer Attributwert (zum Beispiel typeof='') ist nach wie vor ein CURIE und wird als solcher verarbeitet. Die Regeln für diese Verarbeitung sind in Verarbeitungsablauf definiert. Ein leerer Attributwert wird jedoch von dieser Spezifikation ausdrücklich niemals als ein relativer IRI behandelt.

An empty attribute value (e.g., typeof='') is still a CURIE, and is processed as such. The rules for this processing are defined in Sequence. Specifically, however, an empty attribute value is never treated as a relative IRI by this specification.

Ein Beispiel eines Attributs, das einen CURIEorIRI enthalten kann, ist @about. Um einen IRI direkt auszudrücken, kann ein Autor dieses tun:

An example of an attribute that can contain a CURIEorIRI is @about. To express an IRI directly, an author might do this:

<div about="http://dbpedia.org/resource/Albert_Einstein">
  ...
</div>
<div about="http://dbpedia.org/resource/Albert_Einstein">
  ...
</div>

Um den IRI oben als CURIE auszudrücken, würde der Autor dieses tun:

whilst to express the IRI above as a CURIE they would do this:

<div about="dbr:Albert_Einstein">
  ...
</div>
<div about="dbr:Albert_Einstein">
  ...
</div>

Der Autor könnte auch einen sicheren CURIE wie folgt verwenden:

The author could also use a safe CURIE, as follows:

<div about="[dbr:Albert_Einstein]">
  ...
</div>
<div about="[dbr:Albert_Einstein]">
  ...
</div>

Da Werte, die kein CURIE sind, ignoriert werden müssen, würde der folgende Wert in @about kein neues Subjekt festlegen, da @about die Verwendung von Begriffen nicht gestattet, und der CURIE kein Präfix-Trennzeichen hat.

Since non-CURIE values must be ignored, the following value in @about would not set a new subject, since @about does not permit the use of TERMs, and the CURIE has no prefix separator.

<div about="[Albert_Einstein]">
  ...
</div>
<div about="[Albert_Einstein]">
  ...
</div>

Jedoch würde dieser Quelltext ein Subjekt festlegen, weil es zwar kein gültiger CURIE ist, aber ein gültiger relativer IRI:

However, this markup would set a subject, since it is not a CURIE, but a valid relative IRI:

<div about="Albert_Einstein">
  ...
</div>
<div about="Albert_Einstein">
  ...
</div>

Beachten Sie, dass viele RDFa-Attribute auch Begriffe als Wert akzeptieren. Dies wird im nächsten Abschnitt besprochen.

Note that several RDFa attributes are able to also take TERMS as their value. This is discussed in the next section.

7.4.3 Allgemeine Verwendung von Begriffen in Attributen

7.4.3 General Use of Terms in Attributes

Einige RDFa-Attribute unterliegen einem Datentypen, der die Verknüpfung mit einem Begriff gestattet. RDFa definiert die Syntax eines Begriffs als:

Some RDFa attributes have a datatype that permits a term to be referenced. RDFa defines the syntax of a term as:

term     ::=  NCNameStartChar termChar*
termChar ::=  ( NameChar - ':' ) | '/'
term     ::=  NCNameStartChar termChar*
termChar ::=  ( NameChar - ':' ) | '/'

Zur Vermeidung von Unklarheiten: Diese Definition sagt aus, dass ein 'Begriff' in RDFa ein XML NCName ist, der auch einen Schrägstrich beinhalten darf, sofern dieses Zeichen nicht am Anfang steht.

For the avoidance of doubt, this definition means a 'term' in RDFa is an XML NCName that also permits slash as a non-leading character.

Wenn ein RDFa-Attribut die Verwendung eines Begriffs gestattet und der evaluierte Wert der oben genannten Definition für term entspricht, wird er mit Hilfe der folgenden Logik in einen IRI umgewandelt:

When an RDFa attribute permits the use of a term, and the value being evaluated matches the production for term above, it is transformed to an IRI using the following logic:

  • Gibt es ein lokales voreingestelltes Vokabular, wird der IRI durch Verkettung jenes Wertes mit term erzeugt.
  • Ansonsten prüfe, ob term einem Eintrag in der Liste der lokalen Begriffsabbildungen entspricht. Vergleiche zuerst mit der Liste unter Beachtung der Groß- und Kleinschreibung. Gibt es keinen Treffer, vergleiche ohne Beachtung der Groß- und Kleinschreibung. Gibt es einen Treffer, verwende den verknüpften IRI.
  • Ansonsten hat term keinen verknüpften IRI und muss ignoriert werden.
  • If there is a local default vocabulary the IRI is obtained by concatenating that value and the term.
  • Otherwise, check if the term matches an item in the list of local term mappings. First compare against the list case-sensitively, and if there is no match then compare case-insensitively. If there is a match, use the associated IRI.
  • Otherwise, the term has no associated IRI and must be ignored.

Ein lokales voreingestelltes Vokabular kann von der Wirtsprache als Teil des Anfangskontextes definiert werden, und kann im aktuellen Element oder seinen Kindern mit @vocab überschrieben werden.

A local default vocabulary can be defined by the Host Language as part of the initial context, and can be overridden on the current element and its children using @vocab.

7.4.4 Verwendung von CURIEs in bestimmten Attributen

7.4.4 Use of CURIEs in Specific Attributes

Die allgemeinen Regeln aus dem vorherigen Abschnitt gelten für die RDFa-Attribute in folgender Weise:

The general rules discussed in the previous sections apply to the RDFa attributes in the following ways:

Jeder Wert, der einem definierten Begriff entspricht, muss mit einem Verweis zu dem entsprechenden IRI erweitert werden. Zum Beispiel in dem folgenden Beispiel:

Any value that matches a defined term must be expanded into a reference to the corresponding IRI. For example in the following examples:

<link rel="license" href="http://example.org/license.html" />
<link rel="xhv:license" href="http://example.org/license.html" />
<link rel="license" href="http://example.org/license.html" />
<link rel="xhv:license" href="http://example.org/license.html" />

würde jeweils das folgende Tripel bilden:

would each generate the following triple:

<> <http://www.w3.org/1999/xhtml/vocab#license> <http://example.org/license.html> .
<> <http://www.w3.org/1999/xhtml/vocab#license> <http://example.org/license.html> .

7.4.5 Auf leere Knoten verweisen

7.4.5 Referencing Blank Nodes

Mit RDFa ist es möglich, Beziehungen über verschiedene Quellverweistypen herzustellen, eingeschlossen bnodes. Wird ein Subjekt oder Objekt über einen CURIE definiert, und dieser CURIE benennt ausdrücklich einen bnode, dann muss ein konformer Prozessor den bnode erzeugen, wenn er während der Verarbeitung angetroffen wird. Der RDFa-Prozessor muss auch sicherstellen, dass kein bnode, der automatisch erzeugt wurde (zum Beispiel als ein Ergebnis von Verkettung), einen Namen besitzt, der mit dem bnode kollidiert, der durch ausdrücklichen Verweis in einem CURIE definiert ist.

In RDFa, it is possible to establish relationships using various types of resource references, including bnodes. If a subject or object is defined using a CURIE, and that CURIE explicitly names a bnode, then a Conforming Processor must create the bnode when it is encountered during parsing. The RDFa Processor must also ensure that no bnode created automatically (e.g., as a result of chaining) has a name that collides with a bnode that is defined by explicit reference in a CURIE.

Ziehen Sie das folgende Beispiel in Betracht:

Consider the following example:

<link about="_:john" rel="foaf:mbox"
  href="mailto:john@example.org" />
<link about="_:sue" rel="foaf:mbox"
  href="mailto:sue@example.org" />
<link about="_:john" rel="foaf:knows"
  resource="_:sue" />
<link about="_:john" rel="foaf:mbox"
  href="mailto:john@example.org" />
<link about="_:sue" rel="foaf:mbox"
  href="mailto:sue@example.org" />
<link about="_:john" rel="foaf:knows"
  resource="_:sue" />

Im Beispiel oben werden ausdrücklich zwei bnodes als das Subjekt von Tripeln erzeugt. Diese bnodes werden dann referenziert, um die Beziehung zwischen den beiden Beteiligten zu demonstrieren. Nach der Verarbeitung werden die folgenden Tripel erzeugt:

In the above fragment, two bnodes are explicitly created as the subject of triples. Those bnodes are then referenced to demonstrate the relationship between the parties. After processing, the following triples will be generated:

_:john foaf:mbox <mailto:john@example.org> .
_:sue foaf:mbox <mailto:sue@example.org> .
_:john foaf:knows _:sue .
_:john foaf:mbox <mailto:john@example.org> .
_:sue foaf:mbox <mailto:sue@example.org> .
_:john foaf:knows _:sue .

RDFa-Prozessoren verwenden intern implementierungsabhängige Identifizierer für bnodes. Wenn Tripel empfangen werden, werden neue bnode-Identifizierer verwendet, die normalerweise keinen Bezug zu den originalen Identifizierern haben. Jedoch stellen Implementierungen sicher, dass diese erzeugten bnode-Identifizierer beständig sind: jeder bnode wird seinen eigenen Identifizierer haben, alle Verweise zu einem bestimmten bnode werden den gleichen Identifizierer verwenden und verschiedene bnodes werden verschiedene Identifizierer haben.

RDFa Processors use, internally, implementation-dependent identifiers for bnodes. When triples are retrieved, new bnode indentifiers are used, which usually bear no relation to the original identifiers. However, implementations do ensure that these generated bnode identifiers are consistent: each bnode will have its own identifier, all references to a particular bnode will use the same identifier, and different bnodes will have different identifiers.

Als Sonderfall ist auch _: ein gültiger Verweis für einen bestimmten bnode.

As a special case, _: is also a valid reference for one specific bnode.

7.5 Verarbeitungsablauf

7.5 Sequence

Die Verarbeitung würde normalerweise beginnen, nachdem das zu verarbeitende Dokument vollständig geladen ist. Jedoch ist dieser Ablauf so nicht festgelegt und es ist sicherlich möglich, die Verarbeitung auch über Streaming anzustoßen, wie zum Beispiel bei SAX [SAX], um die RDFa-Informationen auszulesen. Wird jedoch eine andere als die hier definierte Technik DOM Traversal verwendet, ist es wichtig, sicherzustellen, dass die Verarbeitungsreglen der Wirtsprache angewendet werden (zum Beispiel gibt XHTML+RDFa [XHTML-RDFA] an, dass das Element base verwendet werden kann, und base wird die Interpretation von IRIs in den Elementen meta oder link beeinflussen, selbst wenn diese Elemente vor dem Element base im Stream stehen).

Processing would normally begin after the document to be parsed has been completely loaded. However, there is no requirement for this to be the case, and it is certainly possible to use a stream-based approach, such as SAX [SAX] to extract the RDFa information. However, if some approach other than the DOM traversal technique defined here is used, it is important to ensure that Host Language-specific processing rules are applied (e.g., XHTML+RDFa [XHTML-RDFA] indicates the base element can be used, and base will affect the interpretation of IRIs in meta or link elements even if those elements are before the base element in the stream).

In diesem Abschnitt wird der Begriff 'Quelle' (orig.: resource) verwendet, wenn von einem 'IRI oder bnode' gesprochen wird. Es ist möglich, dass dieser Begriff nach Rücksprache mit anderen Gruppen durch einem anderen, formaleren Begriff ersetzt wird. Die Änderung des Begriffs wird jedoch keinesfalls eine Änderung im Verarbeitungsablauf mit sich bringen.

In this section the term 'resource' is used to mean 'IRI or bnode' It is possible that this term will be replaced with some other, more formal term after consulting with other groups. Changing this term will in no way change this processing sequence.

Zu Beginn der Verarbeitung wird ein anfänglicher Evaluierungskontext wie folgt erzeugt:

At the beginning of processing, an initial evaluation context is created, as follows:

Die Verarbeitung beginnt mit Anwendung der unten beschriebenen Verarbeitungsregeln auf das Dokumentobjekt, mit Bezug auf diesen anfänglichen Evaluierungskontext. Alle Elemente im Baum werden ebenfalls nach den unten beschriebenen Regeln verarbeitet, depth-first, auch wenn der Evaluierungskontext, der für jeden Regeldurchlauf verwendet wird, auf vorhergehenden Regeln basieren wird, die angewendet worden sein könnten.

Der Evaluierungskontext ändert sich während der Verarbeitung, deshalb wird jedesmal, wenn der Verarbeitungsablauf für ein weiteres Element wieder von vorne angestoßen wird, ein neuer Evaluierungskontext verwendet, der auf den Ergebnissen der vorherigen Verarbeitung beruht. Zum Beispiel wird das Elternobjekt, das im anfänglichen Evaluierungskontext auf null gesetzt wird, sehr bald einen Wert erhalten, der im nächsten Schritt wiederverwendet werden kann.
depth-first bezeichnet die Vorgehensweise, dass die Elemente in Dokumentreihenfolge verarbeitet werden. Das bedeutet, zuerst wird das erste Element verarbeitet, und hat dieses Element ein untergeordnetes Kindelement, wird dieses verarbeitet, solange bis keine Kinder mehr vorhanden sind. Die Untersuchung geht zuerst in die Tiefe (depth). Ein Baum, als Beispiel betrachtet, würde vom Stamm über den ersten Ast zum ersten Zweig des Asts untersucht, weiterhin werden alle Zweige des ersten Asts untersucht, bevor es zurück zum Stamm geht und von der Astgabel der nächste Ast untersucht wird und darauffolgend alle Zweige des zweiten Asts.
Eine andere Verarbeitungsweise wäre breadth first, hier werden zuerst alle Elemente der ersten Ebene untersucht. Erst wenn alle Eltern untersucht worden sind, werden alle darauffolgenden Kinder untersucht, bevor es zu den Enkelkindern usw. geht. Um beim Baum zu bleiben, würden vom Stamm aus erst alle dicken Äste untersucht, bevor in die dünneren Zweige vorgestoßen wird.

Processing begins by applying the processing rules below to the document object, in the context of this initial evaluation context. All elements in the tree are also processed according to the rules described below, depth-first, although the evaluation context used for each set of rules will be based on previous rules that may have been applied.

Diese Spezifikation definiert Verarbeitungsregeln für optionale Attribute, die nicht in allen Wirtsprachen vorkommen könnten (zum Beispiel @href). Werden diese Attribute in der Wirtsprache nicht unterstützt, dann sind die entsprechenden Verarbeitungsregeln für diese Sprache nicht relevant.

This specification defines processing rules for optional attributes that may not be present in all Host Languages (e.g., @href). If these attributes are not supported in the Host Language, then the corresponding processing rules are not relevant for that language.

Die Verarbeitungsregeln sind:

The processing rules are:

  1. Zuerst werden die lokalen Werte wie folgt initialisiert:
    Beachten Sie, dass einige der lokalen Variablen temporäre Container für Werte sind, die an Elemente niedrigerer Stufen über einen Evaluierungskontext weitergegeben werden. In einigen Fällen wird der Container den gleichen Namen haben. Um klar zu machen, mit welchem in den folgenden Schritten gearbeitet wird, wird die lokale Version eines Items im Allgemeinen auch als solche bezeichnet.
  2. Als nächstes wird das aktuelle Element auf Abweichungen zum voreingestellten Vokabular über @vocab untersucht. Ist @vocab vorhanden und enthält einen Wert, wird das lokale voreingestellte Vokabular nach den Reglen im Abschnitt CURIE- und IRI-Verarbeitung aktualisiert. Ist der Wert leer, dann muss das lokale voreingestellte Vokabular auf die in der Wirtsprache definierte Voreinstellung zurückgesetzt werden (sofern vorhanden).
    Der Wert von @vocab wird wie folgt verwendet, um einen Tripel zu erzeugen:
    Subjekt
    base
    Prädikat
    http://www.w3.org/ns/rdfa#usesVocabulary
    Objekt
    Wert vom Attribut @vocab
    Eine Wirtsprache muss kein voreingestelltes Vokabular definieren. In solch einem Fall hat die Angabe eines leeren Wertes für @vocab die Auswirkung, dass das lokale voreingestellte Vokabular auf null gesetzt wird.
  3. Als nächstes wird das aktuelle Element auf IRI-Abbildungen untersucht, diese werden zur lokalen Liste der IRI-Abbildungen hinzugefügt. Beachten Sie, dass eine IRI-Abbildung jegliche Abbildung in der Liste einfach überschreiben wird, wenn sie den gleichen Namen hat;
    Abbildungen werden über @prefix definiert. Werte in diesem Attribut werden vom Anfang bis zum Ende evaluiert (zum Beispiel von rechts nach links in gängigen Dokumenten). In Hinsicht auf Rückwärtskompatibilität sollten RDFa-Prozessoren auch die Definition von Abbildungen über @xmlns gestatten. In diesem Fall wird der abzubildende Wert durch das XML-Namensraumpräfix gesetzt und der abzubildende Wert ist der Wert des Attributs - ein IRI. (Beachten Sie, dass Präfixabbildungen über @xmlns überholt (deprecated) sind und in zukünftigen Versionen dieser Spezifikation entfernt werden könnten.) Wenn xmlns unterstützt wird, müssen solche Abbildungen verarbeitet werden, bevor jegliche Abbildungen aus @prefix im gleichen Element verarbeitet werden. Unabhängig davon, wie eine Abbildung deklariert ist, muss der abzubildende Wert in Kleingeschriebenes umgewandelt werden und der IRI in keinster Weise verarbeitet werden; insbesondere, wenn es ein relativer Pfad ist, darf er nicht gegen die aktuelle Basis aufgelöst werden. Autoren sollten keine relativen Pfade für diesen IRI verwenden.
  4. Das aktuelle Element wird auch auf Sprachinformationen untersucht, und sofern vorhanden, wird die aktuelle Sprache dementsprechend gesetzt;
    Wirtsprachen, die RDFa einbauen, können einen Mechanismus bieten, um die Sprache eines Elements einschließlich seines Inhalts anzugeben (zum Beispiel bietet XML das universelle XML-Attribut @xml:lang an).
  5. Enthält das aktuelle Element kein @rel oder @rev, dann ist der nächste Schritt, einen neuen Wert für das neue Subjekt zu erhalten. Dieser Schritt hat zwei mögliche Alternativen.
    1. Enthält das aktuelle Element das Attribut @property, aber weder das Attribut @content noch das Attribut @datatype, dann
      wird das neue Subjekt auf die Quelle gesetzt, die vom ersten Treffer der folgenden Regel erhalten wird:

      Wenn @typeof vorhanden ist, dann wird typisierte Quelle auf die Quelle gesetzt, die vom ersten Treffer der folgenden Regeln erhalten wird:

    2. ansonsten:
  6. Enthält das aktuelle Element ein @rel oder @rev, dann ist der nächste Schritt, sowohl einen Wert für neues Subjekt als auch einen Wert für aktuelle Objektquelle zu setzen:
    neues Subjekt wird auf die Quelle gesetzt, die als erster Treffer aus den folgenden Regeln erhalten wird:

    ist das Attribut @typeof vorhanden, wird typiserte Quelle auf neues Subjekt gesetzt.

    Wird keine Quelle erhalten, dann wird der erste Treffer der folgenden Regeln angewendet:

    • ist das Element das Wurzelelement des Dokuments, verfahre, als ob ein leeres @about vorhanden ist und verarbeite es nach der oben beschriebenen Regel für @about;
    • ansonsten, wenn Elternobjekt vorhanden ist, wird neues Subjekt auf dieses gesetzt.

    Dann wird die aktuelle Objektquelle auf die Quelle gesetzt, die als erster Treffer der folgenden Regeln erhalten wird:

    Ist @typeof vorhanden, aber @about ist nicht vorhanden, wird typisierte Quelle auf aktuelle Objektquelle gesetzt.

    Beachten Sie, dass der endgültige Wert von aktuelle Objektquelle entweder null sein wird (entsprechend der Initialisierung) oder ein vollständiger IRI oder ein bnode.

  7. Wurde in irgendeinem der vorhergehenden Schritte eine typisierte Quelle auf einen anderen Wert als null gesetzt, wird er nun verwendet, um ein Subjekt für Typwerte zu liefern;
    ein oder mehrere 'Typen' für die typisierte Quelle können mit @typeof gesetzt werden. Sofern vorhanden, kann das Attribut einen oder mehrere IRIs beinhalten, erhalten nach den Regeln im Abschnitt CURIE- und IRI-Verarbeitung, von denen jeder wie folgt verwendet wird, um Tripel zu erzeugen:
    Subjekt
    typisierte Quelle
    Prädikat
    http://www.w3.org/1999/02/22-rdf-syntax-ns#type
    Objekt
    aktueller vollständiger IRI von 'Typ' aus typisierte Quelle
  8. Wenn in irgendeinem der vorausgehenden Schritte ein neues Subjekt auf einen anderen Wert als null gesetzt wurde und dieser sich vom Elternobjekt unterscheidet;
    wird die Listenabbildung, entnommen aus dem Evaluierungskontext, auf eine neue, leere Abbildung gesetzt.
  9. Wurde in irgendeinem der vorherigen Schritte eine aktuelle Objektquelle auf einen Wert anders als null gesetzt, wird er nun verwendet, um Tripel zu bilden und Einträge in die lokale Listenabbildung vorzunehmen:
    Enthält das Element sowohl das Attribut @inlist als auch das Attribut @rel: Das @rel kann eine oder mehrere Quellen enthalten, erhalten nach den Regeln im Abschnitt CURIE- und IRI-Verarbeitung. Jede einzelne Quelle wird verwendet, um einen Eintrag zur Listenabbildung wie folgt hinzuzufügen:
    Prädikate für die aktuelle Objektquelle können durch Verwendung von einem oder beiden folgenden Attributen gesetzt werden, @rel und @rev, aber im Fall von @rel nur dann, wenn das Attribut @inlist nicht vorhanden ist:
  10. Wenn jedoch die akuelle Objektquelle auf null gesetzt wurde, es aber Prädikate gibt, dann müssen sie als unvollständige Tripel gespeichert werden bis ein Subjekt entdeckt wird, das als Objekt genutzt werden kann. Auch sollte eine aktuelle Objektquelle auf einen neu erzeugten bnode gesetzt werden (so dass die unvollständigen Tripel ein Subjekt haben, mit dem sie sich verbinden können, wenn sie letztlich in Tripel verwandelt werden);
    Prädikate für unvollständige Tripel können durch Verwendung von einem oder beiden folgenden Attribute gesetzt werden, @rel und @rev:
  11. Der nächste Schritt der Iteration verlangt irgendeinen aktuellen Eigenschftswert;
    Prädikate für den aktuellen Eigenschaftswert können mit @property angegeben werden. Sofern vorhanden, werden eine oder mehrere Quellen nach den Regeln aus Abschnitt CURIE and IRI Processing bezogen und dann wird der aktuelle Literalwert wie folgt erhalten:
    • als ein typisiertes Literal, wenn @datatype verfügbar ist und wenn es keinen leeren Wert nach den Regeln aus Abschnitt CURIE- und IRI-Verarbeitung hat, und wenn es nicht auf XMLLiteral im Vokabular http://www.w3.org/1999/02/22-rdf-syntax-ns# gesetzt ist.

      Das aktuelle Literal ist entweder der Wert von @content (sofern vorhanden) oder eine Zeichenkette, erzeugt durch Zusammensetzen des Werts aus allen nachfolgenden Textknoten in Bezug auf das aktuelle Element. Die endgültige Zeichenkette schließt den Datentyp-IRI ein, wie in [RDF-CONCEPTS] beschrieben, welcher nach den Regeln in Abschnitt CURIE- und IRI-Verarbeitung erhalten worden sein wird.

    • ansonsten als ein einfaches Literal, wenn @datatype vorhanden ist, dieses aber einen leeren Wert entsprechend Abschnitt CURIE- und IRI-Verarbeitung aufweist.

      Das aktuelle Literal ist entweder der Wert von @content (sofern vorhanden) oder eine Zeichenkette, erzeugt durch Zusammensetzen des Werts aus allen nachfolgenden Textknoten, in Bezug auf das aktuelle Element.

    • ansonsten als ein XML-Literal, wenn @datatype vorhanden ist und auf XMLLiteral im Vokabular http://www.w3.org/1999/02/22-rdf-syntax-ns# gesetzt ist.

      Der Wert des XML-Literals ist eine Zeichenkette, erzeugt durch die Serialisierung aller Knoten zu Text, die Nachfahren des aktuellen Elements sind, das heißt, nicht einschließlich des Elements selbst. Dem Wert wird der Datentyp XMLLiteral im Vokabular http://www.w3.org/1999/02/22-rdf-syntax-ns# gegeben. Das Format des sich daraus ergebenden serialisierten Inhalts entspricht dem in Exclusive XML Canonicalization Version 1.0 [XML-EXC-C14N] beschriebenen Format.

      Um größtmögliche Portierbarkeit dieses Literals zu wahren, müssen alle Kinder des aktuellen Knotens, die Elemente sind, die aktuellen Namensraumdeklarationen (sofern vorhanden) im serialisierten Element deklarieren. Weil der Kindelementknoten auch neue XML-Namensräume deklarieren könnte, muss der RDFa-Prozessor darauf achten, diese zusammenzufügen, wenn die serialisierte Elementdefinition erzeugt wird. Zur Vermeidung von Unklarheiten: Jede Umdeklaration des Kindknotens muss Vorrang vor den Deklarationen haben, die im aktuellen Knoten gültig waren.

    • ansonsten als ein einfaches Literal mit dem Wert von @content, sofern @content vorhanden ist.
    • ansonsten, Wenn die Attribute @rel, @rev, und @content nicht vorhanden sind, als eine Quelle, erhalten durch eine der folgenden Möglichkeiten:
    • ansonsten, wenn @typeof vorhanden ist, nicht jedoch @about, der Wert der typisierten Quelle.
    • ansonsten als ein einfaches Literal.

      Zusätzlich, wenn es einen Wert für aktuelle Sprache gibt, dann sollte der Wert dieses einfachen Literals diese Sprachinformationen enthalten, wie in [RDF-CONCEPTS] beschrieben. Das aktuelle Literal ist entweder der Wert von @content (sofern vorhanden) oder eine Zeichenkette, die durch Zusammensetzung aller Textinhalte eines jeden Nachfahre-Elements des aktuellen Elements in Dokumentreihenfolge erzeugt wird.

    Der aktuelle Eigenschaftswert wird dann mit jedem Prädikat wie folgt verwendet:

  12. Ist das Flag überspringe Element auf 'falsch' gesetzt und wurde neues Subjekt auf einen anderen Wert als null gesetzt, dann sollte jedes unvollständige Tripel im aktuellen Kontext vervollständigt werden:
    Die Liste der unvollständigen Tripel vom aktuellen Evaluierungskontext (nicht die lokale Liste der unvollständigen Tripel) wird keinen oder mehr Prädikat-IRIs enthalten. Diese Liste wird abgearbeitet und jedes Prädikat wird mit Elternsubjekt und neues Subjekt angewandt, um einen Tripel zu erzeugen oder ein neues Element zu der lokalen Listenabbildung hinzuzufügen. Beachten Sie, dass es auf jeder Ebene zwei Listen mit unvollständigen Tripeln gibt; eine für die aktuelle Verarbeitungsebene (welche an jedes Kindelement im vorhergehenden Schritt weitergegeben wird) und eine, die als Teil des Evaluierungskontextes empfangen wurde. Es ist die letztere, die zur Verarbeitung in diesem Schritt herangezogen wird.
    Beachten Sie, dass jedes unvollständige Tripel einen Richtungswert hat, der verwendet wird, um zu bestimmen, was zum Subjekt und was zum Objekt eines jeden erzeugten Tripels werden wird:
  13. Als nächstes werden alle Elemente , die Kinder des aktuellen Elements sind, nach den hier beschriebenen Regeln verarbeitet, ein neuer Evaluierungskontext wird verwendet, dieser wird wie folgt initialisiert:
  14. Schlussendlich werden, sofern eine oder mehrere Abbildungen in der lokalen Listenabbildung sind, die Listentripel wie folgt erzeugt:
    Für jeden IRI in der lokalen Listenabbildung, wenn die entsprechende Liste nicht im Evaluierungskontext existiert (dies würde anzeigen, dass die Liste ursprünglich für das aktuelle Element intstantisiert wurde), verwende die Liste wie folgt:
    • Gibt es keine Einträge in der Liste, die mit dem IRI verknüpft sind, dann erzeuge den folgenden Tripel:
      Subjekt
      aktuelles Subjekt
      Prädikat
      vollständiger IRI der lokalen Listenabbildung, der mit dieser Liste verknüpft ist
      Objekt
      http://www.w3.org/1999/02/22-rdf-syntax-ns#nil
    • Ansonsten,
      • Erzeuge einen neuen 'bnode'-Array, der die neu erzeugten bnodes enthält, einen für jeden Eintrag in der Liste
      • Für jedes bnode-Paar (entweder IRI oder Literal) in der Liste wird der folgende Tripel erzeugt:
        Subjekt
        bnode
        Prädikat
        http://www.w3.org/1999/02/22-rdf-syntax-ns#first
        Objekt
        vollständiger IRI oder Literal
      • Für jeden Eintrag im 'bnode'-Array wird das folgende Tripel erzeugt:
        Subjekt
        bnode
        Prädikat
        http://www.w3.org/1999/02/22-rdf-syntax-ns#rest
        Objekt
        nächster Eintrag im ‘bnode’-array oder, wenn dieses nicht existiert, http://www.w3.org/1999/02/22-rdf-syntax-ns#nil
      • Ein weiterer zusätzlicher Tripel wird erzeugt:
        subject
        aktuelles Subjekt
        Prädikat
        vollständiger IRI der lokalen Listenabbildung, der mit dieser Liste verknüpft ist
        Objekt
        der erste Eintrag des ‘bnode’-Array
  1. First, the local values are initialized, as follows:
    Note that some of the local variables are temporary containers for values that will be passed to descendant elements via an evaluation context. In some cases the containers will have the same name, so to make it clear which is being acted upon in the following steps, the local version of an item will generally be referred to as such.
     
  2. Next the current element is examined for any change to the default vocabulary via @vocab. If @vocab is present and contains a value, the local default vocabulary is updated according to the section on CURIE and IRI Processing. If the value is empty, then the local default vocabulary must be reset to the Host Language defined default (if any).
     
    The value of @vocab is used to generate a triple as follows:
     
    subject
    base
    predicate
    http://www.w3.org/ns/rdfa#usesVocabulary
    object
    value from @vocab
    A Host Language is not required to define a default vocabulary. In such a case, setting @vocab to the empty value has the effect of setting the local default vocabulary to null.
     
  3. Next, the current element is examined for IRI mappings and these are added to the local list of IRI mappings. Note that an IRI mapping will simply overwrite any current mapping in the list that has the same name;
     
    Mappings are defined via @prefix. Values in this attribute are evaluated from beginning to end (e.g., left to right in typical documents). For backward compatibility, RDFa Processors should also permit the definition of mappings via @xmlns. In this case, the value to be mapped is set by the XML namespace prefix, and the value to map is the value of the attribute — an IRI. (Note that prefix mapping via @xmlns is deprecated, and may be removed in a future version of this specification.) When xmlns is supported, such mappings must be processed before processing any mappings from @prefix on the same element. Regardless of how the mapping is declared, the value to be mapped must be converted to lower case, and the IRI is not processed in any way; in particular if it is a relative path it must not be resolved against the current base. Authors should not use relative paths as the IRI.
     
     
     
     
  4. The current element is also parsed for any language information, and if present, current language is set accordingly;
    Host Languages that incorporate RDFa may provide a mechanism for specifying the natural language of an element and its contents (e.g., XML provides the general-purpose XML attribute @xml:lang).
  5. If the current element contains no @rel or @rev attribute, then the next step is to establish a value for new subject. This step has two possible alternatives.
     
    1. If the current element contains the @property attribute, but does not contain either the @content or @datatype attributes, then
      new subject is set to the resource obtained from the first match from the following rule:

      If @typeof is present then typed resource is set to the resource obtained from the first match from the following rules:

    2. otherwise:
  6. If the current element does contain a @rel or @rev attribute, then the next step is to establish both a value for new subject and a value for current object resource:
    new subject is set to the resource obtained from the first match from the following rules:

    if the @typeof attribute is present, set typed resource to new subject.

    If no resource is provided then the first match from the following rules will apply:

    • if the element is the root element of the document then act as if there is an empty @about present, and process it according to the rule for @about, above;
       
    • otherwise, if parent object is present, new subject is set to that.

    Then the current object resource is set to the resource obtained from the first match from the following rules:

    If @typeof is present and @about is not, set typed resource to current object resource.

    Note that final value of the current object resource will either be null (from initialization) or a full IRI or bnode.

  7. If in any of the previous steps a typed resource was set to a non-null value, it is now used to provide a subject for type values;
     
    One or more 'types' for the typed resource can be set by using @typeof. If present, the attribute may contain one or more IRIs, obtained according to the section on CURIE and IRI Processing, each of which is used to generate a triple as follows:
    subject
    typed resource
    predicate
    http://www.w3.org/1999/02/22-rdf-syntax-ns#type
    object
    current full IRI of 'type' from typed resource
  8. If in any of the previous steps a new subject was set to a non-null value different from the parent object;
     
    The list mapping taken from the evaluation context is set to a new, empty mapping.
  9. If in any of the previous steps a current object resource was set to a non-null value, it is now used to generate triples and add entries to the local list mapping:
    If the element contains both the @inlist and the @rel attributes: the @rel may contain one or more resources, obtained according to the section on CURIE and IRI Processing each of which is used to add an entry to the list mapping as follows:
    Predicates for the current object resource can be set by using one or both of the @rel and the @rev attributes but, in case of the @rel attribute, only if the @inlist is not present:
     
  10. If however current object resource was set to null, but there are predicates present, then they must be stored as incomplete triples, pending the discovery of a subject that can be used as the object. Also, current object resource should be set to a newly created bnode (so that the incomplete triples have a subject to connect to if they are ultimately turned into triples);
     
    Predicates for incomplete triples can be set by using one or both of the @rel and @rev attributes:
     
  11. The next step of the iteration is to establish any current property value;
     
    Predicates for the current property value can be set by using @property. If present, one or more resources are obtained according to the section on CURIE and IRI Processing, and then the actual literal value is obtained as follows:
     
    • as a typed literal if @datatype is present, does not have an empty value according to the section on CURIE and IRI Processing, and is not set to XMLLiteral in the vocabulary http://www.w3.org/1999/02/22-rdf-syntax-ns#.
       

      The actual literal is either the value of @content (if present) or a string created by concatenating the value of all descendant text nodes, of the current element in turn. The final string includes the datatype IRI, as described in [RDF-CONCEPTS], which will have been obtained according to the section on CURIE and IRI Processing.
       
       
       

    • otherwise, as a plain literal if @datatype is present but has an empty value according to the section on CURIE and IRI Processing.
       

      The actual literal is either the value of @content (if present) or a string created by concatenating the value of all descendant text nodes, of the current element in turn.

    • otherwise, as an XML literal if @datatype is present and is set to XMLLiteral in the vocabulary http://www.w3.org/1999/02/22-rdf-syntax-ns#.
       

      The value of the XML literal is a string created by serializing to text, all nodes that are descendants of the current element, i.e., not including the element itself, and giving it a datatype of XMLLiteral in the vocabulary http://www.w3.org/1999/02/22-rdf-syntax-ns#. The format of the resulting serialized content is as defined in Exclusive XML Canonicalization Version [XML-EXC-C14N].
       
       

      In order to maintain maximum portability of this literal, any children of the current node that are elements must have the current XML namespace declarations (if any) declared on the serialized element. Since the child element node could also declare new XML namespaces, the RDFa Processor must be careful to merge these together when generating the serialized element definition. For avoidance of doubt, any re-declarations on the child node must take precedence over declarations that were active on the current node.
       
       

    • otherwise, as an plain literal using the value of @content if @content is present.
    • otherwise, if the @rel, @rev, and @content attributes are not present, as a resource obtained from one of the following:
    • otherwise, if @typeof is present and @about is not, the value of typed resource.
    • otherwise as a plain literal.

      Additionally, if there is a value for current language then the value of the plain literal should include this language information, as described in [RDF-CONCEPTS]. The actual literal is either the value of @content (if present) or a string created by concatenating the text content of each of the descendant elements of the current element in document order.
       
       

    The current property value is then used with each predicate as follows:

  12. If the skip element flag is 'false', and new subject was set to a non-null value, then any incomplete triples within the current context should be completed:
     
    The list of incomplete triples from the current evaluation context (not the local list of incomplete triples) will contain zero or more predicate IRIs. This list is iterated over and each of the predicates is used with parent subject and new subject to generate a triple or add a new element to the local list mapping. Note that at each level there are two lists of incomplete triples; one for the current processing level (which is passed to each child element in the previous step), and one that was received as part of the evaluation context. It is the latter that is used in processing during this step.
     
     
     
    Note that each incomplete triple has a direction value that is used to determine what will become the subject, and what will become the object, of each generated triple:
     
  13. Next, all elements that are children of the current element are processed using the rules described here, using a new evaluation context, initialized as follows:
     
  14. Finally, if there is one or more mapping in the local list mapping, list triples are generated as follows:
    For each IRI in the local list mapping, if the equivalent list does not exist in the evaluation context, indicating that the list was originally instantiated on the current element, use the list as follows:
    • If there are zero items in the list associated with the IRI, generate the following triple:
      subject
      current subject
      predicate
      full IRI of the local list mapping associated with this list
       
      object
      http://www.w3.org/1999/02/22-rdf-syntax-ns#nil
    • Otherwise,
      • Create a new ‘bnode’ array containing newly created bnodes, one for each item in the list
         
      • For each bnode-(IRI or literal) pair from the list the following triple is generated:
        subject
        bnode
        predicate
        http://www.w3.org/1999/02/22-rdf-syntax-ns#first
        object
        full IRI or literal
      • For each item in the ‘bnode’ array the following triple is generated:
        subject
        bnode
        predicate
        http://www.w3.org/1999/02/22-rdf-syntax-ns#rest
        object
        next item in the ‘bnode’ array or, if that does not exist, http://www.w3.org/1999/02/22-rdf-syntax-ns#nil
         
      • A single additional triple is generated:
        subject
        current subject
        predicate
        full IRI of the local list mapping associated with this list
        object
        first item of the ‘bnode’ array

7.6 Prozessorstatus

7.6 Processor Status

Die Absicht hinter den im vorherigen Abschnitt besprochenen Regeln, ist es, möglichst viele Tripel aus einem Dokument zu erhalten. Der RDFa-Prozessor ist so konzipiert, dass er mit der Verarbeitung auch dann fortfährt, wenn Fehler auftreten. Zum Beispiel würde der RDFa-Prozessor die Erzeugung eines Tripels überspringen und mit der Dokumentverarbeitung fortfahren, wenn er nicht in der Lage wäre, eine Präfixabbildung oder einen Begriff aufzulösen. Es gibt Fälle, in denen die Kenntnis über jede Prozessorwarnung oder über jeden Prozessorfehler für den Autor nützlich wäre. Der Prozessorgraph ist als Mechanismus gedacht, um alle Informationen, Warnungen und Fehlermeldungen als Triple vom RDFa-Prozessor aufzunehmen. Diese Statustripel könnten abgerufen werden, um die Bearbeitung von RDFa zu unterstützen oder eine automatische Fehlerverarbeitung zu ermöglichen.

The processing rules covered in the previous section are designed to extract as many triples as possible from a document. The RDFa Processor is designed to continue processing, even in the event of errors. For example, failing to resolve a prefix mapping or term would result in the RDFa Processor skipping the generation of a triple and continuing with document processing. There are cases where knowing each RDFa Processor warning or error would be beneficial to authors. The processor graph is designed as the mechanism to capture all informational, warning, and error messages as triples from the RDFa Processor. These status triples may be retrieved and used to aid RDFa authoring or automated error detection.

Unterstützt ein RDFa-Prozessor die Erzeugung eines Prozessorgraphen, dann muss er eine Zusammenstellung von Tripeln erzeugen, sofern die folgenden Unregelmäßigkeiten in der Verarbeitung auftreten:

If an RDFa Processor supports the generation of a processor graph, then it must generate a set of triples when the following processing issues occur:

  • An rdfa:Error must be generated when the document fails to be fully processed as a result of non-conformant Host Language markup.
  • A rdfa:Warning must be generated when a CURIE prefix fails to be resolved.
  • A rdfa:Warning must be generated when a Term fails to be resolved.

Andere implementierungsabhängige Tripel, rdfa:Info, rdfa:Warning oder rdfa:Error könnten vom RDFa-Prozessor erzeugt werden.

Other implementation-specific rdfa:Info, rdfa:Warning, or rdfa:Error triples may be generated by the RDFa Processor.

7.6.1 Zugriff auf den Prozessorgraphen

7.6.1 Accessing the Processor Graph

Der Zugriff auf den Prozessorgraphen kann auf unterschiedliche Weise erfolgen und hängt von der Art des RDFa-Prozessors und der Zugriffsmethode ab, die der Entwickler verwendet.

Accessing the processor graph may be accomplished in a variety of ways and is dependent on the type of RDFa Processor and access method that the developer is utilizing.

SAX-basierte Prozessoren oder Prozessoren, die Funktions- oder Methodenrückfragen verwenden, um die Erzeugung eines Tripels zu bestätigen, werden als ereignisbasierte RDFa-Prozessoren klassifiziert. Bei ereignisbasierten RDFa-Prozessoren muss die Software dem Entwickler gestatten, eine Funktion oder Rückfrage einzutragen, die aufgerufen wird, wenn ein Tripel für den Prozessorgraph erzeugt wird. Die Rückfrage kann die gleiche sein, wie die für den Ausgabegraphen, sofern bestimmt werden kann, ob der erzeugte Tripel in den Prozessorgraphen oder in den Ausgabegraphen gehört.

SAX-based processors or processors that utilize function or method callbacks to report the generation of triples are classified as event-based RDFa Processors. For Event-based RDFa Processors, the software must allow the developer to register a function or callback that is called when a triple is generated for the processor graph. The callback may be the same as the one that is used for the output graph as long as it can be determined if a generated triple belongs in the processor graph or the output graph.

Als Vollgraph-RDFa-Prozessor ist jeder Prozessor definiert, der das gesamte Dokument verarbeitet und dem Entwickler nur dann Zugriff auf die Tripel gestattet, wenn die Verarbeitung vollendet ist. RDFa-Prozessoren, die in diese Kategorie fallen, geben ihre Ergebnisse normalerweise über einen einzigen Aufruf in einer der Schreibweisen RDF/XML, N3, TURTLE oder N-Triples aus. Bei Vollgraph-RDFa-Prozessoren muss die Software dem Entwickler die Angabe gestatten, ob er den Ausgabegraphen, den Prozessorgraphen oder beide Graphen als einen einzigen kombinierten Graphen vom RDFa-Prozessor erhalten möchte. Ist keine Grundeinstellung für den Graphen angegeben, dann muss der Ausgabegraph zurückgegeben werden.

A whole-graph RDFa Processor is defined as any RDFa Processor that processes the entire document and only allows developer access to the triples after processing has completed. RDFa Processors that typically fall into this category express their output via a single call using RDF/XML, N3, TURTLE, or N-Triples notation. For whole-graph RDFa Processors, the software must allow the developer to specify if they would like to retrieve the output graph, the processor graph, or both graphs as a single, combined graph from the RDFa Processor. If the graph preference is not specified, the output graph must be returned.

Als Internetdienst-RDFa-Prozessor ist jeder RDFa-Prozessor definiert, der ein Dokument via HTTP GET, POST oder eine ähnliche Vorgehensweise über einen RDFa-Prozessor-IRI verarbeiten kann. Die Software für diese RDFa-Prozessorklasse muss dem Aufrufenden gestatten anzugeben, ob er den Ausgabegraphen, den Prozessorgraphen oder beide Graphen als einen einzigen kombinierten Graphen vom Internetdienst empfangen möchte. Der Abfrageparameter rdfagraph muss verwendet werden, um diesen Wert anzugeben. Die gestatteten Werte sind output, processor oder beide Werte in beliebiger Reihenfolge, getrennt durch ein Kommazeichen. Ist keine Grundeinstellung für den Graphen angegeben, dann muss der Ausgabegraph zurückgegeben werden.

An web service RDFa Processor is defined as any RDFa Processor that is capable of processing a document by performing an HTTP GET, POST or similar action on an RDFa Processor IRI. For this class of RDFa Processor, the software must allow the caller to specify if they would like to retrieve the output graph, the processor graph, or both graphs as a single, combined graph from the web service. The rdfagraph query parameter must be used to specify the value. The allowable values are output, processor or both values, in any order, separated by a comma character. If the graph preference is not specified, the output graph must be returned.

7.6.2 Prozessorgraphbegriffe

7.6.2 Processor Graph Terms

Um Interoperabilität zu gewährleisten, ist eine Hauptklassenhierarchie für den Inhalt des Prozessorgraphen definiert. Einzelne Fehler oder Warnungen sind Quellen (normalerweise leere Knoten) oder ein bestimmter Typ mit zusätzlichen Eigenschaften, die weitere Details zum Fehlerzustand oder zur Warnung bereitstellen. Die Spezifikation definiert nur die Hauptklassen, und diejenigen, die sich auf die Fehler- oder Warnungszustände beziehen, die in diesem Dokument ausdrücklich definiert sind. Andere implementierungsabhängige Unterklassen können vom RDFa-Prozessor definiert werden.

To ensure interoperability, a core hierarchy of classes is defined for the content of the processor graph. Separate errors or warnings are resources (typically blank nodes) of a specific type, with additional properties giving more details on the error condition or the warning. This specification defines only the top level classes and the ones referring to the error and warning conditions defined explicitly by this document. Other, implementation-specific subclasses may be defined by the RDFa Processor.

Die Hauptklassen sind rdfa:Error, rdfa:Warning und rdfa:Info, definiert als Teil des RDFa-Vokabulars. Weiterhin ist eine einzige Eigenschaft für diese Klassen definiert, rdfa:context, mit ihr kann eine zusätzliche Erklärung für den Fehler angegeben werden, zum Beispiel die HTTP-Antwort, eine XPath-Information oder einfach der IRI zu der RDFa-Quelle. Die Verwendung dieser Eigenschaft ist optional, mehr als ein Tripel kann mit diesem Prädikat in Bezug auf das gleiche Subjekt verwendet werden. Schlussendlich sollten Fehler- und Warninstanzen die Eigenschaften dc:description und dc:date verwenden. dc:description sollte eine kurze, von Menschen lesbare, aber implementierungsabhängige Beschreibung des Fehlers enthalten. dc:date sollte die Zeit angeben, zu der jener Fehler entdeckt wurde, und es wird geraten, dies so präzise wie möglich zu tun, um zum Beispiel die Ermittlung von eventuellen Netzwerkfehlern zu ermöglichen.

The top level classes are rdfa:Error, rdfa:Warning, and rdfa:Info, defined as part of the RDFa Vocabulary. Furthermore, a single property is defined on those classes, namely rdfa:context, that provides an extra context for the error, e.g., http response, an XPath information, or simply the IRI to the RDFa resource. Usage of this property is optional, and more than one triple can be used with this predicate on the same subject. Finally, error and warning instances should use the dc:description and dc:date properties. dc:description should provide a short, human readable but implementation dependent description of the error. dc:date should give the time when the error was found and it is advised to be as precise as possible to allow the detection of, for example, possible network errors.

Das Beispiel unten zeigt die Tripel, die im Zuge eines Fehlers mindestens im Prozessorgraph enthalten sein sollten (der Inhalt des Literals für das Prädikat dc:description ist implementierungsabhängig):

The example below shows the triples that should be minimally present in the processor graph as a result of an error (the content of the literal for the dc:description predicate is implementation dependent):

@prefix rdfa:    <http://www.w3.org/ns/rdfa#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix dc:      <http://purl.org/dc/terms/> .
[] a rdfa:DocumentError ;
   dc:description "Das Dokument konnte auf Grund von Verarbeitungsfehlern nicht verarbeitet werden" ;
   dc:date "2010-06-30T13:40:23"^^xsd:dateTime .
@prefix rdfa:    <http://www.w3.org/ns/rdfa#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix dc:      <http://purl.org/dc/terms/> .
[] a rdfa:DocumentError ;
   dc:description "The document could not be parsed due to parsing errors" ;
   dc:date "2010-06-30T13:40:23"^^xsd:dateTime .

Ein etwas ausführlicheres Beispiel verwendet die Eigenschaft rdfa:context, um weiterführende Informationen bereitzustellen. Externe Vokabulare werden verwendet, um Informationen über HTTP-Header oder XPointer zu repräsentieren (beachten Sie, dass diese Informationen einem Prozessor nicht in allen Fällen zur Verfügung stehen könnten; das bedeutet, die folgenden Informationen aus rdfa:context sind nicht erforderlich):

A slightly more elaborate example makes use of the rdfa:context property to provide further information, using external vocabularies to represent HTTP headers or XPointer information (note that a processor may not have these information in all cases, i.e., these rdfa:context information are not required):

@prefix rdfa:    <http://www.w3.org/ns/rdfa#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix dc:      <http://purl.org/dc/terms/> .
@prefix ptr:     <http://www.w3.org/2009/pointers#> .
@prefix ht:      <http://www.w3.org/2006/http#> .
 
[] a rdfa:DocumentError ;
   dc:description "Das Dokument konnte auf Grund von Verarbeitungsfehlern nicht verarbeitet werden" ;
   dc:date "2010-06-30T13:40:23"^^xsd:dateTime ;
   rdfa:context <http://www.example.org/doc> ;
   rdfa:context [
      a ptr:Pointer ;
      # detailierte Informationen zu xpointer/xpath hier, um den Fehler zu lokalisieren
   ] ;
   rdfa:context [
      a ht:Response ;
      ht:responseCode <http://www.w3.org/2006/http#404>
      # Die Header der HTTP-Antwort auf die Anfrage für das Quelldokument.
   ].
@prefix rdfa:    <http://www.w3.org/ns/rdfa#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix dc:      <http://purl.org/dc/terms/> .
@prefix ptr:     <http://www.w3.org/2009/pointers#> .
@prefix ht:      <http://www.w3.org/2006/http#> .
 
[] a rdfa:DocumentError ;
   dc:description "The document could not be parsed due to parsing errors" ;
   dc:date "2010-06-30T13:40:23"^^xsd:dateTime ;
   rdfa:context <http://www.example.org/doc> ;
   rdfa:context [
      a ptr:Pointer ;
      # detailed xpointer/xpath information provided here to locate the error
   ] ;
   rdfa:context [
      a ht:Response ;
      ht:responseCode <http://www.w3.org/2006/http#404>
      # The HTTP response headers on the request for the source file.
   ].

7.7 Vokabularerweiterung

7.7 Vocabulary Expansion

Prozessoren können durch Verwendung der eingeschränkten Verkettungsregeln aus RDFS und OWL eine Vokabularerweiterung vollziehen, wie in RDFa-Vokabularerweiterung beschrieben.

Processors may perform vocabulary expansion by utilizing limited RDFS and OWL entailment rules, as described in RDFa Vocabulary Expansion.

8. RDFa-Verarbeitung im Detail

8. RDFa Processing in detail

Dieser Abschnitt ist nicht normativ.

This section is non-normative.

Dieser Abschnitt enthält eine detailierte Untersuchung der im vorherigen Abschnitt beschriebenen Verarbeitungsschritte. Dieser Abschnitt enthält auch Beispiele, die helfen könnten, einige der Schritte zu verdeutlichen.

This section provides an in-depth examination of the processing steps described in the previous section. It also includes examples which may help clarify some of the steps involved.

Der Schlüssel zur Verarbeitung ist die Erzeugung eines Tripels, wann immer eine Prädikat/Objekt-Kombination erkannt wird. Das wirklich erzeugte Tripel wird ein Subjekt enthalten, das vorher gesetzt worden sein könnte, dies wird im aktuellen Evaluierungskontext nachvollzogen und wird das Elternsubjekt genannt. Da das Subjekt als Voreinstellung das aktuelle Dokument sein wird, wenn es nicht ausdrücklich gesetzt wurde, ist eine Prädikat/Objekt-Kombination immer genug, um einen oder mehrere Tripel zu erzeugen.

The key to processing is that a triple is generated whenever a predicate/object combination is detected. The actual triple generated will include a subject that may have been set previously, so this is tracked in the current evaluation context and is called the parent subject. Since the subject will default to the current document if it hasn't been set explicitly, then a predicate/object combination is always enough to generate one or more triples.

Die Attribute, mit denen Prädikate bestimmt werden, sind @rel, @rev und @property, während die Attribute zur Bestimmung eines Objekts @resource, @href, @content und @src sind. Das Attribut @typeof ist in der Weise einzigartig, dass es sowohl Prädikat als auch Objekt zur gleichen Zeit bestimmen kann (und auch ein Subjekt, wenn es in Abwesenheit der anderen Attribute auftaucht, die ein Subjekt bestimmen würden). Auch interner Inhalt eines Elements kann ein Objekt bestimmen, wenn @content nicht vorhanden ist, dafür jedoch @property.

The attributes for setting a predicate are @rel, @rev and @property, whilst the attributes for setting an object are @resource, @href, @content, and @src. @typeof is unique in that it sets both a predicate and an object at the same time (and also a subject when it appears in the absence of other attributes that would set a subject). Inline content might also set an object, if @content is not present, but @property is present.

Es gibt viele Beispiele in diesem Abschnitt. Alle Beispiele sind in XHTML+RDFa geschrieben, jedoch sind die Erklärungen unabhängig von der Wirtsprache relevant.

There are many examples in this section. The examples are all written using XHTML+RDFa. However, the explanations are relevant regardless of the Host Language.

8.1 Den Evaluierungskontext verändern

8.1 Changing the Evaluation Context

8.1.1 Das aktuelle Subjekt bestimmen

8.1.1 Setting the current subject

Wenn Tripel erzeugt werden, werden sie immer in Beziehung zu einer Subjektquelle stehen, die entweder durch neues Subjekt (sofern es Regeln im aktuellen Element gibt, die das Subjekt bestimmt haben) oder Elternsubjekt angegeben wird, je nachdem wie es durch den Evaluierungskontext weitergegeben wurde. Dieser Abschnitt beschäftigt sich mit der genauen Art und Weise, wie diese Werte angegeben werden. Beachten Sie, dass es nicht von Bedeutung ist, wie das Subjekt bestimmt wird, deshalb verwenden wir in diesem Abschnitt die Idee des aktuellen Subjekts, welches entweder neues Subjekt oder Elternsubjekt sein kann.

When triples are created they will always be in relation to a subject resource which is provided either by new subject (if there are rules on the current element that have set a subject) or parent subject, as passed in via the evaluation context. This section looks at the specific ways in which these values are set. Note that it doesn't matter how the subject is set, so in this section we use the idea of the current subject which may be either new subject or parent subject.

8.1.1.1 Das aktuelle Dokument
8.1.1.1 The current document

Wenn die Verarbeitung beginnt, wird das aktuelle Subjekt der IRI des Dokuments sein, das verarbeitet wird, oder ein Wert, der durch einen Mechanismus der Wirtsprache gesetzt wird (zum Beispiel durch das Element base in (X)HTML). Das bedeutet, dass als Voreinstellung jegliche Metadaten, die im Dokument gefunden werden, das Dokument selbst betreffen:

When parsing begins, the current subject will be the IRI of the document being parsed, or a value as set by a Host Language-provided mechanism (e.g., the base element in (X)HTML). This means that by default any metadata found in the document will concern the document itself:

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Blog für Freunde und Familie von Jo</title>
    <link rel="foaf:primaryTopic" href="#bbq" />
    <meta property="dc:creator" content="Jo" />
  </head>
  <body>
    ...
  </body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Jo's Friends and Family Blog</title>
    <link rel="foaf:primaryTopic" href="#bbq" />
    <meta property="dc:creator" content="Jo" />
  </head>
  <body>
    ...
  </body>
</html>

Dieses würde die folgenden Tripel bilden:

This would generate the following triples:

<> foaf:primaryTopic <#bbq> .
<> dc:creator "Jo" .
<> foaf:primaryTopic <#bbq> .
<> dc:creator "Jo" .

Es ist möglich, dass die Daten in einem anderen Teil des Dokuments erscheinen:

It is possible for the data to appear elsewhere in the document:

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Blog von Jo</title>
  </head>
  <body>
    <h1>Blog von <span property="dc:creator">Jo</span></h1>
    <p>
      Willkommen zu meinem Blog.
    </p>
  </body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Jo's Blog</title>
  </head>
  <body>
    <h1><span property="dc:creator">Jo</span><'s Blog/h1>
    <p>
      Welcome to my blog.
    </p>
  </body>
</html>

Welches immer noch das folgende Tripel bilden würde:

which would still generate the triple:

<> dc:creator "Jo" .
<> dc:creator "Jo" .

In (X)HTML könnte der Wert von base den Anfangswert von aktuelles Subjekt verändern:

In (X)HTML the value of base may change the initial value of current subject:

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <base href="http://www.example.org/jo/blog" />
    <title>Jo's Friends and Family Blog</title>
    <link rel="foaf:primaryTopic" href="#bbq" />
    <meta property="dc:creator" content="Jo" />
  </head>
  <body>
    ...
  </body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <base href="http://www.example.org/jo/blog" />
    <title>Jo's Friends and Family Blog</title>
    <link rel="foaf:primaryTopic" href="#bbq" />
    <meta property="dc:creator" content="Jo" />
  </head>
  <body>
    ...
  </body>
</html>

Ein RDFa-Prozessor sollte nun die folgenden Tripel erzeugen, ohne Rücksicht auf den IRI zu nehmen, von dem das Dokument bezogen wird:

An RDFa Processor should now generate the following triples, regardless of the IRI from which the document is served:

<http://www.example.org/jo/blog> foaf:primaryTopic <http://www.example.org//jo/blog#bbq> .
<http://www.example.org/jo/blog> dc:creator "Jo" .
<http://www.example.org/jo/blog> foaf:primaryTopic <http://www.example.org//jo/blog#bbq> .
<http://www.example.org/jo/blog> dc:creator "Jo" .
8.1.1.2 Das Attribut @about verwenden
8.1.1.2 Using @about

Mit fortschreitender Verarbeitung wird jedes @about-Attribut das aktuelle Subjekt verändern. Der Wert von @about ist ein IRI oder ein CURIE. Ist es ein relativer IRI, dann muss er gegen den aktuellen Wert von base aufgelöst werden. Um zu verdeutlichen, wie dies die Aussagen beeinflusst, beachten Sie in diesem Quelltext, wie die Eigenschaften im (X)HTML body-Element Teil eines neuen Kalenderereignisobjekts werden, anstatt sich auf das Dokument zu beziehen, wie sie es im Kopf des Dokuments tun:

As processing progresses, any @about attributes will change the current subject. The value of @about is an IRI or a CURIE. If it is a relative IRI then it needs to be resolved against the current base value. To illustrate how this affects the statements, note in this markup how the properties inside the (X)HTML body element become part of a new calendar event object, rather than referring to the document as they do in the head of the document:

<html xmlns="http://www.w3.org/1999/xhtml"
      prefix="cal: http://www.w3.org/2002/12/cal/ical#">
  <head>
    <title>Blog für Freunde und Familie von Jo</title>
    <link rel="foaf:primaryTopic" href="#bbq" />
    <meta property="dc:creator" content="Jo" />
  </head>
  <body>
    <p about="#bbq" typeof="cal:Vevent">
      Ich veranstalte
      <span property="cal:summary">
        ein letztes Sommergrillfest
      </span>,
      am
      <span property="cal:dtstart" content="2015-09-16T16:00:00-05:00" 
            datatype="xsd:dateTime">
        16. September um 16 Uhr
      </span>.
    </p>
  </body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml"
      prefix="cal: http://www.w3.org/2002/12/cal/ical#">
  <head>
    <title>Jo's Friends and Family Blog</title>
    <link rel="foaf:primaryTopic" href="#bbq" />
    <meta property="dc:creator" content="Jo" />
  </head>
  <body>
    <p about="#bbq" typeof="cal:Vevent">
      I'm holding
      <span property="cal:summary">
        one last summer barbecue
      </span>,
      on
      <span property="cal:dtstart" content="2015-09-16T16:00:00-05:00" 
            datatype="xsd:dateTime">
        September 16th at 4pm
      </span>.
    </p>
  </body>
</html>

Durch diesen Quelltext wird ein RDFa-Prozessor folgende Tripel erzeugen:

With this markup an RDFa Processor will generate the followings triples:

<> foaf:primaryTopic <#bbq> .
<> dc:creator "Jo" .
<#bbq> rdf:type cal:Vevent .
<#bbq> cal:summary "ein letztes Sommergrillfest" .
<#bbq> cal:dtstart "2015-09-16T16:00:00-05:00"^^xsd:dateTime .
<> foaf:primaryTopic <#bbq> .
<> dc:creator "Jo" .
<#bbq> rdf:type cal:Vevent .
<#bbq> cal:summary "one last summer barbecue" .
<#bbq> cal:dtstart "2015-09-16T16:00:00-05:00"^^xsd:dateTime .

Andere Quellarten können verwendet werden, um das aktuelle Subjekt zu bestimmen, nicht nur Verweise auf Internetseiten. Auch wenn es nicht empfohlen wird, könnten E-Mail-Adressen verwendet werden, um eine Person zu repräsentieren:

Other kinds of resources can be used to set the current subject, not just references to web-pages. Although not advised, email addresses might be used to represent a person:

John kennt
<a about="mailto:john@example.org"
  rel="foaf:knows" href="mailto:sue@example.org">Sue</a>.

Sue kennt
<a about="mailto:sue@example.org"
  rel="foaf:knows" href="mailto:jim@example.org">Jim</a>.
John knows
<a about="mailto:john@example.org"
  rel="foaf:knows" href="mailto:sue@example.org">Sue</a>.

Sue knows
<a about="mailto:sue@example.org"
  rel="foaf:knows" href="mailto:jim@example.org">Jim</a>.

Dieses sollte die folgenden Tripel erzeugen:

This should generate the following triples:

<mailto:john@example.org> foaf:knows <mailto:sue@example.org> .
<mailto:sue@example.org> foaf:knows <mailto:jim@example.org> .
<mailto:john@example.org> foaf:knows <mailto:sue@example.org> .
<mailto:sue@example.org> foaf:knows <mailto:jim@example.org> .

In ähnlicher Weise können Autoren Aussagen über Bilder machen:

Similarly, authors may make statements about images:

<div about="photo1.jpg">
  dieses Foto wurde geschossen von
  <span property="dc:creator">Mark Birbeck</span>
</div>
<div about="photo1.jpg">
  this photo was taken by
  <span property="dc:creator">Mark Birbeck</span>
</div>

Dies sollte die folgenden Tripel erzeugen:

which should generate the following triples:

<photo1.jpg> dc:creator "Mark Birbeck" .
<photo1.jpg> dc:creator "Mark Birbeck" .
8.1.1.3 Quellen mit @typeof typisieren
8.1.1.3 Typing resources with @typeof

@typeof definiert die Typisierungstripel. @typeof beschreibt einen anderen Weg, um Prädikate zu bestimmen, da das Prädikat immer rdf:type ist. Dies bedeutet, dass ein Prozessor nur ein Attribut benötigt, den Wert des Typs. Die Frage ist: welche Quelle bekommt diese Typinformationen?

@typeof defines typing triples. @typeof works differently to other ways of setting a predicate since the predicate is always rdf:type, which means that the processor only requires one attribute, the value of the type. The question is: which resource gets these typing information?

Hat das Element ein @about, das einen neuen Kontext für Aussagen erzeugt, werden die Typisierungsbeziehungen für diese Quelle definiert. Zum Bespiel erzeugt das Folgende:

If the element has an @about, which creates a new context for statements, the typing relationships are defined on that resource. For example, the following:

<div about="http://dbpedia.org/resource/Albert_Einstein" typeof="foaf:Person">
  <span property="foaf:name">Albert Einstein</span>
  <span property="foaf:givenName">Albert</span>
</div>
<div about="http://dbpedia.org/resource/Albert_Einstein" typeof="foaf:Person">
  <span property="foaf:name">Albert Einstein</span>
  <span property="foaf:givenName">Albert</span>
</div>

auch den Tripel:

also creates the triple:

<http://dbpedia.org/resource/Albert_Einstein> rdf:type foaf:Person .
<http://dbpedia.org/resource/Albert_Einstein> rdf:type foaf:Person .

Das Attribut @about ist die Hauptquelle für die Typisierung: ist es im Element vorhanden, bestimmt es die Auswirkung von @typeof mit der höchsten Priorität. Ist @about nicht vorhanden, aber wird das Element nur verwendet, um mögliche Subjektquellen zum Beispiel über @resource zu definieren (das heißt es ist kein @rel, @rev oder @property vorhanden), dann wird diese Quelle für die typisierte Quelle verwendet, genauso wie @about.

The @about attribute is the main source for typing; if it is present on an element, it determines the effect of @typeof with the highest priority. If @about is not present, but the element is used only to define possible subject resources via, e.g., @resource (i.e., there is no @rel, @rev, or @property present), then that resource is used for the typed resource, just like @about.

Ist ein @rel vorhanden (und immernoch kein @about) dann wird das ausdrücklich durch @rel definierte Objekt typisiert. Zum Beispiel ist im Fall von:

If an @rel is present (and still no @about) then the explicit object of the triples defined by @rel is typed. For example, in the case of:

<div about="http://dbpedia.org/resource/Albert_Einstein">
  <div rel="dbp:birthPlace" 
      resource="http://dbpedia.org/resource/German_Empire"
      typeof="http://schema.org/Country">
  </div>
</div>
<div about="http://dbpedia.org/resource/Albert_Einstein">
  <div rel="dbp:birthPlace" 
      resource="http://dbpedia.org/resource/German_Empire"
      typeof="http://schema.org/Country">
  </div>
</div>

auch der folgende unter den erzeugten Tripeln:

the generated triples also include:

<http://dbpedia.org/resource/German_Empire> rdf:type <http://schema.org/Country> .
<http://dbpedia.org/resource/German_Empire> rdf:type <http://schema.org/Country> .

Schlussendlich hat auch @typeof die zusätzliche Eigenschaft, einen neuen Kontext für Aussagen zu erzeugen, im Fall, dass kein anderes Attribut irgendeinen definiert. Dies schließt die Erzeugung eines bnodes ein (mehr über bnodes siehe unten). Zum Beispiel könnte ein Autor wünschen, Quelltext für eine Person mit Hilfe des FOAF-Vokabulars zu erstellen, ohne jedoch einen eindeutigen Identifizierer für dieses Item zu haben:

Finally, @typeof also has the additional feature of creating a new context for statements, in case no other attributes define any. This involves generating a new bnode (see below for more about bnodes). For example, an author may wish to create markup for a person using the FOAF vocabulary, but without having a clear identifier for the item:

<div typeof="foaf:Person">
  <span property="foaf:name">Albert Einstein</span>
  <span property="foaf:givenName">Albert</span>
</div>
<div typeof="foaf:Person">
  <span property="foaf:name">Albert Einstein</span>
  <span property="foaf:givenName">Albert</span>
</div>

Dieser Quelltext würde die Erzeugung eines bnode zur Folge haben, der dem Typ foaf:Person entspricht und sowohl die Eigenschaften name und givenName (Vorname) enthält:

This markup would cause a bnode to be created which has a 'type' of foaf:Person, as well as name and given name properties:

_:a rdf:type foaf:Person .
_:a foaf:name "Albert Einstein" .
_:a foaf:givenName "Albert" .
_:a rdf:type foaf:Person .
_:a foaf:name "Albert Einstein" .
_:a foaf:givenName "Albert" .

Diese Verwendung eines “isolierten” @typeof-Attributs könnte als eine Abkürzung für das Folgende angesehen werden:

This usage of “isolated” @typeof may be viewed as a shorthand for:

<div resource="_:a" typeof="foaf:Person">
  <span property="foaf:name">Albert Einstein</span>
  <span property="foaf:givenName">Albert</span>
</div>
<div resource="_:a" typeof="foaf:Person">
  <span property="foaf:name">Albert Einstein</span>
  <span property="foaf:givenName">Albert</span>
</div>

Ahnlich dazu

Similarly,

<div about="http://dbpedia.org/resource/Albert_Einstein">
  <div rel="dbp:birthPlace" typeof="http://schema.org/Country">
    <span property="dbp:conventionalLongName">the German Empire</span>
  </div>
</div>
<div about="http://dbpedia.org/resource/Albert_Einstein">
  <div rel="dbp:birthPlace" typeof="http://schema.org/Country">
    <span property="dbp:conventionalLongName">the German Empire</span>
  </div>
</div>

erzeugt:

generates:

<http://dbpedia.org/resource/Albert_Einstein"> dbp:birthPlace _:b .
_:b dbp:conventionalLongName "the German Empire" .
<http://dbpedia.org/resource/Albert_Einstein"> dbp:birthPlace _:b .
_:b dbp:conventionalLongName "the German Empire" .
Ein bnode ist ein eindeutiger Identifizierer, der nur dem Prozessor zur Verfügung steht und keiner anderen externen Software. Durch die interne Erzeugung von Werten, kann der Prozessor die Eigenschaften für _:a von den Eigenschaften für _:b unterscheiden. Dadurch dass diese Werte nicht an externe Software weitergegeben werden, ist es möglich, die vollständige Kontrolle über die Identifizierer zu behalten, und die Erzeugung weiterer Aussagen über das Item zu verhindern.
A bnode is simply a unique identifier that is only available to the processor, not to any external software. By generating values internally, the processor is able to keep track of properties for _:a as being distinct from _:b. But by not exposing these values to any external software, it is possible to have complete control over the identifier, as well as preventing further statements being made about the item.
8.1.1.3.1 Verkettung mit @property und @typeof
8.1.1.3.1 Chaining with @property and @typeof

Wie im Abschnitt über Verkettung ausdrücklich beschrieben, ist einer der Hauptunterschiede zwischen @property und @rel (oder @rev), dass letzteres Attribut keine Verkettung anstößt. Die einzige Ausnahme dieser Regel besteht, wenn @typeof ebenfalls im Element angegeben ist. In diesem Fall ist die Auswirkung von @property die gleiche wie bei @rel. Zum Beispiel hätte das vorherige Beispiel auch wie folgt aussehen können:

As emphasized in the section on chaining, one of the main differences between @property and @rel (or @rev) is that the former does not induce chaining. The only exception to this rule is when @typeof is also present on the element. In that case the effect of @property is identical to @rel. For example, the previous example could have been written as:

<div about="http://dbpedia.org/resource/Albert_Einstein">
  <div property="dbp:birthPlace" typeof="http://schema.org/Country">
    <span property="dbp:conventionalLongName">the German Empire</span>
  </div>
</div>
<div about="http://dbpedia.org/resource/Albert_Einstein">
  <div property="dbp:birthPlace" typeof="http://schema.org/Country">
    <span property="dbp:conventionalLongName">the German Empire</span>
  </div>
</div>

Das Beispiel oben erzeugt die gleichen Tripel wie vorher. Auch hier kann ein @typeof ohne ein @about oder ein @resource wieder als Abkürzung für ein zusätzliches @resource-Attribut angesehen werden, das sich auf den Identifizierer eines neuen bnodes bezieht.

generating the same triples as before. Here again, a @typeof without an @about or a @resource can be regarded as a shorthand for an additional @resource attribute referring to the identifier of a fresh bnode.

8.1.1.4 Das Subjekt weder mit @about noch mit @typeof bestimmen
8.1.1.4 Determining the subject with neither @about nor @typeof

Wie in den vorhergehenden beiden Abschnitten beschrieben, wird @about immer Vorrang haben und ein neues Subjekt markieren, ist aber kein @about vorhanden, dann wird @typeof die gleiche Aufgabe übernehmen, wenn auch unter Verwendung eines angenommenen Identifizierers, das heißt, einem bnode.

As described in the previous two sections, @about will always take precedence and mark a new subject, but if no @about value is available then @typeof will do the same job, although using an implied identifier, i.e., a bnode.

Sind aber weder @about noch @typeof vorhanden, gibt es mehrere Möglichkeiten, das Subjekt zu erhalten. Eine Möglichkeit besteht darin, das Subjekt von der enthaltenden Aussage zu 'erben', der zu vererbende Wert wird dann entweder explizit oder implizit gesetzt.

But if neither @about or @typeof are present, there are a number of ways that the subject could be arrived at. One of these is to 'inherit' the subject from the containing statement, with the value to be inherited set either explicitly, or implicitly.

8.1.1.4.1 Ein Subjekt von @resource erben
8.1.1.4.1 Inheriting subject from @resource

In den meisten Fällen, in denen ein vererbtes Subjekt gesetzt würde, würde die Elternaussage ein Objekt besitzen, das eine Quelle darstellt. Zurück zu einem früheren Beispiel; hier wurde der lange Name für German_Empire mit dem folgenden Quelltext hinzugefügt:

The most usual way that an inherited subject might get set would be when the parent statement has an object that is a resource. Returning to the earlier example, in which the long name for the German_Empire was added, the following markup was used:

<div about="http://dbpedia.org/resource/Albert_Einstein">
  <span property="foaf:name">Albert Einstein</span>
  <span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
  <div rel="dbp:birthPlace" resource="http://dbpedia.org/resource/German_Empire" />
  <span about="http://dbpedia.org/resource/German_Empire"
    property="dbp:conventionalLongName">the German Empire</span>
</div>
<div about="http://dbpedia.org/resource/Albert_Einstein">
  <span property="foaf:name">Albert Einstein</span>
  <span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
  <div rel="dbp:birthPlace" resource="http://dbpedia.org/resource/German_Empire" />
  <span about="http://dbpedia.org/resource/German_Empire"
    property="dbp:conventionalLongName">the German Empire</span>
</div>

In einem früheren Beispiel für das Deutsche Kaiserreich wurden Subjekt und Objekt durch Weglassen des Attributs @resource verbunden, das Attribut @about diente in diesem Fall zur Bestimmung des Objekts:

In an earlier illustration the subject and object for the German Empire were connected by removing the @resource, relying on the @about to set the object:

<div about="http://dbpedia.org/resource/Albert_Einstein">
  <span property="foaf:name">Albert Einstein</span>
  <span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
  <div rel="dbp:birthPlace">
    <span about="http://dbpedia.org/resource/German_Empire"
      property="dbp:conventionalLongName">the German Empire</span>
  </div>
</div>
<div about="http://dbpedia.org/resource/Albert_Einstein">
  <span property="foaf:name">Albert Einstein</span>
  <span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
  <div rel="dbp:birthPlace">
    <span about="http://dbpedia.org/resource/German_Empire"
      property="dbp:conventionalLongName">the German Empire</span>
  </div>
</div>

Autoren können den gleichen Effekt erzielen, wenn sie das Attribut @about entfernen und das Attribut @resource beibehalten:

but it is also possible for authors to achieve the same effect by removing the @about and leaving the @resource:

<div about="http://dbpedia.org/resource/Albert_Einstein">
  <span property="foaf:name">Albert Einstein</span>
  <span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
  <div rel="dbp:birthPlace" resource="http://dbpedia.org/resource/German_Empire">
    <span property="dbp:conventionalLongName">the German Empire</span>
  </div>
</div>
<div about="http://dbpedia.org/resource/Albert_Einstein">
  <span property="foaf:name">Albert Einstein</span>
  <span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
  <div rel="dbp:birthPlace" resource="http://dbpedia.org/resource/German_Empire">
    <span property="dbp:conventionalLongName">the German Empire</span>
  </div>
</div>

In dieser Situation werden alle Aussagen, die in der Objektquelle 'enthalten' sind, das gleiche Subjekt haben. Die Objektquelle ist jene, die das German Empire (der Wert von @resource) repräsentiert. So wird es Autoren einfach gemacht, zusätzliche Aussagen hinzuzufügen:

In this situation, all statements that are 'contained' by the object resource representing the German Empire (the value in @resource) will have the same subject, making it easy for authors to add additional statements:

<div about="http://dbpedia.org/resource/Albert_Einstein">
  <span property="foaf:name">Albert Einstein</span>
  <span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
  <div rel="dbp:birthPlace" resource="http://dbpedia.org/resource/German_Empire">
    <span property="dbp:conventionalLongName">the German Empire</span>
    <span rel="dbp-owl:capital" resource="http://dbpedia.org/resource/Berlin" />
  </div>
</div>
<div about="http://dbpedia.org/resource/Albert_Einstein">
  <span property="foaf:name">Albert Einstein</span>
  <span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
  <div rel="dbp:birthPlace" resource="http://dbpedia.org/resource/German_Empire">
    <span property="dbp:conventionalLongName">the German Empire</span>
    <span rel="dbp-owl:capital" resource="http://dbpedia.org/resource/Berlin" />
  </div>
</div>

Ein Blick auf die Tripel, die ein RDFa-Prozessor erzeugen würde, zeigt uns, dass die Aussagen in zwei Gruppen aufgeteilt sind; die Aussagen der ersten Gruppe beziehen sich auf das Attribut @about, das sie enthält:

Looking at the triples that an RDFa Processor would generate, we can see that we actually have two groups of statements; the first group are set to refer to the @about that contains them:

<http://dbpedia.org/resource/Albert_Einstein> foaf:name "Albert Einstein" .
<http://dbpedia.org/resource/Albert_Einstein> dbp:dateOfBirth "1879-03-14"^^xsd:date .
<http://dbpedia.org/resource/Albert_Einstein> dbp:birthPlace <http://dbpedia.org/resource/German_Empire> .
<http://dbpedia.org/resource/Albert_Einstein> foaf:name "Albert Einstein" .
<http://dbpedia.org/resource/Albert_Einstein> dbp:dateOfBirth "1879-03-14"^^xsd:date .
<http://dbpedia.org/resource/Albert_Einstein> dbp:birthPlace <http://dbpedia.org/resource/German_Empire> .

während die Aussagen der zweiten Gruppe sich auf das Attribut @resource beziehen, das sie enthält:

whilst the second group refer to the @resource that contains them:

<http://dbpedia.org/resource/German_Empire>
  dbp:conventionalLongName "the German Empire" .
<http://dbpedia.org/resource/German_Empire>
  dbp-owl:capital <http://dbpedia.org/resource/Berlin> .
<http://dbpedia.org/resource/German_Empire>
  dbp:conventionalLongName "the German Empire" .
<http://dbpedia.org/resource/German_Empire>
  dbp-owl:capital <http://dbpedia.org/resource/Berlin> .

Beachten Sie, dass das hier beschriebene Prizip ebenfalls für @src und @href zutrifft.

Note also that the same principle described here applies to @src and @href.

8.1.1.4.2 Ein anonymes Subjekt erben
8.1.1.4.2 Inheriting an anonymous subject

Es wird vorkommen, dass ein Autor Subjekt und Objekt wie oben beschrieben verknüpfen möchte, jedoch der gemeinsamen Quelle von zwei Aussagen keinen Namen gibt (zum Beispiel dem Objekt der ersten Aussage, das Subjekt der zweiten ist). Um zum Beispiel anzugeben, dass Einstein von Spinoza beeinflusst wurde, könnte gut der folgende Quelltext angegeben werden:

There will be occasions when the author wants to connect the subject and object as shown above, but is not concerned to name the resource that is common to the two statements (i.e., the object of the first statement, which is the subject of the second). For example, to indicate that Einstein was influenced by Spinoza the following markup could well be used:

<div about="http://dbpedia.org/resource/Baruch_Spinoza" rel="dbp-owl:influenced">
  <div about="http://dbpedia.org/resource/Albert_Einstein">
    <span property="foaf:name">Albert Einstein</span>
    <span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
  </div>
</div>

Ein RDFa-Prozessor wird die folgenden Tripel erzeugen:

An RDFa Processor will generate the following triples:

<http://dbpedia.org/resource/Baruch_Spinoza>
  dbp-owl:influenced <http://dbpedia.org/resource/Albert_Einstein> .
<http://dbpedia.org/resource/Albert_Einstein> foaf:name "Albert Einstein" .
<http://dbpedia.org/resource/Albert_Einstein> dbp:dateOfBirth "1879-03-14"^^xsd:date .

Jedoch könnte ein Autor auch einfach sagen, dass Spinoza irgendetwas mit dem Namen Albert Einstein, das am 14. März 1879 geboren wurde beeinflusst hat:

However, an author could just as easily say that Spinoza influenced something by the name of Albert Einstein, that was born on March 14th, 1879:

<div about="http://dbpedia.org/resource/Baruch_Spinoza" rel="dbp-owl:influenced">
  <div>
    <span property="foaf:name">Albert Einstein</span>
    <span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
  </div>
</div>

Im Sinne von RDF ist das Item, das Einstein 'repräsentiert' anonym, weil es keinen IRI zur Identifizierung hat. Jedoch wird dem Item ein automatisch erzeugter bnode zugeordnet, und an diesen Identifizierer werden die Kindelemente angehängt:

In RDF terms, the item that 'represents' Einstein is anonymous, since it has no IRI to identify it. However, the item is given an automatically generated bnode, and it is onto this identifier that all child statements are attached:

Ein RDFa-Prozessor wird die folgenden Tripel erzeugen:

An RDFa Processor will generate the following triples:

<http://dbpedia.org/resource/Baruch_Spinoza> dbp-owl:influenced _:a .
_:a foaf:name "Albert Einstein" .
_:a dbp:dateOfBirth "1879-03-14"^^xsd:date .

Beachten Sie, dass das div überflüssig ist, und ein RDFa-Prozessor selbst dann ein Zwischenglied erzeugen wird, wenn das Element entfernt wird:

Note that the div is superfluous, and an RDFa Processor will create the intermediate object even if the element is removed:

<div about="http://dbpedia.org/resource/Baruch_Spinoza" rel="dbp-owl:influenced">
  <span property="foaf:name">Albert Einstein</span>
  <span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
</div>

Eine alternative Vorgehensweise behält das div und verschiebt das @rel in dieses Element:

An alternative pattern is to keep the div and move the @rel onto it:

<div about="http://dbpedia.org/resource/Baruch_Spinoza">
  <div rel="dbp-owl:influenced">
    <span property="foaf:name">Albert Einstein</span>
    <span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
  </div>
</div>

In Bezug auf den Quelltext ist das letztere Layout zu bevorzugen, weil es die Aufmerksamkeit auf das 'hängende rel' lenkt. Jedoch müssen von Seiten des RDFa-Prozessors all diese Schreibweisen unterstützt werden.

From the point of view of the markup, this latter layout is to be preferred, since it draws attention to the 'hanging rel'. But from the point of view of an RDFa Processor, all of these permutations need to be supported.

8.2 Unvollständige Tripel vervollständigen

8.2 Completing incomplete triples

Wird ein neues Subjekt bestimmt, wird es auch dazu verwendet, jegliche Tripel zu vervollständigen, die noch ausstehen. Diese Situation tritt auf, wenn der Autor zahlreiche Aussagen 'verketten' möchte. Zum Beispiel könnte ein Autor eine Aussage haben, dass Albert Einstein im Deutschen Kaiserreich (German Empire) geboren wurde:

When a new subject is calculated, it is also used to complete any incomplete triples that are pending. This situation arises when the author wants to 'chain' a number of statements together. For example, an author could have a statement that Albert Einstein was born in the German Empire:

<div about="http://dbpedia.org/resource/Albert_Einstein">
  <span property="foaf:name">Albert Einstein</span>
  <span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
  <div rel="dbp:birthPlace" resource="http://dbpedia.org/resource/German_Empire" />
</div>

und dann eine weitere Aussage, dass der lange Name (long name) für dieses Land the German Empire ist:

and then a further statement that the 'long name' for this country is the German Empire:

<span about="http://dbpedia.org/resource/German_Empire"
  property="dbp:conventionalLongName">the German Empire</span>

Mit RDFa kann der Autor diese Aussage als eine selbstbeinhaltende Einheit in einen anderen Kontext einfügen:

RDFa allows authors to insert this statement as a self-contained unit into other contexts:

<div about="http://dbpedia.org/resource/Albert_Einstein">
  <span property="foaf:name">Albert Einstein</span>
  <span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
  <div rel="dbp:birthPlace" resource="http://dbpedia.org/resource/German_Empire" />
  <span about="http://dbpedia.org/resource/German_Empire"
    property="dbp:conventionalLongName">the German Empire</span>
</div>

RDFa ermöglicht Autoren allerdings auch, unnötige Wiederholungen zu vermeiden und doppelte Identifizierer zu 'normalisieren', in diesem Fall den Identifizierer für 'German Empire':

But it also allows authors to avoid unnecessary repetition and to 'normalize' out duplicate identifiers, in this case the one for the German Empire:

<div about="http://dbpedia.org/resource/Albert_Einstein">
  <span property="foaf:name">Albert Einstein</span>
  <span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
  <div rel="dbp:birthPlace">
    <span about="http://dbpedia.org/resource/German_Empire"
      property="dbp:conventionalLongName">the German Empire</span>
  </div>
</div>

Wenn dies passiert, dann wird das @rel für 'birth place' als ein 'hängendes rel' betrachtet, weil es bisher noch keine Tripel erzeugt hat, aber diese 'unvollständigen Tripel' werden von dem @about vervollständigt, das in der nächsten Zeile erscheint. Der erste Schritt ist demnach, die beiden Teile des Tripels zu speichern, die der RDFa-Prozessor bereits hat, aber ohne ein Objekt:

When this happens the @rel for 'birth place' is regarded as a 'hanging rel' because it has not yet generated any triples, but these 'incomplete triples' are completed by the @about that appears on the next line. The first step is therefore to store the two parts of the triple that the RDFa Processor does have, but without an object:

<http://dbpedia.org/resource/Albert_Einstein> dbp:birthPlace ? .

Dann fährt die Verarbeitung fort, der RDFa-Prozessor stößt auf das Subjekt der Aussage über den langen Namen für 'German Empire' und dieser wird auf zwei verschiedene Weisen verwendet. Zuerst wird es verwendet, um das 'unvollständige Tripel' zu vervollständigen:

Then as processing continues, the RDFa Processor encounters the subject of the statement about the long name for the German Empire, and this is used in two ways. First it is used to complete the 'incomplete triple':

<http://dbpedia.org/resource/Albert_Einstein> 
      dbp:birthPlace <http://dbpedia.org/resource/German_Empire> .

und zweitens wird es verwendet, um das sein eigenes Tripel zu erzeugen:

and second it is used to generate its own triple:

<http://dbpedia.org/resource/German_Empire> 
      dbp:conventionalLongName "the German Empire" .

Beachten Sie, dass beim Auftauchen von @about alle unvollständigen Tripel vervollständigt werden. Um zum Beispiel die Tatsache zu illustrieren, dass Albert Einstein sowohl eine Residenz im Deutschen Kaiserreich (German Empire) als auch in der Schweiz (Switzerland) hatte, muss ein Autor nur einen @rel-Wert angeben, der dann mit mehreren @about-Werten verwendet wird:

Note that each occurrence of @about will complete any incomplete triples. For example, to mark up the fact that Albert Einstein had a residence both in the German Empire and Switzerland, an author need only specify one @rel value that is then used with multiple @about values:

<div about="http://dbpedia.org/resource/Albert_Einstein" rel="dbp-owl:residence">
  <span about="http://dbpedia.org/resource/German_Empire" />
  <span about="http://dbpedia.org/resource/Switzerland" />
</div>

In diesem Beispiel gibt es ein unvollständiges Tripel:

In this example there is one incomplete triple:

<http://dbpedia.org/resource/Albert_Einstein> dbp-owl:residence ? .

Wenn der Prozessor auf jeden einzelnen @about-Wert trifft, wird dieses Tripel vervollständigt, mit dem Ergebnis:

When the processor meets each of the @about values, this triple is completed, giving:

<http://dbpedia.org/resource/Albert_Einstein>
  dbp-owl:residence <http://dbpedia.org/resource/German_Empire> .
<http://dbpedia.org/resource/Albert_Einstein>
  dbp-owl:residence <http://dbpedia.org/resource/Switzerland> .

Diese Beispiele zeigen, wie @about Tripel vervollständigt, es gibt jedoch auch andere Möglichkeiten, diesen Effekt zu erzielen. Zum Beispiel wenn @typeof einen neuen bnode erzeugt (wie oben beschrieben), der verwendet wird, um jegliche 'unvollständigen Tripel' zu vervollständigen. Der folgende Quelltext veranschaulicht, wie angezeigt werden kann, dass Spinoza sowohl Einstein als auch Schopenhauer beeinflusst hat:

These examples show how @about completes triples, but there are other situations that can have the same effect. For example, when @typeof creates a new bnode (as described above), that will be used to complete any 'incomplete triples'. To illustrate, to indicate that Spinoza influenced both Einstein and Schopenhauer, the following markup could be used:

<div about="http://dbpedia.org/resource/Baruch_Spinoza">
  <div rel="dbp-owl:influenced">
    <div typeof="foaf:Person">
      <span property="foaf:name">Albert Einstein</span>
      <span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
    </div>
    <div typeof="foaf:Person">
      <span property="foaf:name">Arthur Schopenhauer</span>
      <span property="dbp:dateOfBirth" datatype="xsd:date">1788-02-22</span>
    </div>          
  </div>
</div>

Zuerst wird das folgende unvollständige Tripel gespeichert:

First the following incomplete triple is stored:

<http://dbpedia.org/resource/Baruch_Spinoza> dbp-owl:influenced ? .

Wenn der RDFa-Prozessor dann die beiden vorkommenden @typeof-Attribute verarbeitet, erzeugt jedes einzelne einen bnode, der verwendet wird, um beide 'unvollständige Tripel' zu vervollständigen und um das Subjekt für weitere Aussagen zu bestimmen:

Then when the RDFa Processor processes the two occurrences of @typeof, each generates a bnode, which is used to both complete the 'incomplete triple', and to set the subject for further statements:

<http://dbpedia.org/resource/Baruch_Spinoza"> dbp-owl:influenced _:a .
_:a rdf:type foaf:Person .
_:a foaf:name "Albert Einstein" .
_:a dbp:dateOfBirth "1879-03-14"^^xsd:date .
<http://dbpedia.org/resource/Baruch_Spinoza"> dbp-owl:influenced _:b .
_:b rdf:type foaf:Person .
_:b foaf:name "Arthur Schopenhauer" .
_:b dbp:dateOfBirth "1788-02-22"^^xsd:date .

Tripel werden auch dann 'vervollstädigt' wenn eines der Attribute @property, @rel oder @rev vorhanden ist. Jedoch werden, anders als beim Vorhandensein von @about oder @typeof, alle Prädikate an einen bnode angehängt:

Triples are also 'completed' if any one of @property, @rel or @rev are present. However, unlike the situation when @about or @typeof are present, all predicates are attached to one bnode:

<div about="http://dbpedia.org/resource/Baruch_Spinoza" rel="dbp-owl:influenced">
  <span property="foaf:name">Albert Einstein</span>
  <span property="dbp:dateOfBirth" datatype="xsd:date">1879-03-14</span>
  <div rel="dbp-owl:residence">
    <span about="http://dbpedia.org/resource/German_Empire" />
    <span about="http://dbpedia.org/resource/Switzerland" />
  </div>
</div>

Dieses Beispiel hat zwei 'hängende rels', und so wird in zwei Fällen ein 'unvollständiger Tripel' erzeugt. Die Verarbeitung würde wie folgt ablaufen; zuerst wird ein unvollständiges Tripel gespeichert:

This example has two 'hanging rels', and so two situations when 'incomplete triples' will be created. Processing would proceed as follows; first an incomplete triple is stored:

<http://dbpedia.org/resource/Baruch_Spinoza> dbp-owl:influenced ? .

Als nächstes verarbeitet der RDFa-Prozessor die Prädikatwerte für foaf:name, dbp:dateOfBirth und dbp-owl:residence, aber beachten Sie, dass nur der erste Wert das 'hängende rel' vervollständigen muss. Damit erzeugt die Verarbeitung von foaf:name zwei Tripel:

Next, the RDFa Processor processes the predicate values for foaf:name, dbp:dateOfBirth and dbp-owl:residence, but note that only the first needs to 'complete' the 'hanging rel'. So processing foaf:name generates two triples:

<http://dbpedia.org/resource/Baruch_Spinoza> dbp-owl:influenced _:a .
_:a foaf:name "Albert Einstein" .

aber die Verarbeitung von dbp:dateOfBirth erzeugt nur ein Tripel:

but processing dbp:dateOfBirth generates only one:

_:a dbp:dateOfBirth "1879-03-14"^^xsd:date .

Die Verarbeitung von dbp-owl:residence verwendet auch den gleichen bnode, aber beachten Sie, dass es zusätzlich sein eigenes 'unvollständiges Tripel' erzeugt:

Processing dbp-owl:residence also uses the same bnode, but note that it also generates its own 'incomplete triple':

_:a dbp-owl:residence ? .

Wie zuvor vervollständigen die beiden auftauchenden Attribute @about das 'unvollständige Tripel' jeweils einmal:

As before, the two occurrences of @about complete the 'incomplete triple', once each:

_:a dbp-owl:residence <http://dbpedia.org/resource/German_Empire> .
_:a dbp-owl:residence <http://dbpedia.org/resource/Switzerland> .

Die vollständige Zusammenstellung aller Tripel, die ein RDFa-Prozessor erzeugen sollte, ist wie folgt:

The entire set of triples that an RDFa Processor should generate are as follows:

<http://dbpedia.org/resource/Baruch_Spinoza> dbp-owl:influenced _:a .
_:a foaf:name "Albert Einstein" .
_:a dbp:dateOfBirth "1879-03-14"^^xsd:date .
_:a dbp-owl:residence <http://dbpedia.org/resource/German_Empire> .
_:a dbp-owl:residence <http://dbpedia.org/resource/Switzerland> .

8.3 Objektauflösung

8.3 Object resolution

Auch wenn Objekte in vorhergehenden Abschnitten als Teil der Erläuterungen zur Subjektauflösung, Verkettung, Evaluierungskontexten und so weiter besprochen wurden, wird dieser Abschnitt Objekte genauer untersuchen.

Although objects have been discussed in the previous sections, as part of the explanation of subject resolution, chaining, evaluation contexts, and so on, this section will look at objects in more detail.

Es gibt zwei Objektarten, IRI-Quellen und Literale.

There are two types of object, IRI resources and literals.

Ein Literalobjekt kann entweder durch @content oder durch den Inline-Text des Elements bestimmt werden, sofern @property ein Prädikat bestimmt. Beachten Sie, dass die Verwendung von @content reichen Quelltext im enthaltenen Literal verbietet. Vertritt der vom Element umschlossene Text (Inline-Text) die Bedeutung des Objekts, dann sollten Dokumente sich dessen bedienen, statt die Daten durch Verwendung des Attributs @content zu duplizieren.

A literal object can be set by using @property to express a predicate, and then using either @content, or the inline text of the element that @property is on. Note that the use of @content prohibits the inclusion of rich markup in your literal. If the inline content of an element accurately represents the object, then documents should rely upon that rather than duplicating that data using the @content.

Ein IRI-Quellobjekt wird verwendet, wenn @rel oder @rev ein Prädikat bestimmen. Dann werden entweder @href, @resource oder @src verwendet, um eine explizite Objektquelle anzugeben. Oder es werden die oben beschriebenen Verkettungstechniken verwendet, um ein Objekt aus einem verschachtelten Subjekt oder einem bnode zu erhalten. Alternativ kann auch das Attribut @property in der Gegenwart von @href, @resource oder @src verwendet werden, um eine IRI-Quelle zu definieren, dies bedingt die Abwesenheit von @rel, @rev, @datatype, oder @content.

A IRI resource object can be set using one of @rel or @rev to express a predicate, and then either using one of @href, @resource or @src to provide an object resource explicitly, or using the chaining techniques described above to obtain an object from a nested subject, or from a bnode. Alternatively, the @property can also be used to define an IRI resource, in the presence of an @href, @resource, or @src and in the absence of @rel, @rev, @datatype, or @content.

8.3.1 Objektauflösung für das Attribut @property

8.3.1 Object resolution for the @property attribute

Ein Objektliteral wird erzeugt, wenn @property vorhanden ist (und kein Quellenattribut vorhanden ist). Das Attribut @property stellt das Prädikat und die folgenden Abschnitte beschreiben wie das letztendlich zu erzeugende Literal bestimmt wird.

An object literal will be generated when @property is present (and no resource attribute is present). @property provides the predicate, and the following sections describe how the actual literal to be generated is determined.

8.3.1.1 Einfache Literale
8.3.1.1 Plain Literals

Das Attribut @content kann wie folgt verwendet werden, um ein einfaches Literal anzuzeigen:

@content can be used to indicate a plain literal, as follows:

<meta about="http://internet-apps.blogspot.com/"
  property="dc:creator" content="Mark Birbeck" />

Das einfache Literal kann auch durch Verwendung des Elementinhaltes bestimmt werden:

The plain literal can also be specified by using the content of the element:

<span about="http://internet-apps.blogspot.com/"
  property="dc:creator">Mark Birbeck</span>

Beide Beispiele ergeben das folgende Tripel:

Both of these examples give the following triple:

<http://internet-apps.blogspot.com/> dc:creator "Mark Birbeck" .

Der Wert von @content wird jeglichem Elementinhalt vorgezogen, deshalb würde das Folgende dasselbe Tripel erzeugen wie oben angegeben:

The value of @content is given precedence over any element content, so the following would give exactly the same triple as shown above:

<span about="http://internet-apps.blogspot.com/"
  property="dc:creator" content="Mark Birbeck">John Doe</span>
8.3.1.1.1 Sprach-Tags
8.3.1.1.1 Language Tags

In RDF können einfache Literale ein Sprach-Tag besitzen, so wie es im folgenden Beispiel aus der Sammlung der [RDF-Tests] dargestellt ist:

RDF allows plain literals to have a language tag, as illustrated by the following example from [RDF-TESTCASES]:

<http://example.org/node> 
  <http://example.org/property> "chat"@fr .

In RDFa kann die Wirtsprache einen Mechanismus zur Angabe des Sprach-Tags bereitstellen. In XHTML+RDFa [XHTML-RDFA] wird zum Beispiel das XML-Attribut @xml:lang oder das Attribut @lang verwendet, um diese Information hinzuzufügen, unabhängig davon, ob das einfache Literal von @content oder vom Inline-Text des Elements angegeben wird:

In RDFa the Host Language may provide a mechanism for setting the language tag. In XHTML+RDFa [XHTML-RDFA], for example, the XML language attribute @xml:lang or the attribute @lang is used to add this information, whether the plain literal is designated by @content, or by the inline text of the element:

<meta about="http://example.org/node"
  property="ex:property" xml:lang="fr" content="chat" />

Beachten Sie, dass der Sprachwert vererbt werden kann wie es in [XML10-4e] definiert ist, deshalb erzeugt die folgende Syntax das gleiche Tripel wie oben:

Note that the language value can be inherited as defined in [XML10-4e], so the following syntax will give the same triple as above:

<html xmlns="http://www.w3.org/1999/xhtml" 
      prefix="ex: http://www.example.com/ns/" xml:lang="fr">
  <head>
    <title xml:lang="en">Example</title>
    <meta about="http://example.org/node"
      property="ex:property" content="chat" />
  </head>
  ...
</html>
8.3.1.2 Typisierte Literale
8.3.1.2 Typed literals

Literalen kann mit dem Attribut @datatype ein Datentyp zugewiesen werden.

Literals can be given a data type using @datatype.

Dies kann in RDFa wie folgt dargestellt werden:

This can be represented in RDFa as follows:

<span property="cal:dtstart" content="2015-09-16T16:00:00-05:00" 
      datatype="xsd:dateTime">
  16. September um 16 Uhr
</span>.
<span property="cal:dtstart" content="2015-09-16T16:00:00-05:00" 
      datatype="xsd:dateTime">
  September 16th at 4pm
</span>.

Die Tripel, die durch diesen Quelltext erzeugt werden, beinhalten den Datentypen nach dem Literal:

The triples that this markup generates include the datatype after the literal:

<> cal:dtstart "2015-09-16T16:00:00-05:00"^^xsd:dateTime .
8.3.1.3 XML-Literale
8.3.1.3 XML Literals

XML-Dokumente dürfen keinen XML-Quelltext in ihren Attributen enthalten, das heißt, es ist nicht möglich, XML innerhalb von @content darzustellen (das Folgende würde einen XML-Parser veranlassen, eine Fehlermeldung auszugeben:

XML documents cannot contain XML markup in their attributes, which means it is not possible to represent XML within @content (the following would cause an XML parser to generate an error):

<head>
  <meta property="dc:title"
    content="E = mc<sup>2</sup>: The Most Urgent Problem of Our Time" />
</head>

RDFa beschreibt XML-Literale deshalb mit normalem Quelltext unter Zuhilfenahme von @datatype:

RDFa therefore supports the use of normal markup to express XML literals, by using @datatype:

<h2 property="dc:title" datatype="rdf:XMLLiteral">
  E = mc<sup>2</sup>: The Most Urgent Problem of Our Time
</h2>

Dieses würde das folgende Tripel erzeugen, in dem das XML im Literal erhalten bleibt:

This would generate the following triple, with the XML preserved in the literal:

<> dc:title "E = mc<sup>2</sup>: The Most Urgent Problem of Our Time"^^rdf:XMLLiteral .

Dies erfordert, dass eine IRI-Abbildung für das Präfix rdf definiert worden ist.

This requires that an IRI mapping for the prefix rdf has been defined.

In dem hier beschriebenen Beispiel ist das Element sup Teil der Bedeutung des Literals, aber es wird Fälle geben, in denen dieser zusätzliche Quelltext keine Bedeutung hat und infolgedessen ignoriert werden kann. In diesem Fall kann durch Weglassen des Attributs @datatype oder durch Angabe eines leeren Wertes fürs @datatype, ein einfaches Literal erzeugt werden:

In the examples given here the sup element is actually part of the meaning of the literal, but there will be situations where the extra markup means nothing, and can therefore be ignored. In this situation omitting the @datatype attribute or specifying an empty @datatype value can be used create a plain literal:

<p>You searched for <strong>Einstein</strong>:</p>
<p about="http://dbpedia.org/resource/Albert_Einstein">
  <span property="foaf:name" datatype="">Albert <strong>Einstein</strong></span>
  (b. March 14, 1879, d. April 18, 1955) was a German-born theoretical physicist.
</p>

Die Darstellung dieser Seite hat den Begriff hervorgehoben, nach dem der Benutzer gesucht hat. Die Angabe einer leeren Zeichenkette für @datatype stellt sicher, dass die Daten als einfaches Literal interpretiert werden. Das folgende Tripel wird erzeugt:

Although the rendering of this page has highlighted the term the user searched for, setting @datatype to nothing ensures that the data is interpreted as a plain literal, giving the following triples:

<http://dbpedia.org/resource/Albert_Einstein> foaf:name "Albert Einstein" .

Der Wert dieses XML-Literals wird nach den Regeln aus "Exclusive XML Canonicalization Version 1.0" [XML-EXC-C14N] aus dem Wert des RDFa-Elements bestimmt.

The value of this XML Literal is the exclusive canonicalization [XML-EXC-C14N] of the RDFa element's value.

8.3.2 IRI-Objektauflösung

8.3.2 IRI object resolution

Die meisten Regeln, die die Verarbeitung von Objekten betreffen, die Quellen sind, sind in den Verarbeitungsrichtlinien oben zu finden, da sie wichtig für die Bestimmung des Subjekts sind. Dieser Abschnitt soll allgemeine Konzepte beleuchten und alles, was zuvor ausgelassen worden sein könnte.

Most of the rules governing the processing of objects that are resources are to be found in the processing descriptions given above, since they are important for establishing the subject. This section aims to highlight general concepts, and anything that might have been missed.

Ein oder mehrere IRI-Objekte werden gebraucht, wenn @rel oder @rev vorhanden sind. Jedes Attribut wird die Erzeugung eines Tripels anstoßen, wenn es mit @href, @resource oder @src verwendet wird, oder mit dem Subjektwert einer jeden verschachtelten Aussage, wenn keine dieser Attribute vorhanden sind.

One or more IRI objects are needed when @rel or @rev is present. Each attribute will cause triples to be generated when used with @href, @resource or @src, or with the subject value of any nested statement if none of these attributes are present.

Sind @rel oder @rev nicht vorhanden und weder @datatype noch @content, wird ein @property-Attribut die Erzeugung von Tripeln anstoßen, wenn es mit @href, @resource oder @src verwendet wird. (Beachten Sie auch den Abschnitt über @property und @typeof, der einen besonderen Fall betrachtet, der @property betrifft.)

If @rel or @rev is not present, and neither is @datatype or @content, a @property attribute will cause triples to be generated when used with @href, @resource or @src. (See also the section on @property and @typeof for an additional special case involving @property.)

Die Attribute @rel und @rev sind im Grunde genommen das Gegenteil des jeweils anderen, während @rel eine Beziehung zwischen dem aktuellen Subjekt als Subjekt und der aktuellen Objektquelle als Objekt herstellt, macht @rev das genaue Gegenteil und verwendet die aktuelle Objektquelle als Subjekt und das aktuelle Subjekt als Objekt.

@rel and @rev are essentially the inverse of each other; whilst @rel establishes a relationship between the current subject as subject, and the current object resource as the object, @rev does the exact opposite, and uses the current object resource as the subject, and the current subject as the object.

8.3.2.1 Das Attribut @resource zur Bestimmung des Objekts verwenden
8.3.2.1 Using @resource to set the object

RDFa stellt das Attribut @resource als einen Weg zur Verfügung, um das Objekt von Aussagen zu bestimmen. Das ist besonders wertvoll, wenn auf Quellen verwiesen wird, die ihrerseits keine verfolgbaren Verweise sind:

RDFa provides the @resource attribute as a way to set the object of statements. This is particularly useful when referring to resources that are not themselves navigable links:

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>On Crime and Punishment</title>
    <base href="http://www.example.com/candp.xhtml" />
  </head>
  <body>
    <blockquote about="#q1" rel="dc:source" resource="urn:ISBN:0140449132" >
      <p id="q1">
        Rodion Romanovitch! My dear friend! If you go on in this way
        you will go mad, I am positive! Drink, pray, if only a few drops!
      </p>
    </blockquote>
  </body>
</html>

Das Element blockquote erzeugt das folgende Tripel:

The blockquote element generates the following triple:

<http://www.example.com/candp.xhtml#q1>
  <http://purl.org/dc/terms/source> <urn:ISBN:0140449132> .

Beachten Sie, um das gleiche Tripel zu erzielen, hätte in dem oben gezeigten Beispiel auch @property anstatt @rel verwendet werden können.

Note that, in the example above, @property could have been used instead of @rel, yielding the same triple.

8.3.2.2 Die Attribute @href oder @src zur Bestimmung des Subjekts Objekts (Errata) verwenden
8.3.2.2 Using @href or @src to set the subject

Ist kein @resource vorhanden, dann stehen @href oder @src als nächste in der Reihenfolge, um das Objekt zu bestimmen.

If no @resource is present, then @href or @src are next in priority order for setting the object.

Wenn ein Prädikat durch @rel bestimmt wurde, dann werden @href oder @src im Element der RDFa-Aussage verwendet, um das Objekt mit einem IRI-Verweis zu identifizieren. Sie (@href und @src) sind vom Typ IRI:

When a predicate has been expressed using @rel, the @href or @src on the RDFa statement's element is used to identify the object with a IRI reference. Their types are an IRI:

<link about="mailto:john@example.org"
      rel="foaf:knows" href="mailto:sue@example.org" />

Es ist möglich, sowohl @rel als auch @rev zur gleichen Zeit in einem Element zu verwenden. Dies ist besonders nützlich, wenn zwei Dinge in zwei unterschiedlichen Beziehungen zueinander stehen. Wenn zum Beispiel ein Foto durch Mark aufgenommen wurde, dieses Foto ihn aber auch bildlich darstellt:

It's also possible to use both @rel and @rev at the same time on an element. This is particularly useful when two things stand in two different relationships with each other, for example when a picture is taken by Mark, but that picture also depicts him:

<img about="http://www.blogger.com/profile/1109404"
    src="photo1.jpg" rev="dc:creator" rel="foaf:img"/>

Welches dann zwei Tripel erzeugt:

which then yields two triples:

<photo1.jpg> 
  dc:creator <http://www.blogger.com/profile/1109404> .
<http://www.blogger.com/profile/1109404> 
  foaf:img <photo1.jpg> .
8.3.2.3 Unvollständige Tripel
8.3.2.3 Incomplete triples

Wurde das Prädikat eines Tripels durch @rel oder @rev ausgedrückt, ist aber kein @href, @src, oder @resource im gleichen Element vorhanden, dann gibt es ein 'hängendes rel'. Dadurch wird das aktuelle Subjekt und alle möglichen Prädikate (mit einem Indikator, ob sie 'vorwärts' sind, das heißt bei @rel-Werten oder 'rückwärts', das heißt bei @rev-Werten) als 'unvollständige Tripel' gespeichert, die auf die Entdeckung eines Subjekts warten, das verwendet werden könnte, um jene Tripel 'zu vervollständigen'.

When a triple predicate has been expressed using @rel or @rev, but no @href, @src, or @resource exists on the same element, there is a 'hanging rel'. This causes the current subject and all possible predicates (with an indicator of whether they are 'forwards, i.e., @rel values, or not, i.e., @rev values), to be stored as 'incomplete triples' pending discovery of a subject that could be used to 'complete' those triples.

Dieser Prozess wird genauer im Abschnitt 'Unvollständige Tripel' vervollständigen beschrieben.

This process is described in more detail in Completing 'Incomplete Triples'.

8.4 Listenerzeugung

8.4 List Generation

Ein RDF-Graph ist eine Zusammenstellung von Tripeln. Enthält ein Graph zwei Tripel, die das gleiche Subjekt und Prädikat teilen:

An RDF graph is a collection of triples. This also means that if the graph contains two triples sharing the same subject and predicate:

<http://www.example.com> <http://www.example.com/predicate> "first object", "second object" ;

bedeutet das auch, dass es keinen Weg für eine Anwendung gibt, auf die jeweilige Reihenfolge von zwei Tripeln zu vertrauen, wenn zum Beispiel eine Datenbank abgefragt wird, die diese Tripel enthält. Für die meisten Anwendungen und Datenzusammenstellungen ist dies kein Problem, in einigen Fällen ist die Reihenfolge jedoch wichtig. Ein typisches Beispiel sind Publikationen: Wenn ein Buch oder ein Artikel mehrere Autoren hat, könnte die Reihenfolge der Autoren wichtig sein.

There is no way for an application to rely on the relative order of the two triples when, for example, querying a database containing these triples. For most of the applications and data sets this is not a problem, but, in some cases, the order is important. A typical case is publications: when a book or an article has several co-authors, the order of the authors may be important.

RDF besitzt eine Zusammenstellung mit vordefinierten Prädikaten, die eine vereinbarte Semantik für die Reihenfolge haben. Zum Beispiel könnte die Publikation: "Semantic Annotation and Retrieval von Ben Adida, Mark Birbeck und Ivan Herman" mit Hilfe jener Begriffe über RDF-Tripel wie folgt beschrieben werden:

RDF has a set of predefined predicates that have an agreed-upon semantics of order. For example, the publication: "Semantic Annotation and Retrieval, by Ben Adida, Mark Birbeck, and Ivan Herman" could be described in RDF triples using these terms as follows:

@prefix bibo:  <http://purl.org/ontology/bibo/> .
@prefix dc:    <http://purl.org/dc/terms/> .
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
[ a bibo:Chapter ;
  dc:title "Semantic Annotation and Retrieval" ;
  dc:creator [
    rdf:first <http://ben.adida.net/#me ;
    rdf:rest [
      rdf:first <http://twitter.com/markbirbeck> ;
      rdf:rest [
        rdf:first <http://www.ivan-herman.net/foaf#me> ;
        rdf:rest rdf:nil .
      ] .
    ] .
  ] .
	...
]

Das Beispiel oben drückt die Schreibweise der Reihenfolge für diese drei Autoren aus. Zugegeben, es ist nicht außerordentlich lesbar. Jedoch hat Turtle eine syntaktische Kurzschreibweise für diese Strukturen:

which conveys the notion of 'order' for the three authors. Admittedly, this is not very readable. However, Turtle has a syntactic shorthand for these structures:

@prefix bibo:  <http://purl.org/ontology/bibo/> .
@prefix dc:    <http://purl.org/dc/terms/> .
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
[ a bibo:Chapter ;
  dc:title "Semantic Annotation and Retrieval" ; 
  dc:creator 
  ( <http://ben.adida.net/#me>
    <http://twitter.com/markbirbeck>
    <http://www.ivan-herman.net/foaf#me> 
  ) .
  ...
]

Es wäre natürlich auch möglich, die gleiche Struktur mit Hilfe der RDF-Prädikate rdf:first, rdf:rest, sowie mit der besonderen Quelle rdf:nil zu reproduzieren. Um dies jedoch einfacher zu gestalten, stellt RDFa das Attribut @inlist zur Verfügung. Dieses Attribut signalisiert, dass das erzeugte Objekt aus diesem Element in eine Liste eingetragen wird; die Liste wird mit dem gemeinsamen Prädikat und mit dem gemeinsamen Subjekt verwendet. Hier sehen Sie, wie die vorherige Struktur in RDFa aussehen könnte:

It would of course be possible to reproduce the same structure in RDFa, using the RDF predicates rdf:first, rdf:rest, as well as the special resource rdf:nil. However, to make this easier, RDFa provides the @inlist. What this attributes signals is that the object generated on that element should be put on a list; the list is used with the common predicate with the common subject. Here is how the previous structure could look like in RDFa:

<p prefix="bibo: http://purl.org/ontology/bibo/ dc: http://purl.org/dc/terms/ typeof="bibo:Chapter">
  "<span property="dc:title">Semantic Annotation and Retrieval</span>" by
   <a inlist="" property="dc:creator" 
                href="http://ben.adida.net/#me">Ben Adida</span>,
   <a inlist="" property="dc:creator" 
                href="http://twitter.com/markbirbeck">Mark Birbeck</span>, and
   <a inlist="" property="dc:creator" 
                href="http://www.ivan-herman.net/foaf#me">Ivan Herman</span>. 
</p>

Beachten Sie, dass die Reihenfolge in der Liste durch die Dokumentreihenfolge bestimmt wird. (Relevant ist nicht der Wert des Attributs @inlist, sondern die Gegenwart des Attributs.)

Note that the order in the list is determined by the document order. (The value of the @inlist is not relevant, only its presence is.)

Listen können nicht nur Literale, sondern auch IRIs enthalten. Zum Beispiel könnten sich zwei der drei Autoren dafür entscheiden, ihre FOAF-Adresse in der Autorenliste zu veröffentlichen:

Lists may also include IRIs and not only literals. For example, two of the three co-authors could decide to publicise their FOAF address in the authors’ list:

<p prefix="bibo: http://purl.org/ontology/bibo/ dc: http://purl.org/dc/terms/ typeof="bibo:Chapter">
  "<span property="dc:title">Semantic Annotation and Retrieval</span>", by
  <span inlist="" property="dc:creator" resource="http://ben.adida.net/#me">Ben Adida</span>,
  <span inlist="" property="dc:creator">Mark Birbeck</span>, and
  <span inlist="" property="dc:creator" resource="http://www.ivan-herman.net/foaf#me">Ivan Herman</span>.
</p>

welches zu Folgendem führt:

yielding:

@prefix bibo:  <http://purl.org/ontology/bibo/> .
@prefix dc:    <http://purl.org/dc/terms/> .
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
[ a bibo:Chapter ;
  dc:title "Semantic Annotation and Retrieval" ;
  dc:creator ( <http://ben.adida.net/#me> "Mark Birbeck" <http://www.ivan-herman.net/foaf#me> ) .
  ...
]

Im Beispiel oben hätte auch @rel verwendet werden können, welches zu genau den gleichen Tripeln führen würde:

In the example above, @rel could have been used leading exactly to the same triples:

<p prefix="bibo: http://purl.org/ontology/bibo/ dc: http://purl.org/dc/terms/ typeof="bibo:Chapter">
  "<span property="dc:title">Semantic Annotation and Retrieval</span>", by
  <span inlist="" rel="dc:creator" resource="http://ben.adida.net/#me">Ben Adida</span>,
  <span inlist="" property="dc:creator">Mark Birbeck</span>, and
  <span inlist="" rel="dc:creator" resource="http://www.ivan-herman.net/foaf#me">Ivan Herman</span>.
</p>

Unvollständige Tripel können auch in Verbindung mit Listen verwendet werden, wenn alle Listenelemente Quellen und keine Literale sind. Hätten zum Beispiel alle drei Autoren Bezug auf Ihr FOAF-Profil genommen, hätte das vorherige Beispiel wie folgt geschrieben werden können:

Incomplete Triples can also be used in conjunction with lists when all list elements are resources and not literals. For example, the previous example, this time with all three authors referring to their FOAF profile, could have been written as:

<p prefix="bibo: http://purl.org/ontology/bibo/ dc: http://purl.org/dc/terms/ typeof="bibo:Chapter">
  "<span property="dc:title">Semantic Annotation and Retrieval</span>", by
   <span rel="dc:creator" inlist="">
     <a href="http://ben.adida.net/#me">Ben Adida</a>,
     <a href="http://internet-apps.blogspot.com/2008/03/my-profile.html#me">Mark Birbeck</a>, and
     <a href="http://www.ivan-herman.net/foaf#me">Ivan Herman</a>.
   </span>
  </p>

erzeugt das Ergebnis:

Resulting in:

@prefix bibo:  <http://purl.org/ontology/bibo/> .
@prefix dc:    <http://purl.org/dc/terms/> .
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
[ a bibo:Chapter ;
  dc:title "Semantic Annotation and Retrieval" ;
  dc:creator ( <http://ben.adida.net/#me>
               <http://internet-apps.blogspot.com/2008/03/my-profile.html#me>
               <http://www.ivan-herman.net/foaf#me> ) .
  ...
]

Beachten Sie, dass es auch möglich ist, eine leere Liste ohne @inlist auszudrücken, unter Verwendung von:

Note that it is also possible to express an empty list, without @inlist, using:

<span rel="prop" resource="rdf:nil"/>

9. RDFa-Anfangskontext

9. RDFa Initial Contexts

RDFa gestattet Wirtsprachen die Definition eines Anfangskontextes (orig.: Initial Context). Solch ein Kontext ist eine Zusammenstellung von Begriffen, Präfixabbildungen und/oder einer voreingestellten Vokabulardeklaration. Ein Anfangskontext ist im Parser entweder 'eingebaut' oder er wird durch externe Dokumente geladen und verarbeitet. Diese Dokumente müssen in einer anerkannten RDFa-Wirtsprache definiert sein (aktuell XML+RDFa und XHTML+RDFa [XHTML-RDFA]). Sie können auch in anderen Formaten (zum Beispiel RDF/XML [RDF-SYNTAX-GRAMMAR] oder Turtle [TURTLE]) definiert werden. Wird ein Anfangskontext in Form eines Dokuments verarbeitet, wird er wie folgt evaluiert:

RDFa permits Host Languages to define an initial context. Such a context is a collection of terms, prefix mappings, and/or a default vocabulary declaration. An initial context is either intrinsically known to the parser, or it is loaded as external documents and processed. These documents must be defined in an approved RDFa Host Language (currently XML+RDFa and XHTML+RDFa [XHTML-RDFA]). They may also be defined in other formats (e.g., RDF/XML [RDF-SYNTAX-GRAMMAR], or Turtle [TURTLE]). When an initial context document is processed, it is evaluated as follows:

  1. Verarbeite den Inhalt (nach den Verarbeitungsregeln für diesen Dokumenttyp) und extrahiere die Tripel in eine Zusammenstellung, die mit diesem IRI verknüpft ist. Achtung: Diese Tripel dürfen nicht mit den Tripeln vermischt werden, die von irgendeinem anderen IRI extrahiert werden.
  2. Erzeuge für jedes Subjekt mit einem Paar aus Prädikaten, die die Werte rdfa:prefix und rdfa:uri haben, eine Schlüssel-Wert-Abbildung vom rdfa:prefix-Objektliteral (der Schlüssel) auf das rdfa:uri-Objektliteral (der Wert). Füge diese Abbildung zu der Liste der IRI-Abbildungen des anfänglichen Evaluierungskontextes hinzu, nachdem die Präfixkomponente in Kleinschreibung umgewandelt wurde.
  3. Erzeuge für jedes Subjekt mit einem Paar aus Prädikaten, die die Werte rdfa:term und rdfa:uri haben, eine Schlüssel-Wert-Abbildung vom rdfa:term-Objektliteral (der Schlüssel) auf das rdfa:uri-Objektliteral (der Wert). Füge diese Abbildung zu den Begriffsabbildungen des anfänglichen Evaluierungskontextes hinzu.
  4. Wird ein Tripel mit dem Prädikat rdfa:vocabulary extrahiert, definiere das voreingestellte Vokabular des anfänglichen Evaluierungskontextes als das Objektliteral des rdfa:vocabulary-Prädikats.
  1. Parse the content (according to the processing rules for that document type) and extract the triples into a collection associated with that IRI. Note: These triples must not be co-mingled with the triples being extracted from any other IRI.
  2. For every subject with a pair of predicates that have the values rdfa:prefix and rdfa:uri, create a key-value mapping from the rdfa:prefix object literal (the key) to the rdfa:uri object literal (the value). Add this mapping to the list of IRI mappings of the initial evaluation context, after transforming the 'prefix' component to lower-case.
  3. For every subject with a pair of predicates that have the values rdfa:term and rdfa:uri, create a key-value mapping from the rdfa:term object literal (the key) to the rdfa:uri object literal (the value). Add this mapping to the term mappings of the initial evaluation context.
  4. For an extracted triple that has a predicate of rdfa:vocabulary, define the default vocabulary of the initial evaluation context to be the object literal of the rdfa:vocabulary predicate.

Wird ein RDFa-Anfangskontext über eine RDF-Serialisierung definiert, muss es die Vokabularbegriffe oben verwenden, um die Komponenten des Kontextes zu deklarieren.

When an RDFa Initial Context is defined using an RDF serialization, it must use the vocabulary terms above to declare the components of the context.

Eine weitere interessante Wirtsprache ist zur Zeit der Übersetzung (Anfang 2013) im Status 'Last Call' und wird in den nächsten Monaten mit hoher Wahrscheinlichkeit zur W3C-Empfehlung aufsteigen. Fragen Sie nach HTML+RDFa.

Das Cachen der betreffenden Tripel, die über diesen Mechanismus erhalten wurden, wird empfohlen. Die Einbettung von allgemein bekannten, stabilen RDFa-Anfangskontexten in die Implementierung wird empfohlen.

Caching of the relevant triples retrieved via this mechanism is recommended. Embedding definitions for well known, stable RDFa Initial Contexts in the implementation is recommended.

Das Objektliteral für das Prädikat rdfa:uri muss ein absoluter IRI sein. Das Objektliteral für das Prädikat rdfa:term muss der Definition für einen Begriff (term) entsprechen. Das Objektliteral für das Prädikat rdfa:prefix muss der Definition für Präfix (prefix) entsprechen. Das Objektliteral für das Prädikat rdfa:vocabulary muss ein absoluter IRI sein. Ist eines der Objekte kein Literal, entspricht nicht seiner verknüpften Definition, gibt es mehr als ein rdfa:vocabulary-Prädikat oder gibt es zusätzliche rdfa:uri- oder rdfa:term-Prädikate, die das gleiche Subjekt teilen, dann darf die entsprechende Abbilung vom RDFa-Prozessor nicht erzeugt werden.

The object literal for the rdfa:uri predicate must be an absolute IRI. The object literal for the rdfa:term predicate must match the production for term. The object literal for the rdfa:prefix predicate must match the production for prefix. The object literal for the rdfa:vocabulary predicate must be an absolute IRI. If one of the objects is not a Literal, does not match its associated production, if there is more than one rdfa:vocabulary predicate, or if there are additional rdfa:uri or rdfa:term predicates sharing the same subject, an RDFa Processor must not create the associated mapping.

10. RDFa-Vokabularerweiterung

10. RDFa Vocabulary Expansion

Da RDFa auf RDF basiert, können die Semantiken von RDF-Vokabularen verwendet werden, um mehr Wissen über Daten zu erlangen. Vokabulare, Eigenschaften und Klassen werden von IRIs identifiziert, so werden diese auffindbar. RDF-Daten, die an diesen Orten veröffentlicht sind, können empfangen werden und Beschreibungen von Eigenschaften und Klassen, die bestimmte Semantiken verwenden, können angewendet werden.

Since RDFa is based on RDF, the semantics of RDF vocabularies can be used to gain more knowledge about data. Vocabularies, properties and classes are identified by IRIs, which enables them to be discoverable. RDF data published at the location of these IRIs can be retrieved, and descriptions of the properties and classes using specified semantics can be applied.

RDFa-Vokabularerweiterung ist ein optionaler Verarbeitungsschritt, der hinzugefügt werden kann, wenn die normalen Verarbeitungsschritte, die in Verarbeitungsmodell beschrieben sind, vollständig abgearbeitet sind. Die Vokabularerweiterung beruft sich auf eine geringe Untermenge von 'OWL Entailment' [OWL2-OVERVIEW], um Tripel zum Ausgabegraphen hinzuzufügen, basierend auf Regeln und Eigenschaften/Klassen-Beziehungen, die in verknüpften Vokabularen beschrieben sind. Die Vokabularerweiterung kann von einem umfassenderen Werkzeug vollzogen werden, zum Beispiel von einem 'OWL 2 RL Reasoner'. Alternativ dazu, kann unter Verwendung von Vokabulardaten, die dem Ausgabegraphen im Verarbeitungsschritt 2 von Verarbeitungsablauf hinzugefügt wurden, die Erweiterung auch durch einen eigenen und dedizierten (zum Beispiel regelbasierten) Reasoner vollzogen werden, nachdem der Ausgabegraph erzeugt wurde. Oder als letzter Verarbeitungschritt eines RDFa-Prozessors.

RDFa Vocabulary Expansion is an optional processing step which may be added once the normal processing steps described in Processing Model are complete. Vocabulary expansion relies on a very small sub-set of OWL entailment [OWL2-OVERVIEW] to add triples to the output graph based on rules and property/class relationships described in referenced vocabularies. Vocabulary expansion may be performed as part of a larger RDF toolset including, for example, an OWL 2 RL reasoner. Alternatively, using vocabulary data added to the output graph in processing step 2 of Sequence, expansion may also be done using a separate and dedicated (e.g., rule based) reasoner after the output graph has been generated, or as the last processing step by an RDFa processor.

Es kann nützlich sein, verallgemeinerte Daten, die durch die Erweiterung abgeleiteter Aussagen mit diesen Semantiken erzeugt werden, für die weitergehende Verwendung von eingebetteten RDFa-Daten verfügbar zu machen. So können jene Eigenschaften dem Ausgabegraphen automatisch hinzugefügt werden, wenn es bestehende Vokabulare gibt, die allgemein bekannte Vokabulare erweitern. Zum Beispiel definiert das Namensraumdokument des Creative Commons-Vokabulars, http://creativecommons.org/ns, dass cc:license eine Untereigenschaft von dc:license ist. Durch die Verwendung des Attributs @vocab kann eine Lizenzinformation wie folgt beschrieben werden:

It can be very useful to make generalized data available for subsequent usage of RDFa-embedded data by expanding inferred statements entailed by these semantics. This provides for existing vocabularies that extend well-known vocabularies to have those properties added to the output graph automatically. For example, the namespace document of the Creative Commons vocabulary, i.e., http://creativecommons.org/ns, defines cc:license to be a sub-property of dc:license. By using the @vocab attribute, one can describe a licensing information as follows:

This document is licensed under the 
<a vocab="http://creativecommons.org/ns#"
   rel="license"
   href="http://creativecommons.org/licenses/by-nc-nd/3.0/">
   Creative Commons By-NC-ND License
</a>.

welches zum folgenden Ausgabegraphen führt:

which results in the following output graph:

@prefix cc:    <http://creativecommons.org/ns#> .
@prefix rdfa:  <http://www.w3.org/ns/rdfa#> .
<> cc:license          <http://creativecommons.org/licenses/by-nc-nd/3.0/> ;
   rdfa:usesVocabulary <http://creativecommons.org/ns#> .

Nach der Vokabularerweiterung enthält der Ausgabegraph:

After vocabulary expansion, the output graph contains:

@prefix cc:    <http://creativecommons.org/ns#> .
@prefix rdfa:  <http://www.w3.org/ns/rdfa#> .
@prefix dc:    <http://purl.org/dc/terms/> .
<> cc:license          <http://creativecommons.org/licenses/by-nc-nd/3.0/>;
   dc:license          <http://creativecommons.org/licenses/by-nc-nd/3.0/> ;
   rdfa:usesVocabulary  <http://creativecommons.org/ns#> .

Ebenfalls könnten andere Vokabulare definiert werden, die insbesondere darauf ausgelegt sind, Beziehungen zu mehreren Vokabularen zu pflegen, um die Verwendung von Begriffen in einem einzigen Namensraum zu gestatten. Dadurch werden Eigenschaften und/oder Klassen von anderen primären Vokabularen importiert. Dies bringt den Vorteil, dass die Daten nun auf breiterer Grundlage durchsuchbar sind und fördert den Brauch, auf allgemeinbekannte Vokabulare zu verweisen.

Other vocabularies, specifically intended to provide relations to multiple vocabularies, could also be defined by publishers, allowing use of terms in a single namespace which result in properties and/or classes from other primary vocabularies being imported. This benefits publishers as data is now more widely searchable and encourages the practice of referencing well-known vocabularies.

10.1 Details der RDFa-Vokabularerweiterung

10.1 Details of the RDFa Vocabulary Expansion

Dieser Abschnitt ist nicht normativ.

This section is non-normative.

Nachdem der Ausgabegraph entsprechend der Verarbeitungsschritte aus Verarbeitungsablauf erzeugt worden ist, kann ein Prozessor die folgenden Verarbeitungsschritte auf den Ausgabegraphen anwenden. Er darf dies nur, wenn der Benutzer des Prozessors ausdrücklich danach gefragt hat, wie in Steuerung der Vokabularerweiterung von RDFa-Prozessoren beschrieben.

Once the output graph is generated following the processing steps defined in Sequence, processors may perform the following processing steps on the output graph. It must do so only if the user of the processor explicitly asks for it, as prescribed in Vocabulary Expansion Control of RDFa Processors.

Ein Vokabulargraph wird wie folgt erzeugt: Jeder IRI, der Objekt eines Tripels im Ausgabegraphen ist, das den aktuellen Dokument-IRI (base) als Subjekt enthält, sowie die Eigenschaft rdfa:usesVocabulary, wird aufgelöst. Führt die Auflösung zu der Serialisierung eines RDF-Graphen, wird die Serialisierung geparsed und der erzeugte Graph wird mit dem Vokabulargraphen vereint. (Ein RDFa-Prozessor, der die Vokabularerweiterung beherrscht, muss einen in RDFa serialisierten RDF-Graphen akzeptieren und sollte andere RDF-Standardserialisierungsformate wie RDF/XML [RDF-SYNTAX-GRAMMAR] und Turtle [TURTLE] akzeptieren.)

A vocabulary graph is created as follows: For each IRI being the object of a triple in the output graph with the subject being the current document (base) IRI and the property being rdfa:usesVocabulary, that IRI is dereferenced. If the dereferencing yields the serialization of an RDF graph, that serialization is parsed and the resulting graph is merged with the vocabulary graph. (An RDFa processor capable of vocabulary expansion must accept an RDF graph serialized in RDFa, and should accept other standard serialization formats of RDF such as RDF/XML [RDF-SYNTAX-GRAMMAR] and Turtle [TURTLE].)

Beachten Sie, wenn im zweiten Schritt ein bestimmtes Vokabular in RDFa serialisiert wird, wird von diesem bestimmten Graphen nicht erwartet, dass er sich selbst irgendeiner Vokabularerweiterung unterzieht.

Note that if, in the second step, a particular vocabulary is serialized in RDFa, that particular graph is not expected to undergo any vocabulary expansion on its own.

Die Vokabularerweiterung wird dann wie folgt vollzogen:

Vocabulary expansion is then performed as follows:

  1. Der Prozessor fügt den voreingestelltem Graphen und den Vokabulargraphen nach den Reglen aus RDFa-Vokabular-Entailment zusammen.
  2. Füge die neuen Tripel, die vom Ausgabegraphen unter Verwendung dieses Entailments abgeleitet wurden, dem (erweiterten) Ausgabegraphen hinzu. Der Prozessor sollte keine Tripel hinzufügen, die nur im Vokabulargraphen erscheinen.
  1. The processor operates on the merge of the default and vocabulary graphs using RDFa Vocabulary Entailment.
  2. Add the new triples inferred from the output graph using this entailment to the (expanded) output graph. The processor should not add the triples appearing in the vocabulary graph only.
Das Ziel des zweiten Schrittes ist es, zu vermeiden, die "Axiome" zum Ausgabegraphen hinzuzufügen, zum Beispiel die Definitionen der Untereigenschaften. Anwendungen benötigen im Allgemeinen keine dieser zusätzlichen Informationen.
The goal of the second step is to avoid adding the "axioms", e.g., the sub-property definitions to the output graph. Applications usually do not require any of this additional information.

10.1.1 RDFa-Vokabular-Entailment

10.1.1 RDFa Vocabulary Entailment

Zur Vokabularverarbeitung hat RDFa eine äußerst begrenzte Untermenge des OWL-Vokabulars verwendet und beruht auf RDF-basierten Semantiken von OWL [OWL2-RDF-BASED-SEMANTICS]. Das RDFa-Vokabular-Entailment verwendet die folgenden Begriffe:

For the purpose of vocabulary processing, RDFa used a very restricted subset of the OWL vocabulary and is based on the RDF-Based Semantics of OWL [OWL2-RDF-BASED-SEMANTICS]. The RDFa Vocabulary Entailment uses the following terms:

  • rdf:type
  • rdfs:subClassOf
  • rdfs:subPropertyOf
  • owl:equivalentClass
  • owl:equivalentProperty
  • rdf:type
  • rdfs:subClassOf
  • rdfs:subPropertyOf
  • owl:equivalentClass
  • owl:equivalentProperty

RDFa-Vokabular-Entailment bezieht sich nur auf Individuen (das heißt, nicht auf die Beziehungen, die von den Eigenschaften oder Klassen selbst abgeleitet werden können.)

RDFa Vocabulary Entailment considers only the entailment on individuals (i.e., not on the relationships that can be deduced on the properties or the classes themselves.)

Während die formale Definition von RDFa-Entailment sich auf die allgemeinen OWL 2-Semantiken bezieht, könnten tatsächliche Implementierungen auf einer Untermenge des Entailments aus dem Profil OWL 2 RL basieren, wie es in den Regeln (Abschnitt 4.3 von [OWL2-PROFILES]) beschrieben ist. Die relevanten Regeln, unter Verwendung der Regelidentifizierer beschrieben in Abschnitt 4.3 von [OWL2-PROFILES]), sind: prp-spo1, prp-eqp1, prp-eqp2, cax-sco, cax-eqc1 und cax-eqc2.

While the formal definition of the RDFa Entailment refers to the general OWL 2 Semantics, practical implementations may rely on a subset of the OWL 2 RL Profile’s entailment expressed in rules (section 4.3 of [OWL2-PROFILES]). The relevant rules are, using the rule identifications in section 4.3 of [OWL2-PROFILES]): prp-spo1, prp-eqp1, prp-eqp2, cax-sco, cax-eqc1, and cax-eqc2.

Das Entailment, das in diesem Abschnitt beschrieben wird, ist das minimal nützliche für RDFa. Prozessoren können natürlich weitergehenden Entailment-Regelwerken folgen, zum Beispiel vollständige RDFS- [RDF-MT] oder OWL-Entailments [OWL2-OVERVIEW]. Unter Verwendung jener Entailments können Anwendungen durch Überprüfen von rdfs:range einer Eigenschaft eine Datentypvalidierung durchführen oder die fortgeschrittenen Eigenschaften nutzen, die zum Beispiel von OWL-Eigenschaftsketten angeboten werden, um Vokabulare weiter zu verknüpfen.

The entailment described in this section is the minimum useful level for RDFa. Processors may, of course, choose to follow more powerful entailment regimes, e.g., include full RDFS [RDF-MT] or OWL [OWL2-OVERVIEW] entailments. Using those entailments applications may perform datatype validation by checking rdfs:range of a property, or use the advanced facilities offered by, e.g., OWL’s property chains to interlink vocabularies further.

10.2 Steuerung der Vokabularerweiterung von RDFa-Prozessoren

10.2 Vocabulary Expansion Control of RDFa Processors

Konforme RDFa-Prozessoren müssen Vokabularerweiterung nicht unterstützen.

Conforming RDFa processors are not required to provide vocabulary expansion.

Bietet ein RDFa-Prozessor Vokabularerweiterung an, darf dies nicht als Voreinstellung geschehen. Der Prozessor muss eine Option vocab_expansion anbieten, die, sofern verwendet, den RDFa-Prozessor anweist, eine Vokabularerweiterung durchzuführen, bevor der Ausgabegraph zurückgegeben wird.

If an RDFa processor provides vocabulary expansion, it must not be performed by default. Instead, the processor must provide an option, vocab_expansion, which, when used, instructs the RDFa processor to perform a vocabulary expansion before returning the output graph.

Auch wenn die Vokabularerweiterung mit den Begriffen Vokabulargraph und RDFS OWS-Entailment-Regeln (Errata) beschrieben wird, steht es Prozessoren frei, jeglichen Prozess zu wählen, der die gleichen Ergebnisse liefert.

Although vocabulary expansion is described in terms of a vocabulary graph and RDFS entailment rules, processors are free to use any process which obtains equivalent results.

10.2.1 Anmerkung zur RDFa-Vokabularimplementierung und Veröffentlichung

Dieser Abschnitt ist nicht normativ.

10.2.1 Notes to RDFa Vocabulary Implementations and Publishing

This section is non-normative.

RDFa-Prozessoren wird das Cachen der relevanten Graphen, die über diesen Mechanismus empfangen werden, empfohlen. Cachen basiert im Allgemeinen auf HTTP-Response-Headern wie das Ablaufdatum, die Cache-Steuerung und so weiter.

For RDFa Processors caching the relevant graphs retrieved via this mechanism is recommended. Caching is usually based on HTTP response headers like expiration time, cache control, etc.

IRIs für veröffentlichte Vokabulare sollten auflösbar sein und einen RDF-Graphen mit der Beschreibung des Vokabulars zurückgeben. Diese Vokabularbeschreibung sollte als RDFa kodiert bereitstehen und kann auch in anderen RDFa-Serialisierungssyntaxen zur Verfügung gestellt werden (unter Verwendung von Content Negotiation, um zwischen den verschiedenen Formaten auszuwählen). Sofern möglich, sollten Vokabularbeschreibungen Aussagen über Untereigenschaften und Unterklassen einschließen, die die Vokabularbegriffe mit anderen allgemein bekannten Vokabularen verknüpfen. Schlussendlich sollten HTTP-Antworten Felder enthalten, die für die Cache-Steuerung und zum Beispiel das Verfalldatum verwendbar sind.

For publishers of vocabularies, the IRI for the vocabularies should be dereferenceable, and should return an RDF graph with the vocabulary description. This vocabulary description should be available encoded in RDFa, and may also be available in other RDF serialization syntaxes (using content negotiation to choose among the different formats). If possible, vocabulary descriptions should include subproperty and subclass statements linking the vocabulary terms to other, well-known vocabularies. Finally, HTTP responses should include fields usable for cache control, e.g., expiration date.

A. CURIE-Datentypen

A. CURIE Datatypes

Um die Verwendung von CURIEs in Bezeichnersprachen zu ermöglichen, definiert diese Spezifikation einige zusätzliche Datentypen im XHTML-Datentypraum (http://www.w3.org/1999/xhtml/datatypes/). Bezeichnersprachen, die diese Definitionen importieren möchten, finden sie für ihre Schema-Grammatik in der Datei "datatypes":

In order to facilitate the use of CURIEs in markup languages, this specification defines some additional datatypes in the XHTML datatype space (http://www.w3.org/1999/xhtml/datatypes/). Markup languages that want to import these definitions can find them in the "datatypes" file for their schema grammar:

Insbesondere sind die folgenden Datentypen definiert:

CURIE
Ein einzelner curie
CURIEs
Eine durch Leerzeichen getrennte Liste mit CURIEs
CURIEorIRI
Ein CURIE oder ein IRI
CURIEorIRIs
Eine durch Leerzeichen getrennte Liste mit CURIEorIRIs
SafeCURIE
Ein einzelner safe_curie
SafeCURIEorCURIEorIRI
Ein einzelner SafeCURIE oder CURIEorIRI
SafeCURIEorCURIEorIRIs
Eine durch Leerzeichen getrennte Liste mit SafeCURIEorCURIEorIRIs.
TERM
Ein einzelner term (Begriff)
TERMorCURIEorAbsIRI
Ein TERM oder ein CURIEorIRI
TERMorCURIEorAbsIRIs
Eine durch Leerzeichen getrennte Liste mit TERMorCURIEorAbsIRIs

A.1 XML-Schema-Definition

Dieser Abschnitt ist nicht normativ.

A.1 XML Schema Definition

This section is non-normative.

Die folgende informative XML-Schema-Definition für diese Datentypen ist als Beispiel hinzugefügt worden:

The following informative XML Schema definition for these datatypes is included as an example:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
 xmlns:xs="http://www.w3.org/2001/XMLSchema"
 xmlns="http://www.w3.org/1999/xhtml/datatypes/"
 xmlns:xh11d="http://www.w3.org/1999/xhtml/datatypes/"
 targetNamespace="http://www.w3.org/1999/xhtml/datatypes/"
 elementFormDefault="qualified"
>
    <xs:simpleType name="CURIE">
        <xs:restriction base="xs:string">
            <xs:pattern value="(([\i-[:]][\c-[:]]*)?:)?(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)" />
            <xs:minLength value="1"/>
        </xs:restriction>
    </xs:simpleType> 

    <xs:simpleType name="CURIEs">
        <xs:list itemType="xh11d:CURIE"/>
    </xs:simpleType>

    <xs:simpleType name="SafeCURIE">
        <xs:restriction base="xs:string">
            <xs:pattern value="\[(([\i-[:]][\c-[:]]*)?:)?(/[^\s/][^\s]*|[^\s/][^\s]*|[^\s]?)\]" />
            <xs:minLength value="3"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="SafeCURIEs">
        <xs:list itemType="xh11d:SafeCURIE"/>
    </xs:simpleType>

    <xs:simpleType name="TERM">
      <xs:restriction base="xs:Name">
        <xs:pattern value="[\i-[:]][/\c-[:]]*" />
      </xs:restriction>
    </xs:simpleType>
    

    <xs:simpleType name="CURIEorIRI">
        <xs:union memberTypes="xh11d:CURIE xsd:anyURI" />
    </xs:simpleType>

    <xs:simpleType name="CURIEorIRIs">
        <xs:list itemType="xh11d:CURIEorIRI"/>
    </xs:simpleType>

    <xs:simpleType name="SafeCURIEorCURIEorIRI">
        <xs:union memberTypes="xh11d:SafeCURIE xh11d:CURIE xsd:anyURI" />
    </xs:simpleType>

    <xs:simpleType name="SafeCURIEorCURIEorIRIs">
        <xs:list itemType="xh11d:SafeCURIEorCURIEorIRI"/>
    </xs:simpleType>

    <xs:simpleType name='AbsIRI'>
        <xs:restriction base='xs:string'>
            <xs:pattern value="[\i-[:]][\c-[:]]+:.+" />
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="TERMorCURIEorAbsIRI">
        <xs:union memberTypes="xh11d:TERM xh11d:CURIE xh11d:AbsIRI" />
    </xs:simpleType>

    <xs:simpleType name="TERMorCURIEorAbsIRIs">
        <xs:list itemType="xh11d:SafeCURIEorCURIEorAbsIRI"/>
    </xs:simpleType>
</xs:schema>

A.2 XML-DTD-Definition

Dieser Abschnitt ist nicht normativ.

A.2 XML DTD Definition

This section is non-normative.

Die folgende informative XML-DTD-Definition für diese Datentypen ist als Beispiel hinzugefügt worden:

The following informative XML DTD definition for these datatypes is included as an example:

<!ENTITY % CURIE.datatype "CDATA" >
<!ENTITY % CURIEs.datatype "CDATA" >
<!ENTITY % CURIEorIRI.datatype "CDATA" >
<!ENTITY % CURIEorIRIs.datatype "CDATA" >
<!ENTITY % SafeCURIEorCURIEorIRI.datatype "CDATA" >
<!ENTITY % SafeCURIEorCURIEorIRIs.datatype "CDATA" >
<!ENTITY % TERMorCURIEorAbsIRI.datatype "CDATA" >
<!ENTITY % TERMorCURIEorAbsIRIs.datatype "CDATA" >

B. Das RDFa-Vokabular

B. The RDFa Vocabulary

Das RDFa-Vokabular hat drei Aufgaben: es enthält die Prädikate, um die Begriffe und Präfixe in Anfangskontextdokumenten zu definieren, es enthält die Klassen und Prädikate für die Berichte, die ein Prozessorgraph enthalten könnte und schlussendlich enthält es die Prädikate, die für die Vokabularverarbeitung notwenig sind. Der IRI für das Vokabular ist http://www.w3.org/ns/rdfa#; das im Allgemeinen verwendete Präfix in diesem Dokument ist rdfa.

The RDFa Vocabulary has three roles: it contains the predicates to define the terms and prefixes in initial context documents, it contains the classes and predicates for the messages that a processor graph may contain and, finally, it contains the predicate necessary for vocabulary processing. The IRI of the vocabulary is http://www.w3.org/ns/rdfa#; the usual prefix used in this document is rdfa.

Diese Vokabularangabe ist in den Formaten XHTML+RDFa 1.1, Turtle und RDF/XML verfügbar.

This vocabulary specification is available in XHTML+RDFa 1.1, Turtle, and in RDF/XML formats.

B.1 Begriffs- und Präfixzuweisungen

B.1 Term and Prefix Assignments

Das RDFa-Vokabular beinhaltet die folgenden Tripel (hier im Format Turtle [TURTLE]):

The RDFa Vocabulary includes the following triples (shown here in Turtle [TURTLE] format):

@prefix dc:      <http://purl.org/dc/terms/> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rdfa:    <http://www.w3.org/ns/rdfa#> .
@prefix foaf:    <http://xmlns.com/foaf/0.1/> .

<http://www.w3.org/ns/rdfa#> a owl:Ontology .

rdfa:PrefixOrTermMapping a rdfs:Class, owl:Class ;
    dc:description "The top level class for prefix or term mappings." .
    
rdfa:PrefixMapping dc:description "The class for prefix mappings." .
    rdfs:subClassOf rdfa:PrefixOrTermMapping .
    
rdfa:TermMapping dc:description "The class for term mappings." .
    rdfs:subClassOf rdfa:PrefixOrTermMapping .

rdfa:prefix a rdf:Property, owl:DatatypeProperty ;
     rdfs:domain rdfa:PrefixMapping ;
     dc:description "Defines a prefix mapping for an IRI; the value is supposed to be a NMTOKEN." . 

rdfa:term a rdf:Property, owl:DatatypeProperty ;
     rdfs:domain rdfa:TermMapping ;
     dc:description "Defines a term mapping for an IRI; the value is supposed to be a NMTOKEN." . 

rdfa:uri a rdf:Property, owl:DatatypeProperty ;
     rdfs:domain rdfa:PrefixOrTermMapping ;
     dc:description """Defines the IRI for either a prefix or a term mapping;
        the value is supposed to be an absolute IRI.""" . 

rdfa:vocabulary a rdf:Property, owl:DatatypeProperty ;
     dc:description """Defines an IRI to be used as a default vocabulary;
        the value is can be any string; for documentation purposes it is advised to use
        the string ‘true’ or ‘True’.""" . 

Diese Prädikate können zur Definition des Anfangskontextes für eine gegebene Wirtsprache verwendet werden.

These predicates can be used to define the initial context for a given Host Language.

Diese Prädikate 'paaren' IRI-Zeichenketten und ihre Verwendung als Präfix und/oder Begriff als Teil von, zum Beispiel, einem leeren Knoten. Ein Beispiel könnte so aussehen:

These predicates are used to 'pair' IRI strings and their usage in the form of a prefix and/or a term as part of, for example, a blank node. An example can be as follows:

[] rdfa:uri     "http://xmlns.com/foaf/0.1/name" ;
   rdfa:prefix  "foaf" . 

Im Beispiel oben wird das Präfix für den FOAF-IRI definiert.

which defines a prefix for the foaf IRI.

B.2 Prozessorgraphberichte

B.2 Processor Graph Reporting

Das Vokabular enthält die folgenden Begriffdefinitionen (hier im Turtle-Format [TURTLE]):

The Vocabulary includes the following term definitions (shown here in Turtle [TURTLE] format):

@prefix dc:      <http://purl.org/dc/terms/> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rdfa:    <http://www.w3.org/ns/rdfa#> .

rdfa:PGClass a rdfs:Class, owl:Class;
    dc:description "The top level class of the hierarchy." .

rdfa:Error dcterms:description "The class for all error conditions.";
    rdfs:subClassOf rdfa:PGClass .

rdfa:Warning dcterms:description "The class for all warnings.";
    rdfs:subClassOf rdfa:PGClass .

rdfa:Info dcterms:description "The class for all informations.";
    rdfs:subClassOf rdfa:PGClass .

rdfa:DocumentError dc:description "An error condition to be used when the document
    fails to be fully processed as a result of non-conformant host language markup.";
    rdfs:subClassOf rdfa:Error .

rdfa:VocabReferenceError dc:description "A warning to be used
    when the value of a @vocab attribute cannot be dereferenced, hence the vocabulary expansion
    cannot be completed.";
    rdfs:subClassOf rdfa:Warning .

rdfa:UnresolvedTerm dc:description "A warning to be used when a Term fails to be resolved.";
    rdfs:subClassOf rdfa:Warning .

rdfa:UnresolvedCURIE dc:description "A warning to be used when a CURIE prefix
    fails to be resolved.";
    rdfs:subClassOf rdfa:Warning .
    
rdfa:context a owl:ObjectProperty, rdf:Property;
    dc:description "Provides extra context for the error, e.g., http response,
    an XPointer/XPath information, or simply the IRI that created the error.";
    rdfs:domain rdfa:PGClass .

B.3 Begriff für die Vokabularerweiterung

B.3 Term for vocabulary expansion

Das Vokabular enthält die folgenden Begriffsdefinitionen (hier im Turtle-Format [TURTLE]):

The Vocabulary includes the following term definitions (shown here in Turtle [TURTLE] format):

@prefix dc:      <http://purl.org/dc/terms/> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfa:    <http://www.w3.org/ns/rdfa#> .

rdfa:usesVocabulary a owl:ObjectProperty, rdf:Property;
    dc:description "Provides a relationship between the host document and a vocabulary
    defined using the @vocab facility of RDFa1.1." .

C. Änderungen

Dieser Abschnitt ist nicht normativ.

C. Changes

This section is non-normative.

C.1 Hauptunterschiede zu RDFa-Syntax 1.0

C.1 Major differences with RDFa Syntax 1.0

Diese Spezifikation führt zahlreiche neue Eigenschaften ein und erweitert den Funktionsumfang einiger Eigenschaften aus der vorherigen Version. Die folgende Zusammenfassung könnte für Entwickler von RDFa-Prozessoren hilfreich sein, ist aber nicht als umfassend zu verstehen.

This specification introduces a number of new features, and extends the behavior of some features from the previous version. The following summary may be helpful to RDFa Processor developers, but is not meant to be comprehensive.

  • Specific rules about XHTML have been moved into a companion specification: [XHTML-RDFA].
  • Prefix mappings can now be declared using @prefix in addition to @xmlns. The usage of @xmlns has been deprecated.
  • Prefix names are now required be be converted to lower-case when the mapping is defined. Prefixes are checked in a case-insensitive manner during CURIE expansion.
  • You can now use an Absolute IRI everywhere you could previously only use a CURIE (e.g., in the value of @datatype).
  • There is now a concept of a term. This concept has replaced the concept of a 'reserved word'. It is possible now to use a 'term' in most places where you could previously only use a CURIE.
  • You can define a default prefix mapping (via @vocab) that will be used on undefined terms.
  • When a triple would include an object literal, and there is no explicit datatype attribute, the object literal will now be a 'plain literal'. In version 1.0 it would have been an 'XMLLiteral'.
  • The @inlist attribute can be used to instruct the processor to generate RDF lists with the resources rather than simple triples.
  • The effect of @src is now identical to @href rather than @about like in version 1.0.

Obwohl diese Spezifikation versucht, so rückwärtskompatibel wie möglich in Bezug auf [RDFA-SYNTAX] zu sein, bedeuten die Änderungen oben, dass es Umstände gibt, in denen es möglich ist, dass unterschiedliche RDF-Tripel ausgegeben werden, wenn das Dokument einerseits von einem RDFa 1.0-Prozessor und andererseits von einem RDFa 1.1-Prozessor verarbeitet wird. Um diese Unterschiede zu minimieren, kann ein Dokumentautor das Folgende tun:

While this specification strives to be as backward compatible as possible with [RDFA-SYNTAX], the changes above mean that there are some circumstances where it is possible for different RDF triples to be output for the same document when processed by an RDFa 1.0 processor vs. an RDFa 1.1 processor. In order to minimize these differences, a document author can do the following:

  • Use the XHTML+RDFa 1.0 document type as defined in [RDFA-SYNTAX].
  • Place a @version attribute with the value XHTML+RDFa 1.0 on the html element.
  • If there are places in the document where an object literal must be an XMLLiteral, use datatype='rdf:XMLLiteral'.
  • If there are places in the document where an object literal must be a plain literal, use datatype=''.
  • If there are places in the document where @src is used, add an @about (unless already present) with the same IRI.

Wenn XHTML+RDFa 1.1-Dokumente erzeugt werden, ist es möglich, die Unkompatibilität zu RDFa 1.0-konformen Prozessoren durch Folgendes zu reduzieren:

When producing XHTML+RDFa 1.1 documents, it is possible to reduce the incompatibilities with RDFa 1.0 conforming processors by doing the following:

  • DO NOT use the @vocab feature.
  • DO NOT rely upon host language defaults for IRI mappings.
  • DO NOT use absolute IRIs in place of CURIEs.
  • Use @xmlns AND @prefix when declaring prefix mappings.
  • DO NOT use TERMs on @datatype, @property, or @typeof.
  • When using TERMs in @rel and @rev, only use ones defined in [RDFA-SYNTAX].
  • Place a version attribute with the value XHTML+RDFa 1.0 on the html element.
  • If there are places in the document where an object literal must be an XMLLiteral, use datatype='rdf:XMLLiteral'.
  • If there are places in the document where an object literal must be a plain literal, use datatype=''.
  • If there are places in the document where @src is used, add an @about (unless already present) with the same IRI.

D. Anerkennungen

Dieser Abschnitt ist nicht normativ.

D. Acknowledgments

This section is non-normative.

Zur Zeit der Veröffentlichung waren die aktiven Mitglieder der RDF Web Applications Working Group:

At the time of publication, the active members of the RDF Web Applications Working Group were:

E. Quellen

E.1 Normative Quellen

[OWL2-OVERVIEW]
W3C OWL Working Group. OWL 2 Web Ontology Language: Overview. 27. Oktober 2009. W3C-Empfehlung. URL: http://www.w3.org/TR/2009/REC-owl2-overview-20091027/
[OWL2-PROFILES]
Boris Motik; Bernardo Cuenca Grau; Ian Horrocks; Zhe Wu; Achille Fokoue; Carsten Lutz. OWL 2 Web Ontology Language:Profiles. 27. Oktober 2009. W3C-Empfehlung. URL: http://www.w3.org/TR/2009/REC-owl2-profiles-20091027/
[OWL2-RDF-BASED-SEMANTICS]
Michael Schneider. OWL 2 Web Ontology Language:RDF-Based Semantics. 27. Oktober 2009. W3C-Empfehlung. URL: http://www.w3.org/TR/2009/REC-owl2-rdf-based-semantics-20091027/
[RDF-MT]
Patrick Hayes. RDF Semantics. 10. Februar 2004. W3C-Empfehlung. URL: http://www.w3.org/TR/2004/REC-rdf-mt-20040210
[RDF-SYNTAX-GRAMMAR]
Dave Beckett. RDF/XML Syntax Specification (Revised). 10. Februar 2004. W3C-Empfehlung. URL: http://www.w3.org/TR/2004/REC-rdf-syntax-grammar-20040210
[RFC2119]
S. Bradner. Key words for use in RFCs to Indicate Requirement Levels. März 1997. Internet RFC 2119. URL: http://www.ietf.org/rfc/rfc2119.txt
[RFC3987]
M. Dürst; M. Suignard. Internationalized Resource Identifiers (IRIs). Januar 2005. Internet RFC 3987. URL: http://www.ietf.org/rfc/rfc3987.txt
[XHTML-RDFA]
Shane McCarron; et. al. XHTML+RDFa 1.1. 7. Juni 2012. W3C-Empfehlung. URL: http://www.w3.org/TR/2012/REC-xhtml-rdfa-20120607/
[XML-NAMES]
Richard Tobin; et al. Namespaces in XML 1.0 (Third Edition). 8. Dezember 2009. W3C-Empfehlung. URL: http://www.w3.org/TR/2009/REC-xml-names-20091208/
[XML10-4e]
C. M. Sperberg-McQueen; et al. Extensible Markup Language (XML) 1.0 (Fourth Edition). 16. August 2006. W3C-Empfehlung. URL: http://www.w3.org/TR/2006/REC-xml-20060816/
[XMLSCHEMA11-2]
Henry S. Thompson; et al. W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes. 5. April 2012. W3C-Empfehlung URL: http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/

E.2 Informative Quellen

[HTML401]
David Raggett; Ian Jacobs; Arnaud Le Hors. HTML 4.01 Specification. 24. Dezember 1999. W3C-Empfehlung. URL: http://www.w3.org/TR/1999/REC-html401-19991224
[MICROFORMATS]
Microformats. URL: http://microformats.org
[QNAMES]
N. Walsh. Using Qualified Names (QNames) as Identifiers in XML Content 17. März 2004. TAG Finding. URL: http://www.w3.org/2001/tag/doc/qnameids-2004-03-17
[RDF-CONCEPTS]
Graham Klyne; Jeremy J. Carroll. Resource Description Framework (RDF): Concepts and Abstract Syntax. 10. Februar 2004. W3C-Empfehlung. URL: http://www.w3.org/TR/2004/REC-rdf-concepts-20040210
[RDF-PRIMER]
Frank Manola; Eric Miller. RDF Primer. 10. Februar 2004. W3C-Empfehlung. URL: http://www.w3.org/TR/2004/REC-rdf-primer-20040210/
[RDF-SYNTAX]
Ora Lassila; Ralph R. Swick. Resource Description Framework (RDF) Model and Syntax Specification. 22. Februar 1999. W3C-Empfehlung. URL: http://www.w3.org/TR/1999/REC-rdf-syntax-19990222
[RDF-TESTCASES]
Jan Grant; Dave Beckett. RDF Test Cases. 10. Februar 2004. W3C-Empfehlung. URL: http://www.w3.org/TR/2004/REC-rdf-testcases-20040210
[RDFA-PRIMER]
Ben Adida, Ivan Herman, Manu Sporny. RDFa Primer. 07. Juni 2012. W3C-Anmerkung. URL: http://www.w3.org/TR/2012/NOTE-rdfa-primer-20120607
[RDFA-SYNTAX]
Ben Adida, et al. RDFa in XHTML: Syntax and Processing. 14. Oktober 2008. W3C-Empfehlung. URL: http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014
[RELAXNG-SCHEMA]
Information technology -- Document Schema Definition Language (DSDL) -- Part 2: Regular-grammar-based validation -- RELAX NG. ISO/IEC 19757-2:2008. URL: http://standards.iso.org/ittf/PubliclyAvailableStandards/c052348_ISO_IEC_19757-2_2008(E).zip
[SAX]
D. Megginson, et al. SAX: The Simple API for XML. Mai 1998. URL: http://www.megginson.com/downloads/SAX/
[TURTLE]
David Beckett, Tim Berners-Lee. Turtle: Terse RDF Triple Language. Januar 2008. W3C Team Submission. URL: http://www.w3.org/TeamSubmission/turtle/
[WIDGETS-URI]
Marcos Cáceres. Widget URI Scheme.. W3C-Anmerkung. URL: http://www.w3.org/TR/2011/WD-widgets-uri-20110927
[XHTML11]
Murray Altheim; Shane McCarron. XHTML™ 1.1 - Module-based XHTML. 31. Mai 2001. W3C-Empfehlung. URL: http://www.w3.org/TR/2001/REC-xhtml11-20010531
[XML-EXC-C14N]
Donald E. Eastlake 3rd; Joseph Reagle; John Boyer. Exclusive XML Canonicalization Version 1.0. 18. Juli 2002. W3C-Empfehlung. URL: http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718/
[XML10]
C. M. Sperberg-McQueen; et al. Extensible Markup Language (XML) 1.0 (Fifth Edition). 26. November 2008. W3C-Empfehlung. URL: http://www.w3.org/TR/2008/REC-xml-20081126/
[XMLSCHEMA11-1]
C. M. Sperberg-McQueen; Henry S. Thompson; Shudi Gao. W3C XML Schema Definition Language (XSD) 1.1 Part 1: Structures. 5. April 2012. W3C-Empfehlung. URL: http://www.w3.org/TR/2012/REC-xmlschema11-1-20120405/