An Idiot's Guide to the Resource Description Framework
Renato Iannella
DSTC Pty Ltd
The University of Queensland, 4072, AUSTRALIA
Phone: +61 7 3365 4310 Fax: +61 7 3365 4311
Email: renato@dstc.edu.au
To Appear in: The New Review of Information Networking, Vol 4, 1998
First Published: 1998-09-03
Updated: 1999-01-25
Status: Conforms with RDF Syntax Specification 1999-01-05
Introduction
The Resource Description Framework (RDF) - developed by the World-Wide Web Consortium (W3C) - provides the foundation for metadata interoperability across different resource description communities. One of the major obstacles facing the resource description community is the multiplicity of incompatible standards for metadata syntax and schema definition languages. This has lead to the lack of, and low deployment of, cross-discipline applications and services for the resource description communities. RDF provides a solution to these problems via a Syntax specification (W3C, 1999a) and Schema specification (W3C, 1998a).
RDF is based on Web technologies and, as a result, is lightweight and highly deployable. RDF provides interoperability between applications that exchange metadata and is targeted for many application areas including; resource description, site-maps, content rating, electronic commerce, collaborative services, and privacy preferences. RDF is the result of members of these communities reaching consensus on their syntactical needs and deployment efforts.
The objective of RDF is to support the interoperability of metadata. RDF allows descriptions of Web resources - any object with a Uniform Resource Identifier (URI) as its address - to be made available in machine understandable form. This enables the semantics of objects to be expressible and exploitable. Once highly deployed, this will enable services to develop processing rules for automated decision-making about Web resources.
RDF is based on a concrete formal model utilising directed graphs that elude to the semantics of resource description. The basic concept is that a Resource is described through a collection of Properties called an RDF Description. Each of these Properties has a Property Type and Value. Any resource can be described with RDF as long as the resource is identifiable with a URI as shown in Figure 1.
Figure 1: Resource Description Framework Model
What about XML and RDF?
RDF is an application of XML (W3C, 1998b). It extends the XML model and syntax to be specific for describing resources. RDF utilises the Namespace facility of XML (W3C, 1999b). The XML Namespace, which points to a URI, allows RDF to scope and uniquely identify a set of properties. This set of properties, called a schema, can be accessed at the URI identified by the namespace. Also, since RDF is based on XML, it inherits the language tag, thus enabling the support of multi-lingual metadata.
The namespace for RDF is shown as:
The above namespace declaration also sets RDF as the default namespace. Other namespaces will be declared as attributes within the RDF tag. Note, the # symbol at the end of the URI is important. It is used to combine the namespace name with the local name to get the full URI of a property type.
Show me an Example!
Example 1 below shows an example of RDF syntax that describes a report.
<? xml version="1.0" ?>
<RDF xmlns = "http://w3.org/TR/1999/PR-rdf-syntax-19990105#"
xmlns:DC = "http://purl.org/DC#" >
<Description about = "http://dstc.com.au/report.html" >
<DC:Title> The Future of Metadata </DC:Title>
<DC:Creator> Jacky Crystal </DC:Creator>
<DC:Date> 1998-01-01 </DC:Date>
<DC:Subject> Metadata, RDF, Dublin Core </DC:Subject>
</Description>
</RDF>
|
Example 1: RDF Syntax
The first line of Example 1 simply indicates that this is an XML document. The next line indicates two namespaces - RDF and DC - with RDF being the default namespace. All the properties in the description will come from one of these namespaces. The main section of Example 1 - between the <Description> tags - shows four Properties that describe the resource pointed to by the URI in the about attribute in the <Description> tag. These properties come from the Dublin Core (DC) namespace (DC, 1998). In this case the Title, Creator, Date, and Subject properties are indicated for the resource at: <http://dstc.com.au/report.html>.
Can you have multiple Metadata Schemas?
Example 2 shows how different metadata schemas (as indicated by namespaces) can be easily packaged together. This is consistent with the 'Warwick Framework' model developed by the Dublin Core community (Lagoze, 1996).
<? xml version="1.0" ?>
<RDF xmlns = "http://w3.org/TR/1999/PR-rdf-syntax-19990105#"
xmlns:DC = "http://purl.org/DC#"
xmlns:AGLS = "http://naa.gov.au/AGLS#" >
<Description about = "http://dstc.com.au/report.html" >
<DC:Title> The Future of Metadata </DC:Title>
<DC:Creator> Jacky Crystal </DC:Creator>
<DC:Date> 1998-01-01 </DC:Date>
<DC:Subject> Metadata, RDF, Dublin Core </DC:Subject>
<AGLS:Function> Information Management - Internet </AGLS:Function>
</Description>
</RDF>
|
Example 2: Multiple Schemas
This example shows the addition of a property from the Australian Government Locator Service (AGLS)
metadata schema (NAA, 1998). Hence, any metadata schema can be used, as long as it is identified with an XML Namespace.
What about Complex Values?
The values for the properties in the above examples are all strings. RDF also allows other properties to be the value of a property. Example 3a shows a snippet of syntax in which the <DC:Creator> property (from the above examples) has been expressed with other properties from a different namespace. In this case, the vCard metadata schema (VCARD, 1998; Iannella, 1999) is used to give more information (and structure) about the Creator of the resource. The parseType="Resource" attribute on the Creator property is a short-hand mechanism to treat the value of the property as it were the contents of an RDF Description block.
...
<DC:Creator parseType="Resource">
<vCard:FN> Dr Jacky J Crystal </vCard:FN>
<vCard:TITLE> Director </vCard:TITLE>
<vCard:EMAIL> jacky@dstc.com.au </vCard:EMAIL>
<vCard:ROLE> Researcher </vCard:ROLE>
</DC:Creator>
...
|
Example 3a: RDF Complex Properties
The parseType attribute can also have the value of "Literal". In this case, the value of the property is not intended to be interpreted. This is useful to allow XML as the value of some properties, as shown in Example 3b.
...
<DC:AddressLabel parseType="Literal">
<b>Dr Jacky J Crystal</b>
<center>DSTC</center>
<i>500 Street</i>
<b>Australia</b>
</DC:AddressLabel>
...
|
Example 3b: Literal Value
What about Multiple Values?
RDF also provides various ways to group properties together. RDF can express collections of the same properties with Bags (Bag), Sequences (Seq), and Alternatives (Alt). An RDF Bag is simply a collection of multiple values for the same property. Instead of repeating the Property Type, an RDF Bag is more convenient and precise. Example 4 shows three Creators (using <li> tags) with no implications in the ordering.
...
<DC:Creator>
<Bag>
<li> Maddie Azzurii </li>
<li> Corky Brown </li>
<li> Jacky Crystal </li>
</Bag>
</DC:Creator>
...
|
Example 4: RDF Bag
An RDF Sequence (Seq) is a collection of multiple values for a property where the order of the values is important. For example, a list of Creators may need to preserve the order so as to indicate the list is in alphabetical order or identify the primary author.
Example 5 below shows an example of the Seq collection type. In this case, there are three Creators for a resource, and the Seq construct honours the order in which the Creators are listed.
...
<DC:Creator>
<Seq>
<li> Maddie Azzurii </li>
<li> Corky Brown </li>
<li> Jacky Crystal </li>
</Seq>
</DC:Creator>
...
|
Example 5: RDF Sequence
An RDF Alternative (Alt) is used when there is a choice of values available for a property, with each value being valid but dependent on some other factor. There must be at least one value for Alt and the first item is considered the default or preferred value.
Example 6a below shows an example of the Alt collection type. In this case, there are four FTP locations for some software.
...
<SOFT:Location>
<Alt>
<li> ftp://soft-sales.com.us/abc.exe </li>
<li> ftp://soft-sales.com.au/abc.exe </li>
<li> ftp://soft-sales.com.de/abc.exe </li>
<li> ftp://soft-sales.com.uk/abc.exe </li>
</Alt>
</SOFT:Location>
...
|
Example 6a: RDF Alternative
Another way to use the RDF Alternative is in conjunction with the xml:lang
attribute. This maybe useful to indicate that the value of a property is
expressed in various languages, as shown in Example 6b.
...
<vCard:ROLE>
<Alt>
<li xml:lang="en"> Programmer </li>
<li xml:lang="fr"> Programmeur </li>
<li xml:lang="it"> Programmatore </li>
</Alt>
</vCard:ROLE>
...
|
Example 6b: RDF Alternative Languages
Can you Describe the Metadata?
RDF also allows statements to be made about other statements. This is useful when there is a need to express the properties of metadata. Example 7 below shows an example of this facility. The first set of properties describes a report. Note that there is a bagID on the <Description> tag to give that collection of properties a unique identifier. The second description, which points to the first bagID, not another resource, describes the properties of the first report description. In this case, it indicates the time period that the metadata about the report should be valid for. The Valid From/To dates applies to the whole Description block.
...
<Description about = "http://www.com/report.html"
bagID = "ID001" >
<DC:Title> The Metadata Report </DC:Title>
<DC:Creator> Jacky Crystal </DC:Creator>
<ECOMM:Price> $AUD20.00 </ECOMM:Price>
</Description>
<Description aboutEach = "#ID001" >
<ADMIN:ValidFrom> 1998-01-01 </ADMIN:ValidFrom>
<ADMIN:ValidTo> 1999-12-31 </ADMIN:ValidTo>
</Description>
...
|
Example 7: Statements about Descriptions
Can I embed this in HTML?
The syntax shown in all of the above examples is what RDF calls 'serialisation' syntax. This uses the full expressive nature of RDF. There is also an 'abbreviated' syntax in which the values of the properties are always expressed within XML tags. This is useful when there is a need to include RDF within HTML documents so as to not render any values on the Web browser screen. However, the abbreviated syntax has some limitations. For example, the Properties are non-repeatable and the Property values can only be strings. Example 8 below shows the abbreviated syntax for Example 2.
<? xml version="1.0" ?>
<RDF xmlns = "http://w3.org/TR/1999/PR-rdf-syntax-19990105#"
xmlns:DC = "http://purl.org/DC#"
xmlns:AGLS = "http://naa.gov.au/AGLS#" >
<Description about = "http://dstc.com.au/report.html"
DC:Title = "The Future of Metadata"
DC:Creator = "Jacky Crystal"
DC:Date = "1998-01-01"
DC:Subject = "Metadata, RDF, Dublin Core"
AGLS:Function = "Information Management - Internet"
/>
</RDF>
|
Example 8: Abbreviated Syntax
Can Resources be Property Values?
In some cases it may be useful to have a Resource as the value of a Property.
For example, you can have a list of research papers that made up a collection for
a Conference proceeding, as show in Example 9 below.
...
<Description about = "http://ieee.org/xml-conf98.html" >
<IEEE:Title> Proceedings of the XML'98 Conference </IEEE:Title>
<IEEE:Editor> Jacky Crystal </IEEE:Editor>
<IEEE:Papers>
<Bag ID="XML98-PAPERS">
<li resource = "http://ieee.org/papers/xml98-1.xml" />
<li resource = "http://ieee.org/papers/xml98-2.xml" />
<li resource = "http://ieee.org/papers/xml98-3.xml" />
<li resource = "http://ieee.org/papers/xml98-4.xml" />
<li resource = "http://ieee.org/papers/xml98-5.xml" />
</Bag>
</IEEE:Papers>
</Description>
...
|
Example 9: Resources as Values
Another feature of RDF is the ability to describe individual properties within a collection
of properties. For example, if you needed to say that the five papers from Example 9
were all copyrighted by the conference organisers (IEEE), you could have included such a property
in the RDF descriptions for each paper. Alternatively, you can use the
aboutEach attribute (pointing to the ID name) with only one copyright statement, as shown in Example 10a.
In this case, the Copyright statement applies to each individual resource in the Bag.
...
<Description aboutEach = "#XML98-PAPERS" >
<IEEE:Copyright> Copyright IEEE 1998 </IEEE:Copyright>
</Description>
...
|
Example 10a: AboutEach
An alternative to Example 10a is to use the aboutEachPrefix attribute on the Description element.
In this case, all resources begining with that URI prefix is being described, as shown in Example 10b.
...
<Description aboutEachPrefix = "http://ieee.org/papers" >
<IEEE:Copyright> Copyright IEEE 1998 </IEEE:Copyright>
</Description>
...
|
Example 10b: AboutEachPrefix
What about RDF Schemas?
The RDF also includes preliminary work on the definition of metadata schemas. A schema will define the meaning, characteristics, and relationships of a set of properties. This may include constraints on potential values and inheritance of properties from other schemas. The RDF schema is based on the same model as the RDF syntax specification. Example 11 shows an RDF schema defining two properties (Title and Creator). Each is defined as type "property" with a human-readable label and a short description. It is intended that an XML Namespace URI will point to a machine-readable schema for RDF. In this case, Example 11 may reside at:
which would then become the URI for the "DC" namespace.
<? xml version="1.0" ?>
<RDF xmlns = "http://w3.org/TR/PR-rdf-syntax#"
xmlns:RDFS = "http://w3.org/TR/WD-rdf-schema#" >
<Description ID = "Title" >
<type resource = "http://w3.org/TR/PR-rdf-syntax#Property" />
<RDFS:label> Title </RDFS:label>
<RDFS:comment> The name given to the resource, usually by the
Creator or Publisher </RDFS:comment>
</Description>
<Description ID = "Creator" >
<type resource = "http://w3.org/TR/PR-rdf-syntax#Property" />
<RDFS:label> Author or Creator </RDFS:label>
<RDFS:comment> The person or organisation primarily responsible for
the intellectual content of the resource </RDFS:comment>
</Description>
</RDF>
|
Example 11: RDF Schema
Conclusion
The significant benefit that RDF brings is that it will allow the resource description communities to primarily focus on the issues of semantics rather than the syntax and structure of metadata. The contents of the framework will be determined by the stakeholder communities - independently developed and maintained. RDF also allows for the re-use, extendibility and refinement of established resource description standards since these will be available in machine-readable form.
The new Resource Description Framework specification is an exciting new challenge to the resource description communities
as there will now be a standard mechanism for the global exchange of metadata and their schemas. The consistent use
of metadata and application of metadata schemas means that semantic interoperability will be preserved, hence significantly improving the deployability of advanced Web applications.
Acknowledgements
The work reported in this paper has been funded in part by the Cooperative Research Centres Program through the Department of the Prime Minister and Cabinet of Australia. Thanks for David Willett for comments on earlier drafts of this document.
References
DC. (1998)
RFC 2413, Dublin Core Metadata for Resource Discovery
<ftp://ftp.isi.edu/in-notes/rfc2413.txt>
Iannella. R. (1999)
Representing vCard v3.0 in RDF
<http://www.dstc.edu.au/RDU/RDF/draft-iannella-vcard-rdf-00.txt>
Lagoze, C. (1996).
The Warwick Framework: A Container Architecture for Diverse Sets of Metadata.
D-Lib Magazine, July/August 1996.
<http://www.dlib.org/dlib/july96/lagoze/07lagoze.html>
NAA, (1998).
The Australian Government Locator Service (AGLS) Manual for Users.
Office of Government Information Technology, National Archives of Australia, 27 July 1998.
<http://www.naa.gov.au/govserv/agls/user_manual.htm>
W3C, (1998).
Resource Description Framework (RDF) Schemas.
W3C Working Draft, 30 October 1998.
<http://www.w3.org/TR/WD-rdf-schema/>
W3C, (1998).
Extensible Markup Language (XML).
W3C Recommendation, 10 Feburary 1998.
<http://www.w3.org/TR/REC-mls/>
W3C, (1999).
Resource Description Framework (RDF) Model and Syntax.
W3C Proposed Recommendation, 5 January 1999.
<http://www.w3.org/TR/PR-rdf-syntax/>
W3C, (1999).
Namespaces in XML.
W3C Recommendation, 14 January 1999.
<http://www.w3.org/TR/REC-xml-names >
VCARD, (1998).
vCard MIME Directory Profile.
Draft IETF RFC, 19 August 1998.
<http://www.imc.org/draft-ietf-asid-mime-vcard>
Copyright 1999, DSTC Pty Ltd, All Rights Reserved.