Esta traducción es en desarollo, por Charles McCathieNevile, Claudio Segovia y Eva Méndez (ayudado por el grupo Traductores del Sidar).
Este borrador de la traducción estaba publicada 23 marzo 2004 y no está completa.
La única versión normativa oficial de este documento es la versión original en inglés: http://www.w3.org/TR/REC-rdf-primer/
Copyright © de la traducción: 2004, Fundación Sidar. Se ha tratado de respetar al máximo el contenido de la especificación original en inglés, adaptando la expresión al español. Unas veces hemos introducido entre [corchetes] algunas palabras que ayuden a una mejor comprensión. No obstante, puden haberse cometido errores de la traducción; cualquier error debido a la traducción es de la responsabilidad del traductor y no son achacables en modo alguno al W3C.
Para cualquier comentario sobre la traducción por favor dirigirse al grupo Traductores del Sidar.
Por favor diríjase a la Please refer to the errata
de este documento, que puede incluír algunas correcciones normativas
for this document, which may include some normative
corrections.
Vea también las traducciones de este documento. See also translations.
Copyright
© 2004 W3C® (MIT, ERCIM,
Keio), Todos los derechos reservados.
W3C reponsabilidad
legal, marca
registrada, uso del
documento y aplicación de las reglas de licencia de
software. All Rights Reserved. W3Cliability,trademark,document
useandsoftware
licensingrules apply.
The La infraestructura para la descripción de recursos [en
ingles Resource Description Framework, entonces RDF] es un idioma para
representar información sobre recursos en la Web. is a language for
representing information about resources in the World Wide Web. Esta
introduccción pretende de proporcionar al usuario el conociemiento basico
necesario para usar efectiveamente RDF. This Primer is designed to
provide the reader with the basic knowledge required to effectively use
RDF. Introduce los conceptos basicos de RDF y describe su sintaxis XML
It introduces the basic concepts of RDF and describes its XML
syntax. Describe como definir vocabularios RDF con el lenguaje de
descripción de vocabularios RDF, y proporciona una vista grande de algunas
usos actuales de RDF. It describes how to define RDF vocabularies using
the RDF Vocabulary Description Language, and gives an overview of some
deployed RDF applications. También describe el contenido y motivo de
cada uno de los otros documentos que forman juntos la especificación de
RDF.. It also describes the content and purpose of other RDF
specification documents.
This document has been reviewed by W3C Members and other interested parties, and it has been endorsed by the Director as a W3C Recommendation. 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.
This is one document in a set of six (Primer, Concepts, Syntax, Semantics, Vocabulary, and Test Cases) intended to jointly replace the original Resource Description Framework specifications, RDF Model and Syntax (1999 Recommendation) and RDF Schema (2000 Candidate Recommendation). It has been developed by the RDF Core Working Group as part of the W3C Semantic Web Activity (Activity Statement, Group Charter) for publication on 10 February 2004.
Changes to this document since the Proposed Recommendation Working Draft are detailed in the change log.
The public is invited to send comments to www-rdf-comments@w3.org (archive) and to participate in general discussion of related technology on www-rdf-interest@w3.org (archive).
A list of Una lista en inglés de implementations es
disponibleis available.
The W3C maintains a list of any patent disclosures related to this work.
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/.
1. Introducción
2. Hacer declaraciones sobre recursos
Making Statements About Resources
2.1 Basic Conceptos Basicos
2.2 The
RDF El Modelo RDF
2.3 Structured Property Values and Blank
Nodes
2.4 Typed Literales Tipificados
2.5 Concepts
Summary
3. An XML Syntax for RDF: RDF/XML
3.1 Principias
Basicas Principles
3.2 Abbreviating
and Organizing RDF URIrefs
3.3 RDF/XML
Summary
4. Other RDF Capabilities
4.1 RDF
Containers
4.2 RDF
Collections
4.3 Reificación
de RDF
4.4 More on
Structured Values: rdf:value
4.5 XML
Literals
5. Defining RDF Vocabularies: RDF
Schema
5.1 Describing
Classes
5.2 Describing
Properties
5.3 Interpreting RDF Schema Declarations
5.4 Other Schema
Information
5.5 Richer
Schema Languages
6. Some RDF Applications: RDF in the
Field
6.1 Dublin Core
Metadata Initiative
6.2 PRISM
6.3 XPackage
6.4 RSS 1.0: RDF Site
Summary
6.5 CIM/XML
6.6 Gene Ontology
Consortium
6.7 Describing Device
Capabilities and User Preferences
7. Other Parts of the RDF
Specification
7.1 RDF
Semantics
7.2 Test
Cases
8. References
8.1 Normative References
8.2 Informational References
9. Acknowledgments
A. More on Uniform
Resource Identifiers (URIs)
B. More on the Extensible Markup Language
(XML)
C. Changes
La infraestructura para la descripción de recursos [en inglés Resource
Description Framework, desde RDF] es un idioma para presentar información
dsobre recursos en la Web. is a language for representing information
about resources in the World Wide Web. Su concepción es
particolarmente para presentar metadatos sobre recursos en la Web, tales que
titulo, autor, y fecha de modificación de una página Web, informatción
sobre derechos del autor o condiciones de uso de un documento Web, o orario
de disponibilidad de un recurso compartido. It is particularly intended
for representing metadata about Web resources, such as the title, author, and
modification date of a Web page, copyright and licensing information about a
Web document, or the availability schedule for some shared resource.
Pero, por generalización del concpeto del "recurso en la Web", se puede usar
RDF también para presentar información sobre cosas que se puede identificar
en la Web, aún que no se puede descargarlas de la Web. However, by
generalizing the concept of a "Web resource", RDF can also be used to
represent information about things that can
beidentifiedon the Web, even when they cannot
be directlyretrievedon the Web. Ejemplos
incluyen inforamción sobre cosas disponible por e-commerce (por ejemplo
información sobre especificaión, precios y disponilidad) o descripción de
las preferencías de un usuario de la Web para la mañere de recibir
información. Examples include information about items available from
on-line shopping facilities (e.g., information about specifications, prices,
and availability), or the description of a Web user's preferences for
information delivery.
RDF pretende ser para las situaciones donde la información tiene que
estar tratado por programas, en vez de ser solo mostrado a personas. is
intended for situations in which this information needs to be processed by
applications, rather than being only displayed to people. RDF
proporciona una infraestructura cumuna para expresar esta información de
mañera que permete intercambio de esta información entre programas sin
perder su sentido provides a common framework for expressing this
information so it can be exchanged between applications without loss of
meaning. En tanto que es una infraestructura comuna, disenadores de
aplicaiones pueden ventajarse de la disponibilidad de parsers y herramientas
para tratar RDF. Since it is a common framework, application designers
can leverage the availability of common RDF parsers and processing
tools. La possiblidad de intercambio de información entre herramientas
o sistemas diversas implica que se puede usar la información en campos otro
que eyos para lo cual era creada. The ability to exchange information
between different applications means that the information may be made
available to applications other than those for which it was originally
created.
RDF es basado en la identificación de cosas con los identificadores
[nombres] Web (llamados identificadores universales de recursos [en ingles
Uniform Resource Identifiers desde URI] [[direcciones webs]] y en la
descripción de recursos en termas de propiedades y valores de propiedades.
is based on the idea of identifying things using Web identifiers
(calledUniform Resource Identifiers,
orURIs), and describing resources in terms of
simple properties and property values. Asi RDF puede representar
declaraciones sobre recursos como un gráfico de nodos y arcos,
representandos los recursos, sus propiedades y valores. This enables RDF
to represent simple statements about resources as
agraphof nodes and arcs representing the
resources, and their properties and values. Para concretizar esta
discussión un poco lo más pronto posible, el grupo de declaraciones "hay
una persona, identifcada por To make this discussion somewhat more
concrete as soon as possible, the group of statements "there isa Person identified
by http://www.w3.org/People/EM/contact#me,
quien tiene el nombre 'Eric Miller', la dirección de correo-e whose
name is Eric Miller, whose email address is em@w3.org, y con titulo de
'Dr' "and whose title is Dr." se puede representar como el
gráfico RDF en figura 1: could be represented as the RDF graph in
Figure 1:
Figure 1 illustrates that uestra que RDF
usa URIs para indentificar to identify:
http://www.w3.org/People/EM/contact#mehttp://www.w3.org/2000/10/swap/pim/contact#Personhttp://www.w3.org/2000/10/swap/pim/contact#mailboxmailto:em@w3.org como valor de la
propiedad "dirección correo-e". (RDF usa también texto como "Eric
Mille" y valores con tipos definidos como numeros integeres o fechas como
valores de propiedades)RDF proporciona también un sintaxis XML (llamado RDF/XML) para guardar y
intercambiar estos gráficos. also provides an XML-based syntax
(calledRDF/XML) for recording and exchanging
these graphs. Example 1 es un pequeño ejemplo
de RDF que corresponde al gráfico en is a small chunk of RDF in RDF/XML
corresponding to the graph in Figure 1:
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:contact="http://www.w3.org/2000/10/swap/pim/contact#">
<contact:Person rdf:about="http://www.w3.org/People/EM/contact#me">
<contact:fullName>Eric Miller</contact:fullName>
<contact:mailbox rdf:resource="mailto:em@w3.org"/>
<contact:personalTitle>Dr.</contact:personalTitle>
</contact:Person>
</rdf:RDF>
Nota que este RDF/XML contiene también unas URIs, asi que propiedades
como mailbox [dirección de correo-e] y fullName
[nombre completo] de forma abreviada con espacios de nombres y sus valores
em@w3.org y Eric Miller. Note that this
RDF/XML also contains URIs, as well as properties
likemailboxandfullName(in
an abbreviated form), and their respective
valuesem@w3.org, andEric
Miller.
Like HTML, this RDF/XML Como HTML, este RDF/XML es tratabile por una
programa, y usando las URIs puede enlazar información a traves de la Web.
is machine processable and, using URIs, can link pieces of information
across the Web. Pero, no como hipertexto normal, en RDF las URIs puede
refererse a cualquier cosa, incluso cosas non descargabiles de la web (como
la persona Eric Miller) However, unlike conventional hypertext, RDF URIs
can refer to any identifiable thing, including things that may not be
directly retrievable on the Web (such as the person Eric Miller).
Entonces, ademas de describir cosas como paginas webs, RDF puede describir
coches, empresas, personas, novedades, etc. The result is that in
addition to describing such things as Web pages, RDF can also describe cars,
businesses, people, news events, etc. Y de mas, propiedades RDF tienen
sus propias URIs, para identificar de una mara exacta las relaciones entre
las cosas enlazadas. In addition, RDF properties themselves have URIs,
to precisely identify the relationships that exist between the linked
items.
Los siguientes documentos juntos forman la especificaión de RDF The
following documents contribute to the specification of RDF:
Esta introducción pretende a proporcionar RDF y describir unos usos
actuales, para ayudar los disennadores y los desarolladores de sistemas de
información entender las caracteristicas de RDF y como usarlos. This
Primer is intended to provide an introduction to RDF and describe some
existing RDF applications, to help information system designers and
application developers understand the features of RDF and how to use
them. En particolar, pretende responder a preguntas tal que: In
particular, the Primer is intended to answer such questions as:
The Primer is a non-normative document, Esta introducción es un
documento non-normativo, que quiere decir que no proporcione una
especificaión definitiva de RDF. which means that it does not provide a
definitive specification of RDF. Los ejemplos y otra material estan
proporcionados par ayudar los lectores entender RDF, pero no proporcionan
necesarimente respuestos definitivos o completos. The examples and other
explanatory material in the Primer are provided to help readers understand
RDF, but they may not always provide definitive or fully-complete
answers. En estos casos, hay que mirar las partes pertinentes de la
espcificaión RDF. In such cases, the relevant normative parts of the
RDF specification should be consulted. Para facilitarlo, este
introducción describe las funciones de cada documento de la especificación
RDF, y proporciona enlazas a las partes pertinentes de la especificaión
normativa a los punto appropriadas en la discussión.To help in doing
this, the Primer describes the roles these other documents play in the
complete specification of RDF, and provides links pointing to the relevant
parts of the normative specifications, at appropriate places in the
discussion.
Es importante tener en cuenta que estos documentos de RDF
actualizan y calrifican las especificaiones It should also be noted that
these RDF documents update and clarifypreviously-published RDF specifications,
the Resource
Description Framework (RDF) Model and Syntax Specification [RDF-MS] y and the Resource Description
Framework (RDF) Schema Specification 1.0 [RDF-S]
antiguas de RDF. He resultado que hay cambios en la terminologia, sintaxis, y
conceptos.. As a result, there have been some changes in terminology,
syntax, and concepts. Esta introducción presente el grupo de
especificaiones actualizadas, citadas arriba. This Primer reflects the
newer set of RDF specifications given in the bulleted list of RDF documents
cited above. Entonces lectores conociendo las viejas especificaiones, o
tutoriales y introducciones basados en ellos tiene que saber que hay
diferencias con los doucmentos actuales y ellos previos. Hence, readers
familiar with the older specifications, and with earlier tutorial and
introductory articles based on them, should be aware that there may be
differences between the current specifications and those previous
documents. Se puede mirar la lista de cuestiones sobre RDF
(The RDF Issue
Tracking document [RDFISSUE] solo disponile
en inglés) para ver las cuestiones sobre las previas especificaiones y sus
resoluciones en las especificaiones actuales. can be consulted for a
list of issues raised concerning the previous RDF specifications, and their
resolution in the current specifications.
RDF pretende que proporcionar una mañera sencilla para crear
declaraciones sobre recursos en la web, es decir paginas web.is intended
to provide a simple way to make statements about Web resources, e.g., Web
pages. Esta sección describe las ideas básicas al fondo de la manera
con cual RDF proporciona esta capacidad (la especificación normativa que
describe estos conceptos es This section describes the basic ideas
behind the way RDF provides these capabilities (the normative specification
describing these concepts is RDF Concepts and Abstract
Syntax [RDF-CONCEPTS] disponible solo en
ingles).
Imagina de intentar decir que alguien llamada John Smith ha creado una
pågina web particolar. Imagine trying to state that someone named John
Smith created a particular Web page. Una mañera sencilla para decirlo
en un idioma natural como español es en la forma de una declaración,
como:A straightforward way to state this in a natural language such as
English would be in the form of a simple statement such as:
http://www.example.org/index.html
has acreatorwhose value is
tiene un creador cuyo nombre es John
Smith
Partes de esta declaración tienen enfásis para mostrar que, para
describir las propiedades de algo, tiene que poder nombrar o identificar unas
cosas: of this statement are emphasized to illustrate that, in order to
describe the properties of something, there need to be ways to name, or
identify, a number of things:
En esta declaración la URL [dirección web - los siglas desde Uniform
Resource Locator] de la página es usado para identificarla. In this
statement, the Web page's URL (Uniform Resource Locator) is used to identify
it. La palabra "creador" es usado para identificar la propiedad, y las
palabras "John Smith" estan usadas para identificar el valor de esta
propiedad. In addition, the word "creator" is used to identify the
property, and the two words "John Smith" to identify the thing (a person)
that is the value of this property.
Se podrié describir otras propiedades de la pagina por declaraciones
addicionales de la misma forma general, usando la URL para identificar la
página y palabras (o otras expresiones) para identificar las propiedades y
sus valores. Other properties of this Web page could be described by
writing additional English statements of the same general form, using the URL
to identify the page, and words (or other expressions) to identify the
properties and their values. Por ejemplo, la fecha de la creación de
la página y el idioma en lo cual la página está escrita se puede
expresarse con estas declaraciones adicionales: For example, the date
the page was created, and the language in which the page is written, could be
described using the additional statements:
http://www.example.org/index.html
has acreation-datewhose value
isAugust tiene una feche de creación que tiene el valor
Agosto 16, 1999
http://www.example.org/index.html has
alanguagewhose value
isEnglish tiene un idioma,
de cual el valor es español
RDF está basado en la idea que las cosas a ser descriptas tienen RDF
is based on the idea that the things being described haveproperties
propiedades las cuales tienen valores, y esos recursos pueden ser
descriptos a través de declaraciones, similares a las descriptas más
arriba, que especifiquen esas propiedades y valores. RDF usa una
terminología particular para hablar de las diversas partes de las
declaraciones. which have values, and that resources can be described by
making statements, similar to those above, that specify those properties and
values. RDF uses a particular terminology for talking about the various parts
of statements. Specifically, the part that identifies the thing the statement
is about (the Web page in this example) is called the Específicamente,
la parte que identifica la cosa acerca de la que la declaració trata (la
página web, en este ejemplo) se la llama subjeto
subject. The part that identifies the property or
characteristic of the subject that the statement specifies (creator,
creation-date, or language in these examples) is called the La parte
que identifica la propiedad o características del sujeto que la declaración
especifica (creador, fecha de creación, o lenguaje en esos ejemplos) es
llamada predicado, y la
parte que identifica el valor de esa propiedad es llamada and the part
that identifies the value of that property is called the objeto. Así,
tomando la declaración en español So, taking the English
statement
http://www.example.org/index.html
tiene uncreador cuyo valor es has
acreatorwhose value is
John Smith
los términos RDF de las diversas partes de la declaración son the
RDF terms for the various parts of the statement are:
http://www.example.org/index.htmlDe todas formas, mientras el español es bueno para la comunicación entre
(hispanoparlantes) humanos, RDF trata acerca de declaraciones procesables
por máquinas. Para hacer este tipo de declaraciones para ser procesadas
por máquinas, se necesitan dos cosas:However, while English is good for
communicating between (English-speaking) humans, RDF is about
makingmachine-processablestatements. To make
these kinds of statements suitable for processing by machines, two things are
needed:
Afortunadamente, la arquitectura web existente posee ambas prestaciones
necesarias Fortunately, the existing Web architecture provides both
these necessary facilities.
As illustrated earlier, the Web already provides one form of
identifier, the Como se mostró antes, la Web ya provee una forma de
identificador, el Localizador Uniforme de Recursos
Uniform Resource Locator (URL) [desde inglés Uniform
Resource Locator]. Un URL fué usado en el ejemplo original para identificar
la página web que creó John Smith. Un URL es una cadena de caracteres que
identifican un recurso web representando su mecanismo de acceso primario
(esencialmente, su "ubicación" en la red). Pero es también importante poder
guardar información sobre muchas cosas quien, al contrario a las webs, no
tienen ubicaciones en la red, ni un URL. However, it is also important
to be able to record information about many things that, unlike Web pages, do
not have network locations or URLs A URL was used in the original
example to identify the Web page that John Smith created. A URL is a
character string that identifies a Web resource by representing its primary
access mechanism (essentially, its network "location"). However, it is also
important to be able to record information about many things that, unlike Web
pages, do not have network locations or URLs.
The Web provides a more general form of identifier for these
purposes, called the La Web provee una forma más general de
identificador para estos propósitos, llamado el Identificador Uniforme de
Recurso Uniform Resource Identifier (URI). Los URL son un tipo
particular de URI. Todos los URI comparten la propiedad que diferentes
personas u organizaciones pueden crearlos independientemente , y usarlos para
identificar cosas. De todos modos, los URI no se limitan a identificar cosas
que tienen un lugar en la red, o usar otros mecanismos de acceso a
ordenadores . De hecho, un URI puede ser creado para referenciar cualquier
cosa que necesita estar referenciada en una declaración, incluyendo
URLs are a particular kind of URI. All URIs share the property that
different persons or organizations can independently create them, and use
them to identify things. However, URIs are not limited to identifying things
that have network locations, or use other computer access mechanisms. In
fact, a URI can be created to refer to anything that needs to be referred to
in a statement, including
Because of this generality, RDF uses URIs as the basis of its
mechanism for identifying the subjects, predicates, and objects in
statements. To be more precise, RDF uses Debido a esta generalidad, RDF
usa los URI como base de su mecanismo de identificación de sujetos,
predicados, y objetos en las declaraciones. Para ser más preciso, RDF usa referencías URI
references [URIS]. Una referencia URI
(o URIref) es un URI, junto con un fragmento identificador opcional. Por
ejemplo, la referencia URI A URI reference
(orURIref) is a URI, together with an
optionalfragment identifierat the end. For
example, the URI reference
http://www.example.org/index.html#section2 consists of the
URI consiste en el URI http://www.example.org/index.html
and (separated by the "#" character) the fragment identifier
Section2. (separado por el caracter "#") el fragmento
identificador Section2. RDF URIrefs can contain Unicode Las
URIrefs de RDF pueden contener caracteres Unicode [UNICODE] characters (see ver
[RDF-CONCEPTS]), permitiendo que muchos
lenguajes se vean reflejados en los URIrefs. RDF define un recurso como
cualquier cosa que sea identificable por una referencia URI, así que las
URIrefs permiten a RDF describir práticamente todo, y establecer relaciones
entre esas cosas .allowing many languages to be reflected in URIrefs.
RDF defines aresourceas anything that is
identifiable by a URI reference, so using URIrefs allows RDF to describe
practically anything, and to state relationships between such things as
well. URIrefs and fragment identifiers are discussed further
in Las URIrefs y los fragmentos identificadores son discutidos más
adelante en el Apéndice A, y en and in
[RDF-CONCEPTS].
To represent RDF statements in a machine-processable way, RDF uses
the Para representar declaraciones RDF de una forma procesable por
máquina, RDF usa el Extensible Markup
Language Lenguaje Extensible de Marcas [XML]
[desde Extensible Markup Language]. XML fue diseñado para permitir a
cualquiera diseñar su propio formato de documento para luego escribir un
documento en ese formato. RDF define un lenguaje de marcado XML específico,
denominado was designed to allow anyone to design their own document
format and then write a document in that format. RDF defines a specific XML
markup language, referred to as RDF/XML, para ser usado en la
representación de la información RDF, y para intercambiarla entre
máquinas. Un ejemplo de RDF/XML fué dado en la for use in representing
RDF information, and for exchanging it between machines. An example of
RDF/XML was given in Sección 1. Ese ejemplo
That example (Ejemplo 1) usa etiquetas
como used tags such as <contact:fullName> y
<contact:personalTitle> para delimitar el contenido de
texto to delimit the text content Eric Miller y
Dr., respectivamente. Such tags allow programs written with an
understanding of what the tags mean to properly interpret that content. Tanto
el contenido XML como (con ciertas excepciones) las etiquetas pueden contener
caracteres Unicode respectively. Such tags allow programs written with
an understanding of what the tags mean to properly interpret that content.
Both XML content and (with certain exceptions) tags can contain Unicode
[UNICODE] permitiendo representar directamente
información en muchos lenguajes. El characters, allowing information
from many languages to be directly represented. Apéndice B provee de información adicional de XML en
general. La sintaxis específica RDF/XML usada para RDF está descripta con
más detalle en la provides further background on XML in general. The
specific RDF/XML syntax used for RDF is described in more detail in Sección 3, y está definida normativamente en and is
normatively defined in [RDF-SYNTAX]
Section 2.1 has introduced RDF's basic statement concepts, the idea of using URI references to identify the things referred to in RDF statements, and RDF/XML as a machine-processable way to represent RDF statements. With that background, this section describes how RDF uses URIs to make statements about resources. The introduction said that RDF was based on the idea of expressing simple statements about resources, where each statement consists of a subject, a predicate, and an object. In RDF, the English statement:
http://www.example.org/index.html
has a creator whose value is John
Smith
could be represented by an RDF statement having:
http://www.example.org/index.htmlhttp://purl.org/dc/elements/1.1/creatorhttp://www.example.org/staffid/85740Note how URIrefs are used to identify not only the subject of the original statement, but also the predicate and object, instead of using the words "creator" and "John Smith", respectively (some of the effects of using URIrefs in this way will be discussed later in this section).
RDF models statements as nodes and arcs in a graph. RDF's graph model is defined in [RDF-CONCEPTS]. In this notation, a statement is represented by:
So the RDF statement above would be represented by the graph shown in Figure 2:
Groups of statements are represented by corresponding groups of nodes and arcs. So, to reflect the additional English statements
http://www.example.org/index.html
has a creation-date whose value is August 16,
1999
http://www.example.org/index.html has a
language whose value is English
in the RDF graph, the graph shown in Figure 3 could be used (using suitable URIrefs to name the properties "creation-date" and "language"):
Figure 3 illustrates that objects in RDF statements
may be either URIrefs, or constant values (called literals)
represented by character strings, in order to represent certain kinds of
property values. (In the case of the predicate
http://purl.org/dc/elements/1.1/language the literal is an
international standard two-letter code for English.) Literals may not be used
as subjects or predicates in RDF statements. In drawing RDF graphs, nodes
that are URIrefs are shown as ellipses, while nodes that are literals are
shown as boxes. (The simple character string literals used in these examples
are called plain
literals, to distinguish them from the typed
literals to be introduced in Section 2.4.
The various kinds of literals that can be used in RDF statements are defined
in [RDF-CONCEPTS]. Both plain and typed
literals can contain Unicode [UNICODE] characters,
allowing information from many languages to be directly represented.)
Sometimes it is not convenient to draw graphs when discussing them, so an alternative way of writing down the statements, called triples, is also used. In the triples notation, each statement in the graph is written as a simple triple of subject, predicate, and object, in that order. For example, the three statements shown in Figure 3 would be written in the triples notation as:
<http://www.example.org/index.html> <http://purl.org/dc/elements/1.1/creator> <http://www.example.org/staffid/85740> . <http://www.example.org/index.html> <http://www.example.org/terms/creation-date> "August 16, 1999" . <http://www.example.org/index.html> <http://purl.org/dc/elements/1.1/language> "en" .
Each triple corresponds to a single arc in the graph, complete with the
arc's beginning and ending nodes (the subject and object of the statement).
Unlike the drawn graph (but like the original statements), the triples
notation requires that a node be separately identified for each statement it
appears in. So, for example, http://www.example.org/index.html
appears three times (once in each triple) in the triples representation of
the graph, but only once in the drawn graph. However, the triples represent
exactly the same information as the drawn graph, and this is a key point:
what is fundamental to RDF is the graph model of the statements. The
notation used to represent or depict the graph is secondary.
The full triples notation requires that URI references be written out
completely, in angle brackets, which, as the example above illustrates, can
result in very long lines on a page. For convenience, the Primer uses a
shorthand way of writing triples (the same shorthand is also used in other
RDF specifications). This shorthand substitutes an XML qualified
name (or QName) without angle brackets as an abbreviation for a
full URI reference (QNames are discussed further in Appendix B). A QName contains a prefix that
has been assigned to a namespace URI, followed by a colon, and then a
local name. The full URIref is formed from the QName by appending
the local name to the namespace URI assigned to the prefix. So, for example,
if the QName prefix foo is assigned to the namespace URI
http://example.org/somewhere/, then the QName
foo:bar is shorthand for the URIref
http://example.org/somewhere/bar. Primer examples will also use
several "well-known" QName prefixes (without explicitly specifying them each
time), defined as follows:
prefix rdf:, namespace URI:
http://www.w3.org/1999/02/22-rdf-syntax-ns#
prefix rdfs:, namespace URI:
http://www.w3.org/2000/01/rdf-schema#
prefix dc:, namespace URI:
http://purl.org/dc/elements/1.1/
prefix owl:, namespace URI:
http://www.w3.org/2002/07/owl#
prefix ex:, namespace URI: http://www.example.org/
(or http://www.example.com/)
prefix xsd:, namespace URI:
http://www.w3.org/2001/XMLSchema#
Obvious variations on the "example" prefix ex: will also be
used as needed in the examples, for instance,
prefix exterms:, namespace URI:
http://www.example.org/terms/ (for terms used by an example
organization),
prefix exstaff:, namespace URI:
http://www.example.org/staffid/ (for the example organization's
staff identifiers),
prefix ex2:, namespace URI:
http://www.domain2.example.org/ (for a second example
organization), and so on.
Using this new shorthand, the previous set of triples can be written as:
ex:index.html dc:creator exstaff:85740 . ex:index.html exterms:creation-date "August 16, 1999" . ex:index.html dc:language "en" .
SinceRDF uses URIrefs instead of
words to name things in statements, RDF refers to a set of URIrefs
(particularly a set intended for a specific purpose) as a
vocabulary. Often, the URIrefs in such vocabularies are organized so
that they can be represented as a set of QNames using a common prefix. That
is, a common namespace URIref will be chosen for all terms in a vocabulary,
typically a URIref under the control of whoever is defining the vocabulary.
URIrefs that are contained in the vocabulary are formed by appending
individual local names to the end of the common URIref. This forms a set of
URIrefs with a common prefix. For instance, as illustrated by the previous
examples, an organization such as example.org might define a vocabulary
consisting of URIrefs starting with the prefix
http://www.example.org/terms/ for terms it uses in its business,
such as "creation-date" or "product", and another vocabulary of URIrefs
starting with http://www.example.org/staffid/ to identify its
employees. RDF uses this same approach to define its own vocabulary of terms
with special meanings in RDF. The URIrefs in this RDF vocabulary all begin
with http://www.w3.org/1999/02/22-rdf-syntax-ns#, conventionally
associated with the QName prefix rdf:. The RDF Vocabulary
Description Language (described in Section 5)
defines an additional set of terms having URIrefs that begin with
http://www.w3.org/2000/01/rdf-schema#, conventionally associated
with the QName prefix rdfs:. (Where a specific QName prefix is
commonly used in connection with a given set of terms in this way, the QName
prefix itself is sometimes used as the name of the vocabulary. For example,
someone might refer to "the rdfs: vocabulary".)
Using common URI prefixes provides a convenient way to organize the URIrefs for a related set of terms. However, this is just a convention. The RDF model only recognizes full URIrefs; it does not "look inside" URIrefs or use any knowledge about their structure. In particular, RDF does not assume there is any relationship between URIrefs just because they have a common leading prefix (see Appendix A for further discussion). Moreover, there is nothing that says that URIrefs with different leading prefixes cannot be considered part of the same vocabulary. A particular organization, process, tool, etc. can define a vocabulary that is significant for it, using URIrefs from any number of other vocabularies as part of its vocabulary.
In addition, sometimes an organization will use a vocabulary's namespace
URIref as the URL of a Web resource that provides further information about
that vocabulary. For example, as noted earlier, the QName prefix
dc: will be used in Primer examples, associated with the
namespace URIref http://purl.org/dc/elements/1.1/. In fact, this
refers to the Dublin Core vocabulary described in Section 6.1. Accessing this namespace URIref in a Web
browser will retrieve additional information about the Dublin Core vocabulary
(specifically, an RDF schema). However, this is also just a convention. RDF
does not assume that a namespace URI identifies a retrievable Web resource
(see Appendix B for further discussion).
In the rest of the Primer, the term vocabulary will be used when referring to a set of URIrefs defined for some specific purpose, such as the set of URIrefs defined by RDF for its own use, or the set of URIrefs defined by example.org to identify its employees. The term namespace will be used only when referring specifically to the syntactic concept of an XML namespace (or in describing the URI assigned to a prefix in a QName).
URIrefs from different vocabularies can be freely mixed in RDF graphs. For
example, the graph in Figure 3 uses URIrefs from the
exterms:, exstaff:, and dc:
vocabularies. Also, RDF imposes no restrictions on how many statements using a given URIref as predicate can
appear in a graph to describe the same resource. For example, if the resource
ex:index.html had been created by the cooperative efforts of
several staff members in addition to John Smith, example.org might have
written the statements:
ex:index.html dc:creator exstaff:85740 . ex:index.html dc:creator exstaff:27354 . ex:index.html dc:creator exstaff:00816 .
These examples of RDF statements begin to illustrate some of the
advantages of using URIrefs as RDF's basic way of identifying things. For
instance, in the first statement, instead of identifying the creator of the
Web page by the character string "John Smith", he has been assigned a URIref,
in this case (using a URIref based on his employee number)
http://www.example.org/staffid/85740 . An advantage of using a
URIref in this case is that the identification of the statement's subject can
be more precise. That is, the creator of the page is not the character string
"John Smith", or any one of the thousands of people named John Smith, but the
particular John Smith associated with that URIref (whoever created the URIref
defines the association). Moreover, since there is a URIref to refer to John
Smith, he is a full-fledged resource, and additional information can be
recorded about him, simply by adding additional RDF statements with John's
URIref as the subject. For example, Figure 4 shows
some additional statements giving John's name and age.
These examples also illustrate that RDF uses URIrefs as
predicates in RDF statements. That is, rather than using character
strings (or words) such as "creator" or "name" to identify properties, RDF
uses URIrefs. Using URIrefs to identify properties is important for a number
of reasons. First, it distinguishes the properties one person may use from
different properties someone else may use that would otherwise be identified
by the same character string. For instance, in the example in Figure 4, example.org uses "name" to mean someone's full
name written out as a character string literal (e.g., "John Smith"), but
someone else may intend "name" to mean something different (e.g., the name of
a variable in a piece of program text). A program encountering "name" as a
property identifier on the Web (or merging data from multiple sources) would
not necessarily be able to distinguish these uses. However, if example.org
writes http://www.example.org/terms/name for its "name"
property, and the other person writes
http://www.domain2.example.org/genealogy/terms/name for hers, it
is clear that there are distinct properties involved (even if a program
cannot automatically determine the distinct meanings). Also, using URIrefs to
identify properties enables the properties to be treated as resources
themselves. Since properties are resources, additional information can be
recorded about them (e.g., the English description of what example.org means
by "name"), simply by adding additional RDF statements with the property's
URIref as the subject.
Using URIrefs as subjects, predicates, and objects in RDF statements supports the development and use of shared vocabularies on the Web, since people can discover and begin using vocabularies already used by others to describe things, reflecting a shared understanding of those concepts. For example, in the triple
ex:index.html dc:creator exstaff:85740 .
the predicate dc:creator, when fully expanded as a URIref, is
an unambiguous reference to the "creator" attribute in the Dublin Core
metadata attribute set (discussed further in Section
6.1), a widely-used set of attributes (properties) for describing
information of all kinds. The writer of this triple is effectively saying
that the relationship between the Web page (identified by
http://www.example.org/index.html ) and the creator of the page
(a distinct person, identified by
http://www.example.org/staffid/85740 ) is exactly the concept
identified by http://purl.org/dc/elements/1.1/creator. Another person familiar
with the Dublin Core vocabulary, or who finds out what
dc:creator means (say by looking up its definition on the Web)
will know what is meant by this relationship. In addition, based on this
understanding, people can write programs to behave in accordance with that
meaning when processing triples containing the predicate
dc:creator.
Of course, this
depends on increasing the general use of URIrefs to refer to things instead
of using literals; e.g., using URIrefs like exstaff:85740 and
dc:creator instead of character string literals like John
Smith and creator. Even then, RDF's use of URIrefs
does not solve all identification problems because, for example, people can
still use different URIrefs to refer to the same thing. For this reason, it
is a good idea to try to use terms from existing vocabularies (such as the
Dublin Core) where possible, rather than making up new terms that might
overlap with those of some other vocabulary. Appropriate vocabularies for use
in specific application areas are being developed all the time, as
illustrated by the applications described in Section
6. However, even when synonyms are created, the fact that these different
URIrefs are used in the commonly-accessible "Web space" provides the
opportunity both to identify equivalences among these different references,
and to migrate toward the use of common references.
In addition, it is important to distinguish between any meaning that
RDF itself associates with terms (such as dc:creator in
the previous example) used in RDF statements and additional,
externally-defined meaning that people (or programs written by those
people) might associate with those terms. As a language, RDF directly defines
only the graph syntax of subject, predicate, and object triples, certain
meanings associated with URIrefs in the rdf: vocabulary, and
certain other concepts to be described later. These things are normatively
defined in [RDF-CONCEPTS] and [RDF-SEMANTICS]. However, RDF does not define
the meanings of terms from other vocabularies, such as
dc:creator, that might be used in RDF statements. Specific
vocabularies will be created, with specific meanings assigned to the URIrefs
defined in them, externally to RDF. RDF statements using URIrefs from these
vocabularies may convey the specific meanings associated with those terms to
people familiar with these vocabularies, or to RDF applications written to
process these vocabularies, without conveying any of these meanings to an
arbitrary RDF application not specifically written to process these
vocabularies.
For example, people can associate meaning with a triple such as
ex:index.html dc:creator exstaff:85740 .
based on the meaning they associate with the appearance of the word
"creator" as part of the URIref dc:creator, or based on their
understanding of the specific definition of dc:creator in the
Dublin Core vocabulary. However, as far as an arbitrary RDF application is
concerned the triple might as well be something like
fy:joefy.iunm ed:dsfbups fytubgg:85740 .
as far as any built-in meaning is concerned. Similarly, any natural
language text describing the meaning of dc:creator that might be
found on the Web provides no additional meaning that an arbitrary RDF
application can directly use.
Of course, URIrefs from a particular vocabulary can be used in RDF
statements even though a given application may not be able to associate any
special meanings with them. For example, generic RDF software would recognize
that the above expression is an RDF statement, that ed:dsfbups
is the predicate, and so on. It will simply not associate with the triple any
special meaning that the vocabulary developer might have associated with a
URIref like ed:dsfbups. Moreover, based on their understanding
of a given vocabulary, people can write RDF applications to behave in
accordance with the special meanings assigned to URIrefs from that
vocabulary, even though that meaning will not be accessible to RDF
applications not written in that way.
The result of all this is that RDF provides a way to make statements that
applications can more easily process. An application cannot actually
"understand" such statements, as noted already, any
more than a database system "understands" terms like "employee" or "salary"
in processing a query like SELECT NAME FROM EMPLOYEE WHERE SALARY >
35000. However, if an application is appropriately written, it
can deal with RDF statements in a way that makes it seem like it does
understand them, just as a database system and its
applications can do useful work in processing employee and payroll
information without understanding "employee" and "payroll". For
example, a user could search the Web for all book reviews and create an
average rating for each book. Then, the user could put that information back
on the Web. Another Web site could take that list of book rating averages and
create a "Top Ten Highest Rated Books" page. Here, the availability and use
of a shared vocabulary about ratings, and a shared group of URIrefs
identifying the books they apply to, allows individuals to build a
mutually-understood and increasingly-powerful (as additional contributions
are made) "information base" about books on the Web. The same principle
applies to the vast amounts of information that people create about thousands
of subjects every day on the Web.
RDF statements are similar to a number of other formats for recording information, such as:
and information in these formats can be treated as RDF statements, allowing RDF to be used to integrate data from many sources.
Things would be very simple if the only types of information to be
recorded about things were obviously in the form of the simple RDF statements
illustrated so far. However, most real-world data involves structures that
are more complicated than that, at least on the surface. For instance, in the
original example, the date the Web page was created is recorded as a single
exterms:creation-date property, with a plain literal as its
value. However, suppose the value of the exterms:creation-date
property needed to record the month, day, and year as separate pieces of
information? Or, in the case of John Smith's personal information, suppose
John's address was being described. The whole address could be written out as
a plain literal, as in the triple
exstaff:85740 exterms:address "1501 Grant Avenue, Bedford, Massachusetts 01730" .
However, suppose John's address needed to be recorded as a structure consisting of separate street, city, state, and postal code values? How would this be done in RDF?
Structured information like this is represented in RDF by considering the
aggregate thing to be described (like John Smith's address) as a resource,
and then making statements about that new resource. So, in the RDF graph, in
order to break up John Smith's address into its component parts, a new node
is created to represent the concept of John Smith's address, with a new
URIref to identify it, say
http://www.example.org/addressid/85740 (abbreviated as
exaddressid:85740). RDF statements (additional arcs and nodes)
can then be written with that node as the subject, to represent the
additional information, producing the graph shown in Figure 5:
or the triples:
exstaff:85740 exterms:address exaddressid:85740 . exaddressid:85740 exterms:street "1501 Grant Avenue" . exaddressid:85740 exterms:city "Bedford" . exaddressid:85740 exterms:state "Massachusetts" . exaddressid:85740 exterms:postalCode "01730" .
This way of representing structured information in RDF can involve
generating numerous "intermediate" URIrefs such as
exaddressid:85740 to represent aggregate concepts such as John's
address. Such concepts may never need to be referred to directly from outside
a particular graph, and hence may not require "universal" identifiers. In
addition, in the drawing of the graph representing the group of
statements shown in Figure 5, the URIref assigned to
identify "John Smith's address" is not really needed, since the graph could
just as easily have been drawn as in Figure 6:
Figure 6, which is a perfectly good RDF graph, uses a node without a URIref to stand for the concept of "John Smith's address". This blank node serves its purpose in the drawing without needing a URIref, since the node itself provides the necessary connectivity between the various other parts of the graph. (Blank nodes were called anonymous resources in [RDF-MS].) However, some form of explicit identifier for that node is needed in order to represent this graph as triples. To see this, trying to write the triples corresponding to what is shown in Figure 6 would produce something like:
exstaff:85740 exterms:address ??? . ??? exterms:street "1501 Grant Avenue" . ??? exterms:city "Bedford" . ??? exterms:state "Massachusetts" . ??? exterms:postalCode "01730" .
where ??? stands for something that indicates the presence of the blank
node. Since a complex graph might contain more than one blank node, there
also needs to be a way to differentiate between these different blank nodes
in a triples representation of the graph. As a result, triples use blank node
identifiers, having the form _:name, to indicate the
presence of blank nodes. For instance, in this example a blank node
identifier _:johnaddress might be used to refer to the blank
node, in which case the resulting triples might be:
exstaff:85740 exterms:address _:johnaddress . _:johnaddress exterms:street "1501 Grant Avenue" . _:johnaddress exterms:city "Bedford" . _:johnaddress exterms:state "Massachusetts" . _:johnaddress exterms:postalCode "01730" .
In a triples representation of a graph, each distinct blank node in the graph is given a different blank node identifier. Unlike URIrefs and literals, blank node identifiers are not considered to be actual parts of the RDF graph (this can be seen by looking at the drawn graph in Figure 6 and noting that the blank node has no blank node identifier). Blank node identifiers are just a way of representing the blank nodes in a graph (and distinguishing one blank node from another) when the graph is written in triple form. Blank node identifiers also have significance only within the triples representing a single graph (two different graphs with the same number of blank nodes might independently use the same blank node identifiers to distinguish them, and it would be incorrect to assume that blank nodes from different graphs having the same blank node identifiers are the same). If it is expected that a node in a graph will need to be referenced from outside the graph, a URIref should be assigned to identify it. Finally, because blank node identifiers represent (blank) nodes, rather than arcs, in the triple form of an RDF graph, blank node identifiers may only appear as subjects or objects in triples; blank node identifiers may not be used as predicates in triples.
The beginning of this section noted that aggregate structures, like John Smith's address, can be represented by considering the aggregate thing to be described as a separate resource, and then making statements about that new resource. This example illustrates an important aspect of RDF: RDF directly represents only binary relationships, e.g. the relationship between John Smith and the literal representing his address. Representing the relationship between John and the group of separate components of this address involves dealing with an n-ary (n-way) relationship (in this case, n=5) between John and the street, city, state, and postal code components. In order to represent such structures directly in RDF (e.g., considering the address as a group of street, city, state, and postal code components), this n-way relationship must be broken up into a group of separate binary relationships. Blank nodes provide one way to do this. For each n-ary relationship, one of the participants is chosen as the subject of the relationship (John in this case), and a blank node is created to represent the rest of the relationship (John's address in this case). The remaining participants in the relationship (such as the city in this example) are then represented as separate properties of the new resource represented by the blank node.
Blank nodes also provide a way to more accurately make statements about
resources that may not have URIs, but that are described in terms of
relationships with other resources that do have URIs. For example,
when making statements about a person, say Jane Smith, it may seem natural to
use a URI based on that person's email address as her URI, e.g.,
mailto:jane@example.org. However, this approach can cause
problems. For example, it may be necessary to record information both about
Jane's mailbox (e.g., the server it is on) as well as about Jane
herself (e.g., her current physical address), and using a URIref for
Jane based on her email address makes it difficult to know whether it is Jane
or her mailbox that is being described. The same problem exists when a
company's Web page URL, say http://www.example.com/, is used as
the URI of the company itself. Once again, it may be necessary to record
information about the Web page itself (e.g., who created it and when) as well
as about the company, and using http://www.example.com/ as an
identifier for both makes it difficult to know which of these is the actual
subject.
The fundamental problem is that using Jane's mailbox as a
stand-in for Jane is not really accurate: Jane and her mailbox are
not the same thing, and hence they should be identified differently. When
Jane herself does not have a URI, a blank node provides a more accurate way
of modeling this situation. Jane can be represented by a blank node, and that
blank node used as the subject of a statement with
exterms:mailbox as the property and the URIref
mailto:jane@example.org as its value. The blank node could also
be described with an rdf:type property having a value of
exterms:Person (types are discussed in more detail in the
following sections), an exterms:name property having a value of
"Jane Smith", and any other descriptive information that might
be useful, as shown in the following triples:
_:jane exterms:mailbox <mailto:jane@example.org> . _:jane rdf:type exterms:Person . _:jane exterms:name "Jane Smith" . _:jane exterms:empID "23748" . _:jane exterms:age "26" .
(Note that mailto:jane@example.org is written within angle
brackets in the first triple. This is because
mailto:jane@example.org is a full URIref in the
mailto URI scheme, rather than a QName abbreviation, and full
URIrefs must be enclosed in angle brackets in the triples notation.)
This says, accurately, that "there is a resource of type
exterms:Person, whose electronic mailbox is identified by
mailto:jane@example.org, whose name is Jane Smith,
etc." That is, the blank node can be read as "there is a resource".
Statements with that blank node as subject then provide information about the
characteristics of that resource.
In practice, using blank nodes instead of URIrefs in these cases does not
change the way this kind of information is handled very much. For example, if
it is known that an email address uniquely identifies someone at example.org
(particularly if the address is unlikely to be reused), that fact can still
be used to associate information about that person from multiple sources,
even though the email address is not the person's URI. In this case, if some
RDF is found on the Web that describes a book, and gives the author's contact
information as mailto:jane@example.org, it might be reasonable,
combining this new information with the previous set of triples, to conclude
that the author's name is Jane Smith. The point is that saying something like
"the author of the book is mailto:jane@example.org" is typically
a shorthand for "the author of the book is someone whose mailbox is
mailto:jane@example.org". Using a blank node to represent this
"someone" is just a more accurate way to represent the real world situation.
(Incidentally, some RDF-based schema languages allow specifying that certain
properties are unique identifiers of the resources they describe.
This is discussed further in Section 5.5.)
Using blank nodes in this way can also help avoid the use of literals in
what might be inappropriate situations. For example, in describing Jane's
book, lacking a URIref to identify the author, the publisher might have
written (using the publisher's own ex2terms: vocabulary):
ex2terms:book78354 rdf:type ex2terms:Book . ex2terms:book78354 ex2terms:author "Jane Smith" .
However, the author of the book is not really the character string "Jane Smith", but a person whose name is Jane Smith. The same information might be more accurately given by the publisher using a blank node, as:
ex2terms:book78354 rdf:type ex2terms:Book . ex2terms:book78354 ex2terms:author _:author78354 . _:author78354 rdf:type ex2terms:Person . _:author78354 ex2terms:name "Jane Smith" .
This essentially says "resource ex2terms:book78354 is of type
ex2terms:Book, and its author is a resource of type
ex2terms:Person, whose name is Jane Smith." Of
course, in this particular case the publisher might instead have assigned its
own URIrefs to its authors instead of using blank nodes to identify them, in
order to encourage external references to its authors.
Finally, the example above giving Jane's age as 26 illustrates the fact that sometimes the value of a property may appear to be simple, but actually may be more complex. In this case, Jane's age is actually 26 years, but the units information (years) is not explicitly given. Such information is often omitted in contexts where it can be safely assumed that anyone accessing the property value will understand the units being used. However, in the wider context of the Web, it is generally not safe to make this assumption. For example, a U.S. site might give a weight value in pounds, but someone accessing that data from outside the U.S. might assume that weights are given in kilograms. In general, careful consideration should be given to explicitly representing units and similar information. This issue is discussed further in Section 4.4, which describes an RDF feature for representing such information as structured values, as well as some other techniques for representing such information.
The last section described how to handle situations in which property
values represented by plain literals had to be broken up into structured
values to represent the individual parts of those literals. Using this
approach, instead of, say, recording the date a Web page was created as a
single exterms:creation-date property, with a single plain
literal as its value, the value would be represented as a structure
consisting of the month, day, and year as separate pieces of information,
using separate plain literals to represent the corresponding values. However,
so far, all constant values that serve as objects in RDF statements have been
represented by these plain (untyped) literals, even when the intent is
probably for the value of the property to be a number (e.g., the value of a
year or age property) or some other kind of more
specialized value.
For example, Figure 4 illustrated an RDF graph
recording information about John Smith. That graph recorded the value of John
Smith's exterms:age property as the plain literal "27", as shown
in Figure 7:
In this case, the hypothetical organization example.org probably intends
for "27" to be interpreted as a number, rather than as the string consisting
of the character "2" followed by the character "7" (since the literal represents the value of an "age"
property). However, there is no information in Figure 7's graph that
explicitly indicates that "27" should be interpreted as a number. Similarly,
example.org also probably intends for "27" to be interpreted as a
decimal number, i.e., the value twenty seven, rather than,
say, as an octal number, i.e., the value twenty three.
However, once again there is no information in Figure 7's graph that
explicitly indicates this. Specific applications might be written with the
understanding that they should interpret values of the
exterms:age property as decimal numbers, but this would mean
that proper interpretation of this RDF would depend on information not
explicitly provided in the RDF graph, and hence on information that would not
necessarily be available to other applications that might need to interpret
this RDF.
The common practice in programming languages or database systems is to
provide this additional information about how to interpret a literal by
associating a datatype with the literal, in this case, a datatype
like decimal or integer. An application that
understands the datatype then knows, for example, whether the literal "10" is
intended to represent the number ten, the number two, or
the string consisting of the character "1" followed by the character "0",
depending on whether the specified datatype is integer,
binary, or string. (More specialized datatypes
could also be used to include the units information mentioned at the end of
Section 2.3, e.g., a datatype
integerYears, although the Primer will not elaborate on this
idea.) In RDF, typed
literals are used to provide this kind of information.
An RDF typed literal is formed by pairing a string with a URIref that identifies a particular datatype. This results in a single literal node in the RDF graph with the pair as the literal. The value represented by the typed literal is the value that the specified datatype associates with the specified string. For example, using a typed literal, John Smith's age could be described as being the integer number 27 using the triple:
<http://www.example.org/staffid/85740> <http://www.example.org/terms/age> "27"^^<http://www.w3.org/2001/XMLSchema#integer> .
or, using the QName simplification for writing long URIs:
exstaff:85740 exterms:age "27"^^xsd:integer .
or as shown in Figure 8:
Similarly, in the graph shown in Figure 3
describing information about a Web page, the value of the page's
exterms:creation-date property was written as the plain literal
"August 16, 1999". However, using a typed literal, the creation date of the
Web page could be explicitly described as being the date August 16,
1999, using the triple:
ex:index.html exterms:creation-date "1999-08-16"^^xsd:date .
or as shown in Figure 9:
Unlike typical programming languages and database systems, RDF has no
built-in set of datatypes of its own, such as datatypes for integers, reals,
strings, or dates. Instead, RDF typed literals simply
provide a way to explicitly indicate, for a given literal, what datatype
should be used to interpret it. The datatypes used in typed literals are
defined externally to RDF, and identified by their datatype URIs.
(There is one exception: RDF defines a built-in datatype with the URIref
rdf:XMLLiteral to represent XML content as a literal value. This
datatype is defined in [RDF-CONCEPTS], and
its use is described in Section 4.5.) For
instance, the examples in Figure 8 and Figure 9 use the datatypes integer and
date from the XML Schema datatypes defined in XML Schema Part 2: Datatypes [XML-SCHEMA2]. An advantage of this approach is
that it gives RDF the flexibility to directly represent information coming
from different sources without the need to perform type conversions between
these sources and a native set of RDF datatypes. (Type conversions would
still be required when moving information between systems having different
sets of datatypes, but RDF would impose no extra conversions into and out of
a native set of RDF datatypes.)
RDF datatype concepts are based on a conceptual framework from XML Schema datatypes [XML-SCHEMA2], as described in RDF Concepts and Abstract Syntax [RDF-CONCEPTS]. This conceptual framework defines a datatype as consisting of:
xsd:date, this set of values is a set of dates.xsd:date defines
1999-08-16 as being a legal way to write a literal of this
type (as opposed, say, to August 16, 1999). As defined in [RDF-CONCEPTS], the lexical space of a
datatype is a set of Unicode [UNICODE]
strings, allowing information from many languages to be directly
represented.xsd:date determines
that, for this datatype, the string 1999-08-16 represents
the date August 16, 1999. The lexical-to-value mapping is a
factor because the same character string may represent different values
for different datatypes.Not all datatypes are suitable for use in RDF. For a datatype to be
suitable for use in RDF, it must conform to the conceptual framework just
described. This basically means that, given a character string, the datatype
must unambiguously define whether or not the string is in its lexical space,
and what value in its value space the string represents. For example, the
basic XML Schema datatypes such as xsd:string,
xsd:boolean, xsd:date, etc. are suitable for use in
RDF. However, some of the built-in XML Schema datatypes are not suitable for
use in RDF. For example, xsd:duration does not have a
well-defined value space, and xsd:QName requires an enclosing
XML document context. Lists of the XML Schema datatypes that are currently
considered suitable and unsuitable for use in RDF are given in [RDF-SEMANTICS].
Since the value that a given typed literal denotes
is defined by the typed literal's datatype, and, with the exception of
rdf:XMLLiteral, RDF does not define any datatypes, the actual
interpretation of a typed literal appearing in an RDF graph (e.g.,
determining the value it denotes) must be performed by software that is
written to correctly process not only RDF, but the typed literal's datatype
as well. Effectively, this software must be written to process an extended
language that includes not only RDF, but also the datatype, as part of its
built-in vocabulary. This raises the issue of which datatypes will be
generally available in RDF software. Generally, the XML Schema datatypes that
are listed as suitable for use in RDF in [RDF-SEMANTICS] have a "first among
equals" status in RDF. As noted already, the examples in Figure 8 and Figure 9 used some of
these XML Schema datatypes, and the Primer will be using these datatypes in
most of its other examples of typed literals as well (for one thing, XML
Schema datatypes already have assigned URIrefs that can be used to refer to
them, specified in [XML-SCHEMA2]). These XML
Schema datatypes are treated no differently than any other datatype, but they
are expected to be the most widely used, and therefore the most likely to be
interoperable among different software. As a result, it is expected that much
RDF software will also be written to process these datatypes. However, RDF
software could be written to process other sets of datatypes as well,
assuming they were determined to be suitable for use with RDF, as described
already.
In general, RDF software may be called on to process RDF data that
contains references to datatypes that the software has not been written to
process, in which case there are some things the software will not be able to
do. For one thing, with the exception of
rdf:XMLLiteral, RDF itself does not define the URIrefs that
identify datatypes. As a result, RDF software, unless it has been written to
recognize specific URIrefs, will not be able to determine whether or not a
URIref written in a typed literal actually identifies a datatype. Moreover,
even when a URIref does identify a datatype, RDF itself does not define the
validity of pairing that datatype with a particular literal. This
validity can only be determined by software written to correctly process that
particular datatype.
For example, the typed literal in the triple:
exstaff:85740 exterms:age "pumpkin"^^xsd:integer .
or the graph shown in Figure 10:
is valid RDF, but obviously an error as far as the
xsd:integer datatype is concerned, since "pumpkin"
is not defined as being in the lexical space of xsd:integer. RDF
software not written to process the xsd:integer datatype would
not be able to recognize this error.
However, proper use of RDF typed literals provides more information about the intended interpretation of literal values, and hence makes RDF statements a better means of information exchange among applications.
Taken as a whole, RDF is basically simple: nodes-and-arcs diagrams interpreted as statements about things identified by URIrefs. This section has presented an introduction to these concepts. As noted earlier, the normative (i.e., definitive) RDF specification describing these concepts is RDF Concepts and Abstract Syntax [RDF-CONCEPTS], which should be consulted for further information. The formal semantics (meaning) of these concepts is defined in the (normative) RDF Semantics [RDF-SEMANTICS] document.
However, in addition to the basic techniques for describing things using RDF statements discussed so far, it should be clear that people or organizations also need a way to describe the vocabularies (terms) they intend to use in those statements, specifically, vocabularies for:
exterms:Person)exterms:age and
exterms:creation-date), andexterms:age property should always be an
xsd:integer).The basis for describing such vocabularies in RDF is the RDF Vocabulary Description Language 1.0: RDF Schema [RDF-VOCABULARY], which will be described in Section 5.
Additional background on the basic ideas underlying RDF, and its role in providing a general language for describing Web information, can be found in [WEBDATA]. RDF draws upon ideas from knowledge representation, artificial intelligence, and data management, including Conceptual Graphs, logic-based knowledge representation, frames, and relational databases. Some possible sources of background information on these subjects include [SOWA], [CG], [KIF], [HAYES], [LUGER], and [GRAY].
As described in Section 2, RDF's conceptual model is a graph.
Como estaba descrito en Sección 2, el modelo conceptual de RDF es un
gráfico. RDF proporciona un sintaxis XML para escribir y compartir gráficos
RDF, llamada RDF/XML. RDF provides an XML syntax for writing down and
exchanging RDF graphs, calledRDF/XML. En
vez de triples, que son para una notación breve, RDF/XML es la sintaxis
normativa para escribir RDF. Unlike triples, which are intended as a
shorthand notation, RDF/XML is the normative syntax for writing RDF.
RDF/XML está definido en la especificación de la sintaxis RDF/XML is
defined in the RDF/XML Syntax
Specification [RDF-SYNTAX]. Esta sección
describe esa sintaxis.This section describes this RDF/XML
syntax.
Las ideas basicas de la sintaxis RDF/XML se puede illustrar por unos de
los ejemplos ya presentados. The basic ideas behind the RDF/XML syntax
can be illustrated using some of the examples presented already. Por un
ejemplo, mira la declaración: Take as an example the English
statement:
http://www.example.org/index.html
tiene una fecha de creación con valor Agosto 16, 1999 has
acreation-datewhose value
isAugust 16, 1999
El gráfico RDF para esta declaración sola, despues de dar una URIref a
la propiedad de fecha-de-creación, es como figura 11:The RDF graph for this single statement,
after assigning a URIref to
thecreation-dateproperty, is shown
inFigure 11:
con una representación en forma de triples:with a triple
representation of:
ex:index.html exterms:creation-date "August 16, 1999" .
(Nota que este ejemplo no usa un valor literal con tipo
definido para la fecha. Note that a typed literal is not used for the
date value in this example. Representando valores literales con tipos
definidos estaré describido a bajo en esta sección.Representing typed
literals in RDF/XML will be described later in this section.)
Ejemplo 2 mustra la sintaxis RDF/XML que
corresponde al gráfico en shows the RDF/XML syntax corresponding to the
graph in Figure 11:
1. <?xml version="1.0"?> 2. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 3. xmlns:exterms="http://www.example.org/terms/"> 4. <rdf:Description rdf:about="http://www.example.org/index.html"> 5. <exterms:creation-date>August 16, 1999</exterms:creation-date> 6. </rdf:Description> 7. </rdf:RDF>
(Line numbers are added to help in explaining the exampleLas
lineas estan numerados para ayudar describiendo el ejemplo.)
Este parece muy pesante. This seems like a lot of overhead. Es
mas fácil entender lo que pasa por considerando cada parte de este XML a la
vez. (Una introducción breve a XML está proporcionada en It is easier
to understand what is going on by considering each part of this XML in turn
(a brief introduction to XML is provided in Appendix B).
Linea 1, <?xml version="1.0"?>, is
theXML declaration, which indicates that the
following content is XML, and what version of XML it is. Está la
declaración XML, que dice que lo que segue es XML, y qué versión de XML
es.
Linea 2 empeza un elemento begins an rdf:RDF
element. Este indice que el contenido seguiente de XML (desde aqui
hasta This indicates that the following XML content (starting here and
ending with the </rdf:RDF> en linea 7) pretende
representar RDF. is intended to represent RDF. Following
the Despues la etiqueta rdf:RDF en la misma linea hay una
declaración de nombre de espacio XML [XML namespace], representado como un
atributo xmlns del elemento iniciál
rdf:RDF.on this same line is an XML namespace declaration,
represented as anxmlnsattribute of
therdf:RDFstart-tag. Esta declaración especifica que todas las
etiquetas en este contenido con prefijo rdf: aprtenecen al espacio de nombres
identificado por la URIref This declarationspecifies that
all tags in this content prefixed
withrdf:are part of the namespace
identified by the URIref
http://www.w3.org/1999/02/22-rdf-syntax-ns#. URIrefs que empezan con el texto beginning with the
string http://www.w3.org/1999/02/22-rdf-syntax-ns# estan
usadas para terminos del vocabulario RDF.are used for terms from the RDF
vocabulary.
Linea 3 especifica una otra declaración de espacio de nombre XML, esta
vez para el prefijo exterms:specifies another XML namespace declaration,
this time for the prefixexterms:. This is
expressed as another Este está expresado como un otro atributo
xmlns attribute of the del elemento
rdf:RDF y especifica que el URIref del espacio de nombres
element, and specifies that the namespace URIref
http://www.example.org/terms/ tiene que estar asociado con el
prefijo is to be associated with the exterms:
prefix. URIrefs que empezan con
beginning with the string
http://www.example.org/terms/ estan usados para terminos del
vocabulario que está definido por la organisación de ejemplo example.org
are used for terms from the vocabulary defined by the example
organization, example.org.The El ">" al fin de
linea 3 marca el fin del etiqueta at the end of line 3 indicates the end
of the rdf:RDF (el inicio de un elemento). start-tag.
Lineas 1-3 son "administración" general, necesario para mostrar que este es
contenido RDF/XML, y para identificar los espacios de nombre usadas en este
contenido RDF/XML. Lines 1-3 are general "housekeeping" necessary to
indicate that this is RDF/XML content, and to identify the namespaces being
used within the RDF/XML content.
[[NdT La explicación en este parafo muestra que el sintaxis RDF
corresponde un poco a una forma de expresarse en inglés. Es casi tan
artificial que parece en español, pero por el uso de palabras inglés como
nombres de elementos explican de una mañera que no se traduce facilemnte.]]
puede Las lineas 4-6 proporcionan el RDF/XML para la declaración especifica
mostrada en Lines 4-6 provide the RDF/XML for the specific statement
shown in Figura 11. Una mañera obvia de hablar
de una declaración RDF es decir que es una descripción, que es
sobre [[NdT about en inglés]]
el sujeto de la declaración (en este caso, sobre An obvious way to talk
about any RDF statement is to say it is
adescription, and that it
isaboutthe subject of the statement (in this
case, about http://www.example.org/index.html), y RDF/XML represente
asi la declaración. and this is the way RDF/XML represents the
statement. Therdf:Descriptionstart-tag in
line 4 indicates the start of adescriptionof a
resource, and goes on to identify the resource the statement
isabout(the subject of the statement) using
therdf:aboutattribute to specify the
URIref of the subject resource. La etiqueta iniciale
rdf:Description en linea 4 indica el inicio de una
descripción de un recurso, y despues
identifica el recurso sobre lo cual la descripción habla (el sujeto de la
declaración), por el atributo rdf:about que especifica el URI del recurso
sujeto. Linea 5 proporciona un elemento de propiedad, con el nombre
cualificado Line 5 provides aproperty
element, with th QName
exterms:creation-date como su etiqueta, para repesenter el
predicado y el objeto de la declaración. as its tag, to represent the
predicate and object of the statement. The QName El nombre cualificado
exterms:creation-date está eligido para que añadir el nombre
local is chosen so that appending the local name
creation-date al URIref del prefijo to the URIref of
the exterms: prefix
(http://www.example.org/terms/) da el URIref del predicado de la
declaración gives the statement's predicate URIref
http://www.example.org/terms/creation-date. The content of
this property element is the object of the statement, the plain literal
El contenido de este elemento de propiedad es el objeto de la declaración,
el valor literal August 19, 1999 (el valor de la propiedad
"fecha de creación" del recurso que es el sujeto the value of the
creation-date property of the subject resource).The
property element is nested within the containing El elemento de
propiedad está contenido [[!! 'nested' - CMN]] en su elemento contenedor
rdf:Description element, indicating that this property
applies to the resource specified in the significando que esta
propiedad se aplica al atributo rdf:about del elemento
attribute of the rdf:Description element. Line 6
indicates the end of this particular Linea 6 cerra este elemento
rdf:Description element.
Finally, Line 7 indicates the end of the Por fin, linea 7
termina el elemento rdf:RDF empezado en linea 2. element
started on line 2. Using an El uso de un elemento rdf:RDF
para denotar y contener contenido RDF/XML es opcional en las situaciones que
permeten que el XML se identifica como RDF/XML por el contexto. element
to enclose RDF/XML content is optional in situations where the XML can be
identified as RDF/XML by context. This is discussed further in Este
temas está discutido en [RDF-SYNTAX]. Pero no
es una mala idea proporcionar el elemento rdf:RDF en todo caso, y ejemplos de
este manual básico normalmente (pero no siempre) lo incluyen. However,
it does not hurt to provide
therdf:RDFelement in any case, and Primer
examples will generally (but not always) provide one.
Ejemplo 2 illustra las ideas básicas usadas por
RDF/XML para codificar un grafico como elementos XML con contenidos, y sus
atributos con sus valores illustrates the basic ideas used by RDF/XML to
encode an RDF graph as XML elements, attributes, element content, and
attribute values. The URIrefs of predicates (as well as some
nodes) are written as XMLQNames, consisting of
a shortprefixdenoting a namespace URI,
together with alocal namedenoting a
namespace-qualified element or attribute, as described in Los URIrefs
de los predicados (y de algunos nodos) estan escritas como nombres
cualificados de XML, quien consisten de un prefijo corto que denota un URL de
espacio de nombre, junto con un nombre local que denota un elemento o
atributo cualificado por un espacio de nombres, como descrito en Appendice B. El par del URIref del espacio de nombre
nombre local es eligido para que se forma el URIref del nodo original o
predicado por poniendolos juntos. The (namespace URIref, local name)
pair is chosen so that concatenating them forms the URIref of the original
node or predicate. The URIrefs of subject nodes are written as XML attribute
values (URIrefs of object nodes may sometimes be written as attribute values
as well). Los URIrefs de nodos sujetos se escribe como valores de
atributos XML (los URIrefs de nodos objetos también se puede escribir unas
veces como valores de atributos). Literal nodes (which are always object
nodes) become element text content or attribute values. (Many of these
options are described later in the Primer; all of these options are described
in Los nodos literales (que son siempre nodos objetos) se converten en
contenido textual o valores de atributos. (Muchas de estas possibilidades
estan descritas a bajo en este manual; todas estan descritas en [RDF-SYNTAX].)
Un grafico RDF que contiene multiples declaraciones se puede representar
en RDF/XML por uso de RDF/XML similar a las lineas 4-6 en An RDF graph
consisting of multiple statements can be represented in RDF/XML by using
RDF/XML similar to Lines 4-6 in Ejemplo 2 para
representar cada declaración a parte. Por ejemplo, para escribir las dos
declaraciones siguientes: to separately represent each statement. For
example, to write the following two statements:
ex:index.html exterms:fecha-de-creación "Agosto 16, 1999" . ex:index.html dc:language "es" .
el RDF/XML en Example 3 se puede usar: could
be used:
1. <?xml version="1.0"?> 2. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 3. xmlns:dc="http://purl.org/dc/elements/1.1/" 4. xmlns:exterms="http://www.example.org/terms/"> 5. <rdf:Description rdf:about="http://www.example.org/index.html"> 6. <exterms:fecha-de-creación>Agosto 16, 1999</exterms:fecha-de-creación> 7. </rdf:Description> 8. <rdf:Description rdf:about="http://www.example.org/index.html"> 9. <dc:language>es</dc:language> 10. </rdf:Description> 11. </rdf:RDF>
Ejemplo 3 is the same as es igual que
Ejemplo 2, con un secundo elemento with the
addition of a second rdf:Description (en lineas 8-10) para
representar la declaración secunda. (Un prefijo de espacio de nomdres
adicional está declarado para identificar el secundo espacio de nombres
usado en la declaración). element (in lines 8-10) to represent the
second statement. (An additional namespace declaration is also given in line
3 to identify the additional namespace used in this statement.)
Cualquier numero de declaraciones adicionales puede escribirse de la misma
mañera, usando un elemento An arbitrary number of additional statements
could be written in the same way, using a separate
rdf:Description individual para cada declaración adicional.
Como element for each additional statement. As Ejemplo 3 muestra, despues el gasto de escribir las
declaraciones de XML y nombres de espacio, es claro y no demasiado complejo
escribir cada declaración RDF adiciional. illustrates, once the
overhead of writing the XML and namespace declarations is dealt with, writing
each additional RDF statement in RDF/XML is both straightforward and not too
complicated.
El sintaxis RDF/XML proporciona algunas abreviaturas para facilitar la
escritura de usos comunos. The RDF/XML syntax provides a number of
abbreviations to make common uses easier to write. For example, it is typical
for the same resource to be described with several properties and values at
the same time, as in Por ejemplo, es tipico describir el mismo recurso
con propreidades y valores distintas a la vez, como Ejemplo 3, donde el recurso where the
resource ex:index.html es el sujeto de algunas
declaraciones distintas. Para tratar estes casos, RDF/XML permete multiples
elementos de propiedad se contener en el elemento is the subject of
several statements. To handle such cases, RDF/XML allows multiple property
elements representing those properties to be nested within the
rdf:Description que identifica el recurso sujeto. Por ejemplo,
para representar el grupo siguiente de declaraciones sobre element that
identifies the subject resource. For example, to represent the following
group of statements about
http://www.example.org/index.html:
ex:index.html dc:creator exstaff:85740 . ex:index.html exterms:creation-date "August 16, 1999" . ex:index.html dc:language "en" .
Cuyo el gráfico (el mismo que whose graph (the same as Figura 3) está mostrado en is shown in Figura 12:
the el RDF/XML mostrado shown en Ejemplo 4 se puede escribir: could be
written:
1. <?xml version="1.0"?> 2. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 3. xmlns:dc="http://purl.org/dc/elements/1.1/" 4. xmlns:exterms="http://www.example.org/terms/"> 5. <rdf:Description rdf:about="http://www.example.org/index.html"> 6. <exterms:creation-date>August 16, 1999</exterms:creation-date> 7. <dc:language>en</dc:language> 8. <dc:creator rdf:resource="http://www.example.org/staffid/85740"/> 9. </rdf:Description> 10. </rdf:RDF>
Compared with the previous two examples, Por contraste con los dos
ejemplos previos, Ejemplo 4 proporciona una propiedad
adds an additional dc:creator adicional (en linea 8).
De mas, los elementos de las tres propiedades cuyos el sujeto es
property element (in line 8). In addition, the property elements for the
three properties whose subject is
http://www.example.org/index.html estan contenido en un solo
elemento are nested within a single rdf:Description
que identifica el sujeto, en vez de escribir un elemento element
identifying that subject, rather than writing a separate
rdf:Description distinto para cada declaración. element
for each statement.
Line 8 also introduces a new form of property element. The Linea 8
introduce también una nueva forma de elemento de propiedad. El elemento
dc:language en linea 7 es similar al elemento element in
line 7 is similar to the exterms:creation-date
element used i usado en Ejemplo 2. Los dos
elementos representan propiedades con literales básicas como valores, y
elementos tales estan escritos por contener el valor literal en etiquetas de
empeza y cerrada de cuyo el nombre corresponde al nombre de la propiedad.
Both these elements represent properties with plain literals as property
values, and such elements are written by enclosing the literal within start-
and end-tags corresponding to the property name. However, the Pero el
elemento dc:creator en linea 8 representa una propiedad cuyo el
valor es un otro recurso, en vez de un literal. element on line 8
represents a property whose value is another resource, rather than a
literal. Si el URIref de este recurso estaré escrito como un literal básico
entre etiquetas de empeza y cerrada, igualmente como otros valores literales
de los otros elementos, diré que el valor del elemento If the URIref of
this resource were written as a plain literal within start- and end-tags in
the same way as the literal values of the other elements, this would say that
the value of the dc:creator es la catena de
caracteras element was thecharacter
string http://www.example.org/staffid/85740, en vez
del recurso identificado por interepter este liteeral como un URIref.
rather than the resource identified by that literal interpreted as a
URIref. In order to indicate the difference, the Para indicar la
diferencía, el elemento dc:creator está escrito usando un
etiqueta vacia de XML (no tiene una etiqueta de cerrada corrpesondienta), e
el valor de propiedad está escrito por un atributo element is written
using what XML calls anempty-element tag(it
has no separate end-tag), and the property value is written using an
rdf:resource de este elemento vacio. El attributo attribute
within that empty element. The rdf:resource indica que el
valor del elemento de la propiedad es un recurso, identificado por su URIref.
attribute indicates that the property element's value is another
resource, identified by its URIref. Para que el URIref está usado como
un valor de un atributo, RDF/XML neceiste que esta escrito (como URIref
absoluto o relativo) en vez de abeviarlo como un nombre calificado igual que
esta hecho para escribir nombres de elementos y atributos (URIrefs
absolutos y relativos estan discutido en Because the URIref is being
used as an attributevalue, RDF/XML requires
the URIref to be written out (as an absolute or relative URIref), rather than
abbreviating it as a QName as was done in writing element and
attributenames(absolute and relative URIrefs
are discussed in Appendice A).
It is important to understand that the RDF/XML inEs importante entender
que el RDF/XML de Ejemplo 4 es una abreviatura. el
RDF/XML en is anabbreviation. The RDF/XML
in Ejemplo 5, donde cada declaración está
escrita a parte, describe exactamente el mismo grafico RDF (el gráfico de
in which each statement is written separately, describes exactly the
same RDF graph (the graph of Figura 12):
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:exterms="http://www.example.org/terms/">
<rdf:Description rdf:about="http://www.example.org/index.html">
<exterms:creation-date>August 16, 1999</exterms:creation-date>
</rdf:Description>
<rdf:Description rdf:about="http://www.example.org/index.html">
<dc:language>en</dc:language>
</rdf:Description>
<rdf:Description rdf:about="http://www.example.org/index.html">
<dc:creator rdf:resource="http://www.example.org/staffid/85740"/>
</rdf:Description>
</rdf:RDF>
The following sections will describe a few additional RDF/XML
abbreviations. Las secciones siguientes describiren algunas abreviaturs
adicionales de RDF/XML. [RDF-SYNTAX]
proporciona una descripción mas completa de las abreviaturas disponibles.
provides a more thorough description of the abbreviations that are
available.
RDF/XML can also represent graphs that include nodes that have no
URIrefs, i.e., theblank nodesdescribed
in RDF/XML puede representar también gráficas que inlcuyen nodos ue
no tienen un URI, es decir los nodos blancas descritos en Sección 2.3. For example, Por
ejemplo Figure 13 (de taken from [RDF-SYNTAX]) muestra un gráfico que dice
shows a graph saying "the document el documento
'http://www.w3.org/TR/rdf-syntax-grammar' tiene titulo has a title
'RDF/XML Syntax Specification (Revised)' y tiene un editor, que tiene un
nombre and has an editor, the editor has a name 'Dave Beckett' y
un and a home page 'http://purl.org/net/dajobe/' ".
This illustrates an idea discussed in Esta illustra una idea
discutido en sección Section 2.3: el uso
de un nodo anonimo para representar algo qu no tiene ningun URIref, pero que
se puede describir por otra información. En este caso, el nodo anonimo
representa una persona, el editor del documento, y esta persona está
descrita por su nombre y su home page. the use of a blank node to
represent something that does not have a URIref, but can be described in
terms of other information. In this case, the blank node represents a person,
the editor of the document, and the person is described by his name and home
page.
RDF/XML provides several ways to represent graphs containing blank
nodes. These are all described in RDF/XML proporciona algunas mañeras
de representar nodos anonimos. Estan todas descritas en [RDF-SYNTAX]. El metodo descrita aqui, que es lo
mas dirceto, es de dar un indentificador del nodo anonimo a cada
nodo anonimo. The approach illustrated here, which is the most direct
approach, is to assign ablank node
identifierto each blank node. A blank node
identifier serves to identify a blank node within a particular RDF/XML
document but, unlike a URIref, is unknown outside the document in which it is
assigned. Un identificador del nodo anonimo sirve para identificar un
nodo anonimo dentro de un documento RDF/XML pero, al contrario a un URIref,
no es conocido fuera del documento donde está usado. A blank node is
referred to in RDF/XML using an rdf:nodeID attribute, with a
blank node identifier as its value, in places where the URIref of a resource
would otherwise appear. Un nodo anonimo se refere en RDF/XML por un atributo
rdf:nodeID, con un identificador de un nodo anonimo para valor,
en vez del URIref que normalmente haré. Especificamente, una declaración
con un nodo anonimo para sujeto se puede describir en RDF/XML con un
elemento rdf:Description que tiene un atributo rdf:nodeID en vez
de un atributo rdf:about. Specifically, a statement with a
blank node as itssubjectcan be written in
RDF/XML using anrdf:Descriptionelement
with anrdf:nodeIDattribute instead of
anrdf:aboutattribute. Similarly, a
statement with a blank node as itsobjectcan be
written using a property element with
anrdf:nodeIDattribute instead of
anrdf:resourceattribute.
Usingrdf:nodeID,Example 6shows the RDF/XML corresponding
toFigure 13: De una
mañera similar, una declaración con nodo anonimo para su objeto se puede
escribir con attributo rdf:nodeID en vez de attributo
rdf:resource. Ejemplo 6 usa rdf:nodeID
para muestrar el RDF/XML que corresponde a