Resource Description Framework (RDF) is a standard for describing web resources. Right now you are probably shaking your head and saying “What is a web resource?” The term “resource” is sort of old school. It means something you find on the web, such as a URI or URL. When discussing RDF, the term goes a little further. RDF also deals with the properties of the resource, such as author and homepage.
RDF documents are written in XML format. Essentially, RDF lists a web resource and provides specific information about it.
<rdf:description
rdf:about="http://www. about.com/ xml">
<author>Darla Ferrara </author>
<homepage>http://www.about.com</homepage>
</rdf:description>
This is a very basic and nonfactual sample of the styling for an RDF page. Using XML syntax, this RDF provides a web resource about.com/xml and lists some facts regarding the resource, such as author and homepage. In the world of RDF, this is known as a statement. This sample proclaims that a web resource exists and who the author is plus where to find the homepage.
RDF is a framework designed to be understood by computers. It has little to do with what a visitor on a website sees. It is a structural component to help a computer understand more about the resource.
The expansion of computer technology is ongoing and organizations, such as WC3, need to define that expansion so everyone stays on the same page. Computers work with different operating systems and applications. This fact requires that a standard exist to explain web resources. In some ways, RDF is a visionary platform for the future that uses XML to create this framework. RDF is organized for simplicity. The less complicated things are the better they will work for future applications.
Think of it this way, if you were creating your own world, you would need to have language rules so that the builders in your world could stay on track. If all the designers went in their own direction because they couldn’t understand each other, there would be chaos. RDF is one way that computer technology can stay organized.
Namespaces for RDF
What the above example is missing is the namespace. RDF is written in XML and relies on a namespace identifier. The first line of the namespace is static. It will be the same on all RDF files.
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
This is the root element and namespace for an RDF document. It goes directly under the XML declaration.
You also add a second namespace declaration that is more specific to your website. For example:
xmlns:df="http://www.about.darla/articles#">
As you can see, the second namespace really does not mean anything. It is a way to keep things organized. This sample here uses df as an identifier for my name, Darla Ferrara. When creating the second namespace line, develop a system that works for you and reuse it to keep the RDF files together. The final RDF file might look something like this:
<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:df="http://www.about.darla/articles#">
<rdf:description
rdf:about="http://www. about.com/ xml">
<author>Darla Ferrara </author>
<homepage>http://www.about.com</homepage>
</rdf:description>
